I'm no expert on IR links, but the ones I've used had much lower than 50% duty cycles. It seems to me, that if you used a shorter on time, it'd make the looping and testing easier, not to mention letting you drive the LED harder. Either way, it'll be a tight fit. -Denny ----- Original Message ----- From: "Jinx" To: "Microcontroller discussion list - Public." Sent: Tuesday, May 03, 2005 11:11 PM Subject: Re: [PIC] 38KHz from 12f675 TMR0 interrupt? > > 13.15usec per half cycle. I don't think you have enough time to > > save and restore context and reload timer0 at 4MHz, let alone > > keep track of other timing. > > You could be right - as a straight 38kHz generator it would work > but what's going to make it a tight squeeze at 4MHz is the testing > and branching > > Maybe put a 32kHz xtal on Timer1 and use that to measure the > 5 & 20 second intervals (T1 OSC available only if you use the > internal osc), keeping TMR0 @ 4MHz just for the 38kHz > > Or even WDT + a timer ? > > OK OK, run it at 10MHz ;-) > > BTW Tom, I'd recommend ZTX transistors for driving IR LEDs. > They switch faster and better and more current than other common > types (eg TO92 like BCxxx or 2Nxxxx). Their higher current rating > means a low value series R can be used eg 1 or 2 ohms for good > range, but watch the wattage dissipated by the IR LED > > -- > 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