Searching \ for 'SQUARE WAVE Generator' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=square+wave+generator
Search entire site for: 'SQUARE WAVE Generator'.

Truncated match.
PICList Thread
'Square wave generator'
1998\12\12@190358 by Steve Blackmore

flavicon
face
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: spam_OUTsteveTakeThisOuTspampilotltd.u-net.com  WWW: http://www.pilotltd.u-net.com

1998\12\12@215149 by Scott Shidel...

flavicon
face
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!
------------------------------------------------------------------------

1998\12\12@232816 by Scott Newell

flavicon
face
>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...

1998\12\13@182304 by Paul M

flavicon
face
At 09:50 PM 12/12/98 -0500, you wrote:
{Quote hidden}

check out Mark Crosbie's web page at:
http://www.best.com/~mcrosbie/projects/Electronics/PIC/MyCode/flashfast.html

He has the source and schematic.

C-Ya
Lasertek

1998\12\14@185341 by Steve Blackmore
flavicon
face
Just a thanks to all who replied, now sorted.

Especially to  "Michael J. Ghormley" - despite just having returned
from a party <HIC> managed to send me a fully working piece of code ;)

Steve Blackmore
--
Pilot Consultancy Limited ***** Computer Consultants
Telephone 01744 752256          Mobile 0831 768478
Email: .....steveKILLspamspam@spam@pilotltd.u-net.com  WWW: http://www.pilotltd.u-net.com

1998\12\15@043126 by Tom Handley

picon face
  Steve, why not use a simple 555 Timer?

  - Tom

At 12:01 AM 12/13/98 GMT, Steve Blackmore wrote:
{Quote hidden}

1998\12\16@163946 by Martin McCormick

flavicon
face
       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

1998\12\16@180708 by Fehrenbach, Robert J

flavicon
face
>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.

1998\12\16@181511 by Harrison Cooper

flavicon
face
there is a chip.....ICM7555, that can produce a symetrical output, just an
RC circuit

> ----------
> From:         Fehrenbach, Robert J[SMTP:.....FehreRJKILLspamspam.....CH.ETN.COM]
> Sent:         Wednesday, December 16, 1998 3:56 PM
> To:   EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.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.
>

1998\12\17@065533 by paulb

flavicon
face
Tom Handley wrote:

>    Steve, why not use a simple 555 Timer?

 I thought the implication was that he wanted an accurate frequency.
--
 Cheers,
       Paul B.

1998\12\17@150632 by Martin McCormick

flavicon
face
"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.

Martin McCormick

1998\12\17@201021 by Steve Blackmore

flavicon
face
On Thu, 17 Dec 1998 14:37:46 +1000, you wrote:

>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.


Steve Blackmore
--
Pilot Consultancy Limited ***** Computer Consultants
Telephone 01744 752256          Mobile 0831 768478
Email: stevespamspam_OUTpilotltd.u-net.com  WWW: http://www.pilotltd.u-net.com


'SQUARE WAVE Generator'
1999\09\08@034922 by Dipl.-Ing. Faruk DERI (VDI)
flavicon
face
Hi friends,

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.

please sorry for my Language.

Faruk

1999\09\08@042044 by Quentin

flavicon
face
Hi Faruk, welcome to the list.

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!)

;HALFSTEP, SLOWER, MORE POWER
STEP        ADDWF       PCL,F
           RETLW       B'00000001'
           RETLW       B'00000011'
           RETLW       B'00000010'
           RETLW       B'00000110'
           RETLW       B'00000100'
           RETLW       B'00001100'
           RETLW       B'00001000'
           RETLW       B'00001001'

;FULLSTEP, FASTER, LESS POWER
STEP        ADDWF       PCL,F
           RETLW       B'00000001'
           RETLW       B'00000010'
           RETLW       B'00000100'
           RETLW       B'00001000'
           RETLW       B'00000001'
           RETLW       B'00000010'
           RETLW       B'00000100'
           RETLW       B'00001000'

Nice to share something that I've learned from this list a long time ago
and still use. :)

Quentin

1999\09\08@181525 by paulb

flavicon
face
Faruk DERI wrote:

> 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.

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...