It's not, this is the problem.. Based on the frequency of the input, I then generate the output. > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Ravi Pailoor > Sent: November 24, 1999 9:06 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: Needed: freq meas and gen in 12C508 > > > If the incoming square wave and the outgoing square wave is the same, > try this. > > btfss gpio,0 ; bit 0 is input > bcf gpio,1 ; bit 1 is output > btfsc gpio,0 > bsf gpio,1 > > Regards > > Pailoor > > Craig Lee wrote: > > > > I mostly program in C with the benefit of interrupts, > > but this application calls for small size and price, > > so I thought I'd ask the piclist. > > > > I need to be able to read an incoming square wave, and > > generate an outgoing square wave based on the first. > > The frequency is from 10Hz to 1Khz. > > > > This is probably very easy for the hardcore micro > > guys, I guess I've become a bit lazy with my GUIs and > > high end languages. > > > > I've done it in a 16F84, although a bit glitchy (can't > > trigger well with a scope), but going to the 12C508, > > I'm a bit lost. > > > > Any direction? > > > > Craig > > -- > WE DESIGN THE FUTURE > Website : http://www.chiptechnologies.com > Website : http://business.vsnl.com/chiptech