On Wed, Jul 29, 2009 at 12:47 PM, Steve Smith wrote: > 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 da= ta > 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: > =A0BSF =A0 GPIO,outbit > =A0BTFSS =A0 =A0GPIO,inrxbit > =A0BCF =A0 GPIO,outbit > =A0BTFSS =A0 =A0GPIO,inrxbit > =A0BSF =A0 GPIO,outbit > =A0BTFSS =A0 =A0GPIO,inrxbit > =A0BCF =A0 GPIO,outbit > =A0BTFSS =A0 =A0GPIO,inrxbit > ... > ... doing this for a while makes a continuous signal > ... > =A0BSF =A0 GPIO,outbit > =A0BTFSS =A0 =A0GPIO,inrxbit > =A0BCF =A0 GPIO,outbit > =A0BTFSS =A0 =A0GPIO,inrxbit > =A0GOTO =A0 LOOP ; glitch occures! > > =A0GOTO =A0 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 wro= te: > >> 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 >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Code =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0cycles (500ns ) >> =A0 =A0 =A0 =A0Bsf =A0 =A0 GPIO,outbit =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 ;0 =A0 =A0 =A0 =A0 =A0 =A0 =A06 >> =A0 =A0 =A0 =A0btfss =A0 GPIO,inrxbit =A0 =A0 =A0 =A0 =A0 =A0;1 >> =A0 =A0 =A0 =A0goto =A0 =A0main =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0; >> =A0 =A0 =A0 =A0bcf =A0 =A0 GPIO,outbit =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 ;3 >> =A0 =A0 =A0 =A0goto =A0 =A0$-4 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 ;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 >> >> The PIC is the wrong solution. Just build a gated RC oscillator out of a dual comparator (since you say you need a comparator). Regards, Mark markrages@gmail -- = Mark Rages, Engineer Midwest Telecine LLC markrages@midwesttelecine.com -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist