Hi,
I have a small board with ATMega16U4 running 16Mhz and I'm trying to use IRRemote without success.
I'm compiling the program in Atmel Studio 6 and using the Arduino Library. Also I have a IR sensor (38Khz) attached to pin PD5.
I'm running the recvdump sketch example with debug messages enabled and here is the logs:
BAAC716C
Could not decode message
Raw (72): 9344 1150 -550 100 -50 50 -200 100 -200 50 -100 50 -100 50 -100 50 -50 100 -200 50 -250 50 -200 100 -50 50 -200 100 -50 100 -200 50 -250 50 -50 100 -200 50 -100 50 -200 100 -50 100 -200 50 -100 50 -50 100 -50 100 -50 50 -250 50 -50 100 -200 50 -100 50 -200 100 -200 50 -250 50 -5000 1100 -300 50
DE14404C
Could not decode message
Raw (72): -27698 1150 -550 50 -100 50 -200 100 -200 50 -100 50 -50 100 -50 100 -50 50 -250 50 -200 100 -200 50 -100 50 -200 100 -50 50 -250 50 -200 100 -50 50 -250 50 -50 100 -200 50 -100 50 -200 100 -50 100 -50 100 -50 50 -100 50 -200 100 -50 100 -200 50 -50 100 -200 100 -200 50 -200 100 -4950 1150 -250 100
3F3E464F
Could not decode message
Raw (72): 19416 1100 -600 50 -50 100 -200 100 -200 50 -50 100 -50 100 -50 100 -50 50 -250 50 -200 50 -250 50 -100 50 -200 100 -50 50 -250 50 -200 100 -50 50 -100 50 -200 100 -50 100 -50 50 -250 50 -50 100 -50 100 -50 50 -250 50 -50 100 -200 50 -250 50 -50 100 -200 50 -250 50 -200 100 -4950 1150 -250 100
248C15D9
Could not decode message
Raw (72): 8388 1100 -550 100 -50 100 -200 50 -200 100 -50 100 -50 50 -100 50 -100 50 -200 100 -200 50 -200 100 -50 100 -200 50 -100 50 -200 100 -200 50 -100 50 -50 100 -200 50 -100 50 -100 50 -200 100 -50 50 -100 50 -100 50 -200 100 -50 100 -200 50 -200 100 -50 100 -200 50 -200 100 -200 50 -5000 1100 -300 50
Every time I press a button in the remote control (which generates NEC codes) the firmware return a different 32 bit code. I notice that the first 9000 NEC_HDR_MARK and 4500 NEC_HDR_SPACE are not been shown. I don't know how these "pulses" are been lost by the program. Also the number for the SPACES and MARKS are very far from the normal 560, 1600, 560.
I already checked the IRremoteInt.h trying to find something unusual and related with the timers but I couldn't find.
I really thought that using ATMega16U4 instead of ATMega32U4 (which runs smoothly) should be ok as they have the same pinout, just less memory in the 16U4.
Thanks in advance for any help, Diego