26us will give you ~38.5khz which works well with a 38khz IR receiver mod= ule,=20 though I expect the range may not be as great as if you get 26.3khz. I=20 currently do this in a calculated loop (not in the ISR), but my app is a=20 keyfob transmitter with only a few different signals. If you plan to do = much=20 more in the PIC, you will probably need to run it at a higher frequency. Cheers, -Neil. On Tuesday 03 May 2005 06:02 pm, Tom Wrighton scribbled: > ... My project is to make a small IR > beacon as part of a robotic competition for navigation. I would like t= o > execute a small flashing LED countdown (one pulse each for 5 seconds) > and than modulate an IR LED for 20 seconds. I think I have the TMR0 > interrupt figured out and I can execute seconds timing and LED flashing. > My confusion comes in as follows: I=92m trying to use the internal RC = osc > ( _INTRC_OSC_NOCLKOUT ) which I believe ends up at 1 us > execution cycles. To achieve a 38KHz flash rate I need an interrupt ev= ery > 26.3 us. This calculates to loading the TMR0 with something like > decimal 242 +/- 4 cycles for a half cycle at 38KHz. This does not leav= e me > very many cycles left for the ISR. At this point I have tried to measu= re > the > frequency of the flashing LED with a Craftsman DMM that has a freq > measurement capability. The best I can do so far is 32 and a fraction = KHz. > At this point I am wondering if I need to use a crystal osc. And run it= at > 10 MHz instead of the 4Mhz of the internal? I have followed the PICLIS= T > ... --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist