making a ir tv remote using atmega or any other uC

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

making a ir tv remote using atmega or any other uC

2,013件の閲覧回数
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

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

934件の閲覧回数
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 件の賞賛
返信

934件の閲覧回数
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 件の賞賛
返信

934件の閲覧回数
PeterHouse
Contributor I
0 件の賞賛
返信