Nec IR Transmitter
Legonigel
Posts: 12
Hey,
Would it be possible to build a transmitter to send the hex value 43 for the data. I don't really seem to understand how to program the timing.
Thanks,
Nigel
Would it be possible to build a transmitter to send the hex value 43 for the data. I don't really seem to understand how to program the timing.
Thanks,
Nigel
Comments
As to the receiving part, I've not worked on that, but I would expect someone will come along and discuss that. Also there is an IR Kit on the Propeller Object exchange and I think that has a receiving program?
http://obex.parallax.com/objects/category/9/?n=100
Here is my Sony volume down transmitting code as an example...
~Nigel~
Anyway 2 signals are shown. 38 kHz is RC2 and the bits are RC1. The same amount of time on/off (up/down) on RC1 is a zero bit. But a longer off period is a one bit. Sony is opposite and a longer on time is a one bit.
The second picture shows a closeup of a zero and one bit. With this you can see the 38 kHz below.
Anyway that is what the program above is doing. Sending 38 kHz out one pin and turning another pin on/off to send the bits.
As for a specific protocol, following is a LIRC database and there is an NEC folder there. These give the "specifications" of each IR signal for each manufacturer. Here is that link...
http://lirc.sourceforge.net/remotes/
Then here is all about LIRC...
http://www.lirc.org
Here it explains what the various settings in each LIRC specification are for...
http://winlirc.sourceforge.net/technicaldetails.html
As for sending Hex 43, the calculator in the programs/accessories which are on Microsoft OS computers has a View/Scientific mode. And this has binary, hex, decimal, etc.
So easy to convert that Hex 43!
That would be 1000011 in binary.
So that is what you would send. Some IR protocols send the least significant bit first. Others the most significant bit first.
So MSB would be sent as it is... 1000011
LSB would be sent backwards... 1100001
This is difficult stuff to work on! The problem is being able to "see" what is going on.
I use a Basic Stamp to measure the 38 kHz frequency. It helps to be sure you have that working OK.
Then I use IR capture on the Propeller to see the "bits". Following is the output of IR capture for the above pictures! Notice the larger numbers on some of the following? Those are 1 bits as shown in the pictures above for the Technics...
1,100
2,3455,1640
2,362,535
2,359,1356
2,362,513
2,352,540
2,362,513
2,352,540
2,362,513
2,352,540
2,362,513
2,352,540
2,362,513
2,434,458
2,362,513
2,416,1320
2,362,511
2,432,462
2,362,512
2,457,437
2,362,511
2,430,463
2,362,510
2,360,1379
2,361,510
2,362,1359
2,352,539
2,362,514
2,352,539
2,362,513
2,352,539
2,362,513
2,353,539
2,362,513
2,406,1331
2,362,512
2,460,433
2,362,512
2,459,434
2,362,1355
2,360,534
2,362,510
2,361,1359
2,377,514
2,362,514
2,352,538
2,362,514
2,352,539
2,362,514
2,352,1383
2,362,1093780
3