Hi Steve, I think the situation is a bit worse. First of all you need 4 instruction cycles, not 4 instructions... GOTO takes 2... Secondly, 455kHz means you need to toggle the port bit at every 2nd cycle, not every 4th. If a little glitch is acceptable you may can try something like this: LOOP: BSF GPIO,outbit BTFSS GPIO,inrxbit BCF GPIO,outbit BTFSS GPIO,inrxbit BSF GPIO,outbit BTFSS GPIO,inrxbit BCF GPIO,outbit BTFSS GPIO,inrxbit ... ... doing this for a while makes a continuous signal ... BSF GPIO,outbit BTFSS GPIO,inrxbit BCF GPIO,outbit BTFSS GPIO,inrxbit GOTO LOOP ; glitch occures! GOTO MAIN But I think you should go for a mid-range device instead where you have interrupts and PWM module as Dario suggested... Tamas On Wed, Jul 29, 2009 at 5:56 PM, Steve Smith wrote: > Guys: > During a program I have to periodically make a burst of 455Khz pulses and > stop when a pin changes state.... > > Using an pic 12F510 I can get an 8Mhz internal osc that gives me about 4 > instructions to manufacture this burst and sense the end. It goes something > like this > > Code cycles (500ns ) > Bsf GPIO,outbit ;0 6 > btfss GPIO,inrxbit ;1 > goto main ; > bcf GPIO,outbit ;3 > goto $-4 ;4 > > > best I can do is 5... Anybody got any better ideas I am trying to get a one > chip solution in the smallest possible space and it needs a comparator > > TIA > > STeve > > > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.mcuhobby.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist