Tamas Thanks for the pointer... I am trying to get the whole thing inside a 3.5mm jack plug to convert a stream of data into IR at 455Khz... I have it working at 40Khz but the data rate is far too slow... I could get away with 250Khz but there dosen't seem to be any receivers rated to that they are either 56K or 455K I have been looking at the TSOP7000 as an RX optimised around 455K STeve -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Tamas Rudnai Sent: 29 July 2009 18:30 To: Microcontroller discussion list - Public. Subject: Re: [pic] a tight code chalenge 455Khz burst... 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 -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist