making a ir tv remote using atmega or any other uC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

making a ir tv remote using atmega or any other uC

2,011 Views
nachi30192
Contributor I

pls help...need some idea to make a tv remote using atmega or any other uC operating on 38kHz n NEC format

Labels (1)
0 Kudos
Reply
3 Replies

932 Views
bigmac
Specialist III

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.

https://community.freescale.com/thread/103280

 

Regards,

Mac

 

0 Kudos
Reply

932 Views
PeterHouse
Contributor I

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.

 

Good Luck,

 

Peter

0 Kudos
Reply

932 Views
PeterHouse
Contributor I
0 Kudos
Reply