I need to generate a 100kHz square wave ttl signal. Does anyone have
any code to do this with a 16C84? It's a one-off requirement to
test/align an FPGA based weather satellite decoder.
I think I can build the circuit to drive the PIC, and I have access to
a Picstart Plus programmer - it's just the programming I know
absolutely nothing about.
> I need to generate a 100kHz square wave ttl signal. Does anyone have
> any code to do this with a 16C84? It's a one-off requirement to
> test/align an FPGA based weather satellite decoder.
I cant remember if it uses a pic or what, but in the current issue of
Electronics Now there is a project for building a signal generator.
-----------------------------------------------------------------------
The Pinto Page: http://www.eng.usf.edu/~shidel
Join the Ford Turbo Mailing List! http://www.FindMail.com/list/turbo/
Scott
-71 Pinto, stock 2.3 turbo, 13.67@98, radials
8.1@85 1/8th mile on slicks
-85 Merkur 13.764@98 on radials&3300lbs! Under $300 in mods!
------------------------------------------------------------------------
>I need to generate a 100kHz square wave ttl signal. Does anyone have
>any code to do this with a 16C84? It's a one-off requirement to
>test/align an FPGA based weather satellite decoder.
>
>I think I can build the circuit to drive the PIC, and I have access to
>a Picstart Plus programmer - it's just the programming I know
>absolutely nothing about.
If one-off means something you'll only need once, then you might get up and
running quicker using the speaker output of a PC. It's wired into the
timer chip on the motherboard, and it's trivial to reprogram it to output a
square wave. Once programmed, the timer will output pulses in the background.
I figure a divisor of 12 will give you a 99.431667 kHz signal.
newell
ps.
In case you can't tell, I've been playing with the PC timer this weekend.
I'm using timer 0 to generate regular interrupts to drive a step motor
through the parallel port. I've written a little 'DDS' style phase
accumulator in the ISR so I can have an approximately linear selection of
step motor pulse rates. It'll probably get migrated to a PIC eventually,
but I can compile on the PC faster than the crash-and-burn cycle with
16C74s...
>On Sun, 13 Dec 1998, Steve Blackmore wrote:
>
>> I need to generate a 100kHz square wave ttl signal. Does anyone have
>> any code to do this with a 16C84? It's a one-off requirement to
>> test/align an FPGA based weather satellite decoder.
>
>I cant remember if it uses a pic or what, but in the current issue of
>Electronics Now there is a project for building a signal generator.
>
>
>-----------------------------------------------------------------------
> The Pinto Page: http://www.eng.usf.edu/~shidel
> Join the Ford Turbo Mailing List!
> http://www.FindMail.com/list/turbo/
>Scott
>-71 Pinto, stock 2.3 turbo, 13.67@98, radials
> 8.1@85 1/8th mile on slicks
>-85 Merkur 13.764@98 on radials&3300lbs! Under $300 in mods!
>------------------------------------------------------------------------
>
>
At 12:01 AM 12/13/98 GMT, Steve Blackmore wrote: {Quote hidden}
>I need to generate a 100kHz square wave ttl signal. Does anyone have
>any code to do this with a 16C84? It's a one-off requirement to
>test/align an FPGA based weather satellite decoder.
>
>I think I can build the circuit to drive the PIC, and I have access to
>a Picstart Plus programmer - it's just the programming I know
>absolutely nothing about.
>
>TIA
>
>
>Steve Blackmore
>--
>Pilot Consultancy Limited ***** Computer Consultants
>Telephone 01744 752256 Mobile 0831 768478
>Email: steveKILLspampilotltd.u-net.com WWW: http://www.pilotltd.u-net.com
>
>
The NE555 timer will produce a square wave, but you have to
tweak the resistors to get it perfectly semetrical. It is also
possible to use that chip and a 7473 or similar flipflop. The NE555
should be set to produce twice the needed frequency. It won't matter
if the duty cycle is not 50% on the 555. The 7473 will give a
perfectly square wave output at the desired frequency. You also get a
two-phase clock out of the deal by using the Q or Q^ outputs.
Martin McCormick WB5AGZ Stillwater, OK
OSU Center for Computing and Information Services Data Communications Group
there is a chip.....ICM7555, that can produce a symetrical output, just an
RC circuit
> ----------
> From: Fehrenbach, Robert J[SMTP:.....FehreRJKILLspam.....CH.ETN.COM]
> Sent: Wednesday, December 16, 1998 3:56 PM
> To: EraseMEPICLISTspam_OUTTakeThisOuTMITVMA.MIT.EDU
> Subject: Re: Square wave generator
>
> From Martin McCormick's posting:
> >The NE555 timer will produce a square wave, but you have to tweak the
> resistors to get it perfectly semetrical.
>
> The app notes for the 555 timer generally have a configuration using a
> single resistor which produces a 50% duty cycle.
>
"Fehrenbach, Robert J" writes:
>The app notes for the 555 timer generally have a configuration using a
>single resistor which produces a 50% duty cycle.
I stand corrected. I don't have the application notes in
front of me, but I can almost imagine what the circuit looks like. If
you place a resistance in series with a capacitor, the same time
constant applies for charging as for discharging so that one should
get a 50% duty cycle if the capacitor is charged through the very same
resistor that ultimately discharges it.
>Tom Handley wrote:
>
>> Steve, why not use a simple 555 Timer?
>
> I thought the implication was that he wanted an accurate frequency.
And got one ;) The reason for choosing a pic was - there was one here
doing nothing, and uses very little ancillary components. I could
have used a 555 but don't think, without some experimenting I could
have got such an elegant and accurate solution.
The 555 would have relied on timing resistors/caps, after the "fun"
I've had with capacitor/varicap diode values on the oscillator stage
of the receiver a simple solution that doesn't rely on the vagaries of
component choice is refreshing.
Both scope and counter agree - it's working precisely at designed
frequencies.
I have since added some more to the code that Michael J. Ghormley sent
me and got a few more freq's out of it too. I now have the complete
solution to generate several different frequencies I needed to test
and align both the decoder and receiver.
I really must find the time to learn a bit more about pic's - the more
I read - the more I'm impressed.
I'm new in this e-mail group. My name is Faruk and I'm from Turkey.I
have a project to make for the test from stepping Motor applicationen
square wave generator with PIC.
I have:
1.two buttons to make up & down the frequenz
2.working frrequenz 0-10KHz
for this I need software subroutines or idee how can I make this.
Create a counter that will count up or down between 0 and 7.
For the stepping up you can call the following subroutine:
STEPOUT INCF COUNT,W ;or DECF for other direction
ANDLW 0X07
MOVWF COUNT
CALL STEP
MOVWF PORTB ;pins RB0 to RB3 are the stepper pins
;ADD YOUR OWN DELAY HERE TO CONTROL SPEED, MINIMUM IS ABOUT 10Ms
(FASTEST STEP)
RETLW 0 ;and go back see if button is still pressed,
;if so, call STEPOUT again
;select one of the STEP routines below according to your needs (use only
one!)
> I have a project to make for the test from stepping Motor
> application square wave generator with PIC.
> 1.two buttons to make up & down the frequency
> 2.working frequency 0-10KHz
With regard to the variable frequency, instead of thinking in terms of
a variable delay loop, try thinking in terms of a loop which runs at a
fixed speed (say, 65,536 Hz), and adds a value to a (16-bit) counter
with each loop. Your "square wave" output is now the MSB of the counter
and if you require stepping patterns, they can be derived from the other
high bits by various devious means.
The procedure is generally referred to as a "phase accumulator" and
permits precise integral frequencies to be generated perfectly easily.
The value added to the counter becomes the specified frequency in Hz, or
the numbers may be scaled as necessary.
Setting this by buttons involves a debounce routine, and auto-repeat,
to vary up or down the "frequency" value for the phase accumlator. I
would presume some sort of display of the frequency will be wanted?
--
Cheers,
Paul B.