The rate if the USART is 9600. The prinf() function does work within the interrupt, but I'm not sure if it's causing some edges to not be detected. This would explain why there would only be 5 edges instead of more. I will try to set up my code so it buffers up the incoming data and then prints it to the serial port at a later time (ie outside the interrupt routine). Thanks for the hint/advice. MJ Brush ----- Original Message ----- From: "Colombain Nicolas" To: Sent: Monday, May 31, 2004 8:57 AM Subject: Re: [PIC:] Counting IR pulses from Remote Control > Hi Matthew, > > What is the baudrate of your USART ? and does the printf function work with > interrupt ? If not, you can lose some edges... Do not use this kind of > output in an interrupt routine (just an advice). > Regards, > > Nicolas > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads