>>a 40khz pulse should be output on the IR LED for a short period of time >>(about a second). > >That's not a short period of time. The IR detector will probably want to >see pulses from 10 to 50 cycles. Much beyond that and it's automatic gain >circuitry will decide the pulse is ambient and set its threshold to filter >it out. That makes sense, thank you for pointing that out. I knew the receiver would filter out sources it thought to be ambient light but I wasn't sure what kind of time durations were acceptable. >>I have included a simple Excel spreadsheet I made to help calculate >>the settings for the CCP Module for the PIC 16F628, which I used to >>come up with my values for the program. > >That's silly. What happens when you change the PIC oscillator frequency or >want to use a different IR modulation frequency? These should be parameters >directly in your code, probably a top level include file, and everything >else should be computed from that at assembly time. 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. I got the formulas directly from the Midrage Reference Manual and made the spreadsheet so I wouldn't have to calculate them by hand each time I wanted to change anything. I also plugged in the Midrange Manual example numbers to make sure my spreadsheet was correct. The spreadsheet provided the same results the manual showed. Thank you for the suggestions for the transistor and not driving the IR LED directly from the I/O pins. Do you think an 2N3906 NPN would be appropriate for driving an IR LED at these frequencies? Also, my end goal is to do IR Serial Communication. I haven't been able to find very much information for this on the net when it comes to PIC Micros. Are there any things I should avoid when deciding on how to implement this? Thanks again. All suggestions are welcome! Sincerely, Scott Pierce -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist