Universal Code Sequences for Toshiba TV's
NoBo780
Posts: 94
Anyone that is familiar with IR communication knows that commands that are sent from a TV (or VCR, DVD, etc. for that matter) are made up of varying pulses, starting with a 'start' pulse that tells the TV/VCR/etc. that it is about to receive a new command sequence. I am doing a project that involves controlling a Toshiba TV via a microcontroller + an IR detector,& an IR LED. The micro captures the pulse width from the remote controlling the TV, and repeats them through the IR LED. The thing is, in order for it to do so, it must know the start bits (the first pulse width that is sent from the remote to let the TV know it's about to send it a command), so it knows when to start capturing a new code (right?). I have SCOURED the internet for the information on the pulse code sequences that are used (universally) for Toshiba TV's, but I can't find them anywhere. Does anyone know where I can find them? Do I even need them to do this? I am trying to do what was done here: (http://www.parallax.com/Portals/0/Downloads/docs/prod/sic/WebIR- v1.1.pdf) with an Arduino (ATmega168 programmed via the 'wiring' code library), except that I will have the Arduino store the codes at random, and repeat them via the IR LED. Kudos to anyone that can successfully answer this question!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Giggly Googley!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Giggly Googley!
Comments
Here is a document that describes the Pronto hex format.
('Took all of five minutes with Google. )
-Phil
I have seen that website (th one w/ the codes), but my model # is not there (it's like 27AF...). But shouldn't the codes for ALL Toshiba TV's be the same? OR not... (I mean, we have universal remotes...)?
Allan:
I have a logic analyzer (and by that, you just mean the indicator of HIGH/LOW, right?) built into my multimeter, but I guess it's wayyy to slow for that. And how did you time the pulses just so with a logic analyzer? Isn't that the device with simply two LED's that indicate HIGH and LOW? Did you use a photodetector over the LED's and time it with a micro, or is there a more expensive analyzer you used? I by no means have an oscilloscope, if that's what you're talking about, and I do not currently have the wallet to get one . What are my options? How can I do this? More info HERE.·Thanks for the help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Giggly Googley!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Giggly Googley!
Check out this project:
http://www.parallax.com/tabid/321/Default.aspx
The repeater works very well.
Search the web for infrared protocol & infrared protocols
http://www.geocities.com/SiliconValley/Lakes/3947/TABLE.HTML
http://www.sbprojects.com/knowledge/ir/ir.htm
http://www.vishay.com/docs/80071/dataform.pdf
http://www.celadon.com/SC-33B-programmable-remote-control/SC-33B-NEC-IR-Protocol.pdf
You will also find other protocols on the Celadon web sight.
http://www.celadon.com/remote-controls.htm
You may not find the exact protocol for your appliance. Once you have captured part of the data from your remote, the rest is easy. You need the start pulse,·the pause and then you need to understand the difference between a logical 1 and logical 0 and finaly the number of bits. Most of the data is sent four groups of 6 and or 8 bits for a total of 24 and or 32 bits. Look at your data in a binary fashion in groups of 6 and or 8.
Every remote I own followes the NEC format of 32 bits and or RCA format of 24 bits.
The boe bot IR paper describes a great IR remote receiver using RC time.
Good Luck
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Giggly Googley!
Have Fun.
is a Logic Analyzer -- it samples up to·8 lines of TTL data, and presents the results as a graph,
showing the timing of the signals.
Post Edited (allanlane5) : 3/12/2008 8:33:24 PM GMT
·
I always wanted a scope, and I think that will probably be the only surefire way of measuing the IR pulses. The problem is, I am not sure I have that much money on an instrument that I will rarely use. Although they are great tools, I would not use it much, even though this situation probably demands one. Is the scope manufactured by Parallax sufficient (fast enough/enough resolution/refresh time for this puropse)? It's only $129. Also, is there any other way I can go about measuring the sequences without a oscilloscope or logic analyzer? Thanks for the help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Giggly Googley!
I have never used the Parallax Scope. I constructed a poormans scope with a BS2 OEM.
The BS2 is not fast enough to capture the light on and light off pulse periods in one shot.·PULSIN PIN, 1 is fast enough to capture just the high pulses and PULSIN PIN, 0 is fast enough to capture the low pulses.
Write a program to capture the LIGHT OFF pulse periods.
Remember, the IR·receiver outputs 5V when the IR transmitter is off and the IR receiver outputs 0V when the IR transmitter is on.
The following will capture 10 light off pulse periods.
PULSIN PIN, 1, PULSEVALUE(0) 'Array Value 1
PULSIN PIN, 1, PULSEVALUE(1) 'Array Value 2
.
.
.
PULSEIN PIN, 1, PULSEVALUE(9) 'Array Value 10
Write a second program to capture the LIGHT ON pulse periods.
The following will capture 10 light on pulse periods.
PULSIN PIN, 0, PULSEVALUE(0) 'Array Value 1
PULSIN PIN, 0, PULSEVALUE(1) 'Array Value 2
.
.
.
PULSEIN PIN, 0, PULSEVALUE(9) 'Array Value 10
Draw a wave period similar to the NEC protocol and start writing down the values received for light on and light off periods. You should see the pattern jump out at you.
Except for the first light on period, the other nine should be the same value for the NEC protocol. Except for the first light off value, the other nine you should see two unique values.
Follow the IR boe bot paper and write a program using RCTIME to capture the number of bits and there values.
SJW
-Phil
Thank you very much. I have a few questions, though.
What do you mean by "Draw a wave period"? And where can I find the NEC protocol? And lastly, what does RCTIME have to do with this? And why do I need the number of bits and their values? Here's the programs I used, BTW:
Let me know if I'm doing anything wrong, here. Also, don't I need some way for the BS2 to WAIT until it sees the start of the sequence to start recording the pulses? Otherwise, if I just place my TV remote in front of the IR detector and hold down, say, the volume + button, and then press reset on the BS2, then it is highly likely that it will simply catch the sequence anywhere but from the beginning about 98.9% of the time??
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Giggly Googley!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Giggly Googley!
1. Please read the links I posted in my first post. The NEC protocol is described in almost every post.
2. Draw the wave periods described in the protocols posted and than write down·some of the light on times and assign them to the high periods you have drawn. Then write down some of the light off periods and assign them to the low periods. With the nec protocol the information is in the light off time periods.
3. Read the basic stamp manual and the RCTIME instruction. RCTIME is just a stop watch. It measures the time of period from RCTIME execution to a Low/High and/or High/Low transition. There is an example in the basic manule with no resistors or capacitors that measures the contact closure time of a relay. The RCTIME instruction is used in the IR receiver to capture the "1" and "0". In the case of the nec protocol the light is off for approximately 1125 mSec - 560 mSec = 565 mSec for a logical "0" and the light is off for approximatly 2250 mSec - 560 mSec = 1690 mSec. If you take the average of 565 and 1690 (565 + 1690)/2 = 1127.5 or 1128 mSec and use this value·and compare it to what is received by·RCTIME you can set the bits in you receiver to a 1 if greater then and a 0 if less then. Remember the stamp performs time measurement in 2 uSec intervals. 1128 mSec / 2 uSec = 564 RCTIME periods. Use 564 as a threshold. I used 557 in my project.
4. Read the book on remotcontrol for the boe bot.
5. The·wacko time values are either the "Repeat Code" described in the NEC protocols and / or the time period between "+VOL" periods.
Write· two (2) basic programs. create one to receive four 8bit codes and a second program to receive four 6bit codes. DEBUG out the codes in binary one right under the next and study them. Look for things that change and things that don't change. Also look for bits that are opposite.
The code posted in my project will help solve·some of your issues.
checking:
IF det = 1 THEN checking
PULSIN det, 1, pulse
IF pulse < 1935 OR pulse > 2005 THEN checking 'check for 4000 uSec (3930)/2 = 1965 +/- 30
The above code looks at the detector and if the detector sees no IR light, the code loops back to checking. If the code sees IR light, the code PULSINs the time there is no IR light after the IR light has gone away. I check the period the IR light is off and then the code performs RCTIMEs on all the·24 low periods. There are 24 for the RCA protocol. 4 goups of 6 for a total of 24.
I hope this helps.
SJW
"off" and "off". Which one is supposed to be "on"?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Giggly Googley!
I hope this helps.
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Giggly Googley!