Hi, I am doing a project about receiving the input value from a remote via IR.
The protocol tends to be NEC
Please check the link if you need want more information for NEC
NEC Infrared Transmission Protocol | Online Documentation for Altium Products
It seems I have to set an NEC to encode and decode function from IR.
I wonder how to generate the clock properly as a timer/counter to capture input 1 or 0 and return the decoded value to the main function.
The encode function is an interrupt function as IR receives the pulse from a remote.
I lost the thought to link encode and decode functions together such that pass through the decoded value to the main function.
Appreciate your time, if there is an efficient way to do IR encode and decode in LPC802, please share. Thanks.
Hi, zhiwch@my.yorku.ca
Sorry for the delay.
As you may already check, the CTIMER peripheral is suitable.
For example, you could set the timer on a free-running mode and generate periodic interrupts to have a time base in combination with an external GPIO interrupt to detect pulses.
Another way is to use the input capture mode of the timer to count the time between pulses.
Please note that you can import the CTIMER and GPIO (if required) examples from the device SDK as a starting point to develop your application.
The following links to similar applications can help you further.
Infrared Remote Control Techniques on MC9S08RC/RD/RE/RG Family
Implementing an IR Blaster on HCS08-Based IEEE® 802.15.4 Wireless Nodes
A method to realize IR remote receiver with Kinetis
On the other hand, a more efficient way is to use an IC to decode the IR NEC protocol.
Please, let me know if this information was useful.
Have a great day,
Diego
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------