pls help...need some idea to make a tv remote using atmega or any other uC operating on 38kHz n NEC format
Try starting with these links:
I really like the 68xx family for decoding IR. I find it really easy to set the uC to interrup on both rising and falling edges and on each edge the ISR Stop the counter, stores the capture count, reset the counter to 0, and restart the counter. Check the timer value for the expected pulse ranges and determine if start sequence, 0 bit, 1 bit and store, exit the ISR. When the code is complete, set a flag for the Main routine.
There should be a state machine for the code sequence you are looking for like the NEC in the previous message links.
If you set the timier dividers properly, you can measure bits, start sequences, and repeat messages. When the timer overflows, you can also determine the message is not repeated.
Hello, and welcome to the forum.
Firstly, it is unclear to me whether you wish to encode the NEC IR protocol, or to decode the protocol. Secondly, this forum does not address any atmega coding issues - it is specifically for Freescale 8-bit MCUs, and their peripheral hardware. IR protocols, either sending or receiving, involve extensive timer hardware use.
The following recent thread on this forum addressed the encoding of the NEC protocol, without the 38kHz sub-carrier.
Retrieving data ...