Scott Pierce wrote: > I'm not quite sure exactly what you mean by having the parameters > directly in my code. I understand that changing the clock frequency > and IR modulation frequency would require calculating new > parameters...but that's what the spreadsheet is for. You just plug in > your clock and modulation frequency, and prescalar and it tells you > what parameters you need to plug in. But that's exactly the problem since it requires manually changing something outside the code and copying a new value into the code. If the clock frequency and the desired IR modulation frequency are symbolic constants defined at the top of the main include file, then you can use assembly time computation to determine the CCP module setup. You should get used to always doing this with the oscillator frequency anyway. Lots of things are derived from that, like UART baud rate, timer 2 period, etc. As examples of this kind of thing, see my UART_BAUD and TIMER2_USEC macros in STD.INS.ASPIC at http://www.embedinc.com/pic. > Do you think an 2N3906 NPN would be > appropriate for driving an IR LED at these frequencies? Yes. ****************************************************************** Embed Inc, Littleton Massachusetts, (978) 742-9014. #1 PIC consultant in 2004 program year. http://www.embedinc.com/products -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist