Hi,
What is the easiest way to write NEC remote data to an IR LED at 38kHz?
For example i now the code for power on on my device i.e 0x111E30CF, unsigned int data = 0x111E30CF
is there sample code for transmission?
thanks
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
What is the easiest way to write NEC remote data to an IR LED at 38kHz?
For example i now the code for power on on my device i.e 0x111E30CF, unsigned int data = 0x111E30CF
is there sample code for transmission?
thanks
Hello!
Unfortunately there is no miracle method because there is no IR engine in MSP430.
There is an IRDA, but this is different.
Note that Google is your friend:
www.circuitvalley.com/.../nec-protocol-ir-infrared-remote-control.html
Now for the particular implementation on MSP430, what I do is as follows:
- Configure a timer based on SMCLK to generate a square 38 KHz wave (can be easily
started and stopped using OUTMOD).
- Configure another timer based on ACLK to generate your bit encodings.
Usually, on all the remote controls I have experienced, a 0 is made of 2 equal
periods: 1 period with pulses and one period with no pulses. And a 1 is made of
2 periods, one being generally double of the second one.
The good thing about using pwm timers is that at least you don't need to interrupt
all the time to generate 38 kHz pulses (in this case, you should interrupt at 76
kHz, and toggle the putout). What you do is set the 38 kHz wave and clear it.
Therefore one interrupt every 560 µs at most.
I haven't found any smarter way to do it.
Have fun!
Pascal
The MSP430FR413x chips has IR modulation Logic. There are many IR remote control examples for FR4133 LunchPad and Infrared (IR) BoosterPack Plug-in Module
**Attention** This is a public forum