[sci.electronics] Data formats for IR remote controls??

bkoball@cup.portal.com (Bruce R Koball) (11/08/90)

I'm looking for info on the data format and protocols used by TV 
remote controls. The goal is to interface to the control devices 
(wobble sticks, touch boards, etc.) used by disabled kids. I believe 
that I've seen info on this topic posted here in the past, but 
unfortunately I haven't got access to archives. Thanks for any help.

Bruce Koball            Motion West         (voice only)  415 540-7503
bkoball@cup.portal.com  2210 Sixth St       (ans machine) 415 548-2450
bkoball@well.sf.ca.us   Berkeley, CA 94710  (fax)         415 845-3946

bender@oobleck.Eng.Sun.COM (Michael Bender) (11/08/90)

In article <35706@cup.portal.com> bkoball@cup.portal.com (Bruce R Koball) writes:
>I'm looking for info on the data format and protocols used by TV 
>remote controls. The goal is to interface to the control devices 
>(wobble sticks, touch boards, etc.) used by disabled kids. I believe 
>that I've seen info on this topic posted here in the past, but 
>unfortunately I haven't got access to archives. Thanks for any help.

check rec.video and ask for the person that has the archive for the
various remote control and edit control formats over there.  Start with
this though.

mike

========== ^S SPEC ==========
>From appserv!sun!newstop!sun-barr!apple!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!mjw06513 Thu Apr 26 19:29:57 PDT 1990
Article 12665 of rec.video:
Path: appserv!sun!newstop!sun-barr!apple!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!mjw06513
>From: mjw06513@uxa.cso.uiuc.edu (Mary Winters)
Newsgroups: rec.video
Subject: Re: VCR Control Specs (Sony and Panasonic)
Summary: Here they are!
Message-ID: <1990Apr27.000803.552@ux1.cso.uiuc.edu>
Date: 27 Apr 90 00:08:03 GMT
References: <1990Apr25.150423.218@ux1.cso.uiuc.edu-> <692@bilver.UUCP>
Sender: usenet@ux1.cso.uiuc.edu (News)
Organization: University of Illinois at Urbana
Lines: 185

In article <692@bilver.UUCP> bill@bilver.UUCP (Bill Vermillion) writes:

>I would appreciate the control-S info.  


You and jillions of other people! My mailbox has been overflowing with
requests for the Control-S info, so I'm going to go ahead and post it
here. I hope it's reasonably clear. If anyone notices any errors or
omissions, please email me and I'll do what I can to correct the problem.

BTW, I'm still looking for some kind soul who would care to share with me
the specs for the Panasonic edit control interface. If you know anything
about them, please don't hesitate to drop me some email. Thanks!



                       Sony Control-S Protocol Specifications

               The following  is a reference guide to using a microcomputer
          to control a VCR equipped with a Control-S port. Apparently there
          is no documentation on the Control-S protocol available from Sony
          (at least, that's what their publications  office told  me when I
          called). Thus,  the following  information is a synthesis of bits
          and pieces obtained from many sources, including the Sony Service
          Manual  for  the  RMT-124  IR  controller,  some net.friends, and
          connecting an  oscilloscope across  the LED  in a  Sony IR remote
          controller and  observing the  signals sent as various buttons on
          the controller were pressed. The timings given may not be exactly
          those  used  by  the  Sony  products,  but  these  have been used
          successfully in controlling a  Sony  SL-HF900  VCR,  so  I figure
          they're pretty close. I make no guarantees of accuracy for any of
          the information contained  in  this  document,  although  I would
          appreciate  hearing  from  you  if  you find any errors contained
          herein. I'd  also  like  to  acknowledge  the  assistance of Paul
          Milazzo (milazzo@bbn.com) for his valuable pointers  in the right
          direction when  I first began to research this topic. Without his
          response to my usenet post, I might never  have figured  all this
          stuff out and gotten my controller program working. Thanks, Paul!



                                Protocol Description

               The Control-S  protocol used  by various Sony video products
          is simply a demodulated (baseband  TTL)  version  of  the signals
          sent  by  the  Sony  remote  controllers  (such  as the RMT-124).
          Another way to think of this is the  Sony remote  controls send a
          40kHz  IR  carrier  signal  which  is  amplitude modulated by the
          Control-S signal. The Control-S command word is 12 bits long, and
          consists of  a 5-bit  device ID  code followed  by a 7-bit button
          code. The control-S control word is preceded by a 2.4 millisecond
          TTL logic-1 pulse (start bit) followed by 0.4 ms of logic-0. Each
          1 bit  in the  control word  is represented  by a  1.2 ms logic-1
          level followed  by a  0.4 ms logic-0 level, and each 0 bit is 0.8
          ms high, 0.4 ms low. The end of  the control  packet is  always a
          TTL logic-0  level, and  the total length of each packet is fixed
          at 45 ms in length. The  bits in  each control  word are  sent in
          increasing  bit  position  order  (i.e. low order bit first, high
          order bit last). As an example,  let's  look  at  the  command to
          toggle the  power on  a SL-HF900.  The device  ID for  the VCR is
          00010, and the button code for the power switch is 0010101. Thus,
          the entire  control word is 000100010101. To send this command to
          the VCR, we first send out a 2.4 ms start bit, and  then send the
          bits  in  reverse  order  (i.e.  101010001000).  We then hold the
          Control-S port  to logic-0  level to  make the  total packet time
          (i.e. the time since the rising edge of the start pulse) equal to
          45 ms. 



                                     Interfacing

               To send commands to your VCR, your computer will need a TTL-
          level binary output port. A standard IBM-PC parallel printer port
          works  well,  as  does  the  binary  output  portion  of  a  data
          acquisition  and  control  adapter  (IBM DACA board). Some people
          have even used a  serial port  (along with  the appropriate level
          conversion circuitry)  to control their VCRs. As long as the port
          you use can send a  TTL-level  signal  (0VDC  =  logic-0,  5VDC =
          logic-1) you  should be OK. Connect the output line from the port
          to a 1/8" mini phone plug, with the  tip carrying  the TTL signal
          and  the  ring  grounded.  A  simple software routine can then be
          written to  toggle  the  status  of  a  bit  in  the  output port
          corresponding to the output line. Ideally, setting the bit should
          cause the line to go high; clearing the bit should cause the line
          to go  low. By  carefully controlling  the pattern and timing the
          commands may be sent to and properly understood  by the  VCR. The
          following pseudocode outlines a routine to send a command through
          a port setup such as that described above:

          begin
          /* send the start bit */
          raise Ctrl-S line to TTL logic-1
          wait 2.4 ms
          lower Ctrl-S line to logic-0
          wait 0.4 ms

          /* send each of the 12 bits in the complete control word out */
          /* the Control-S port one at a time, low order bit first */
          for current_bit = low_order_bit to high_order_bit do begin
              raise Ctrl-S line to logic-1
              if (current_bit is a 1)
                  wait 1.2 ms  /* high duration of a 1-bit */
              else
                  wait 0.8 ms  /* high duration of a 0-bit */
              lower Ctrl-S line to logic-0
              wait 0.4 ms  /* low duration of all bits */
              end

          wait a sufficient time to make the total message duration 45 ms.
          end



                               Additional Information

               The following are some  of the  codes I've  discovered while
          experimenting with the Control-S port software I wrote. Note that
          not all of these commands work with all VCR models.  For example,
          button code  22 causes  the SL-HF900 to eject a tape, but the SL-
          HF400 ignores that command.  If you  come across  any codes which
          are not listed here, I'd appreciate it if you'd send me a list of
          the codes you discover.

          Note: All numbers in the following table are base 10.

                                   Device ID Codes
          1   TV
          2   VTR1
          4   VTR2

                                    Button Codes
          000     1 button 
          001     2 button 
          002     3 button 
          003     4 button 
          004     5 button 
          005     6 button 
          006     7 button 
          007     8 button 
          008     9 button 
          009     10 button/0 button 
          010     11 button 
          011     12 button 
          012     13 button 
          013     14 button 
          020     X 2 play w/sound 
          021     power 
          022     eject 
          023     L-CH/R-CH/Stereo 
          024     stop 
          025     pause 
          026     play 
          027     rewind 
          028     FF 
          029     record 
          032     pause engage 
          035     X 1/5 play
          040     reverse visual scan 
          041     forward visual scan 
          042     TV/VTR 
          045     VTR from TV 
          047     power off 
          048     single frame reverse/slow reverse play 
          049     single frame advance/slow forward play 
          060     aux 
          070     counter reset 
          078     TV/VTR 
          083     index (scan) 
          106     edit play 
          107     mark 



               Well, this ought to  be enough  to get  you started.  If you
          have any questions, or would like to share some new device/button
          codes, I can be reached at either of the following addresses:

          Internet:  UV@f69.n233.z1.fidonet.org  
          FIDOnet:   UV@1:233/69.0

 
--

----- End Included Message -----

======== ^L TALK ==============

>From appserv!sun!newstop!sun-barr!apple!mips!zaphod.mps.ohio-state.edu!samsung!uunet!mcrware!tim Tue Jan 30 08:01:47 PST 1990
Article 11141 of rec.video:
Path: appserv!sun!newstop!sun-barr!apple!mips!zaphod.mps.ohio-state.edu!samsung!uunet!mcrware!tim
>From: tim@mcrware.UUCP (Tim Harris)
Newsgroups: rec.video
Subject: Re: SONY CAMCORDER REMOTE FUNCTION ???
Message-ID: <1494@mcrware.UUCP>
Date: 29 Jan 90 15:39:24 GMT
References: <5020054@hpscdc.scd.hp.com> <2869@cerberus.oakhill.UUCP>
Reply-To: tim@mcrware.UUCP (Tim Harris)
Organization: Microware Systems Corp., Des Moines, Iowa
Lines: 18

 
        This remote is a Control L line which is Sony's control protocol.  There
was an article on the net some time ago giving a brief description of the
electrical characteristics of this protocol and also giving an address to
get the tech manual on it.  There has also been some talk of making a cable
to go from the 5pin Control L output to this sub-mini version.
        The book is found through Sony and is called: "Protocol and Control:
Control L/LF".  You'll need to order it from their parts center,
 
    Sony Corp.
    P.O. Box 20407
    Kansas City, MO 64195
    1-(816)-891-7550
 
        My suggestion on making a cabled remote would be to get the manual
from Sony and find out more about the protocol from it.
 
        Tim Harris (...!sun!mcrware!tim)
 
==========^S Revisited ==============

>From appserv!sun!newstop!sun-barr!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!mjw06513 Fri May 25 05:21:07 PDT 1990
Article 12989 of rec.video:
Path: appserv!sun!newstop!sun-barr!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!mjw06513
>From: mjw06513@uxa.cso.uiuc.edu (Mary Winters)
Newsgroups: sci.electronics,rec.video
Subject: Re: IR Remote Plans - Who Wants 'em?
Summary: They're on their way...
Message-ID: <1990May21.200644.1463@ux1.cso.uiuc.edu>
Date: 21 May 90 20:06:44 GMT
References: <1990May11> <6900008@eola> <3331@serval.oakhill.UUCP>
Sender: usenet@ux1.cso.uiuc.edu (News)
Organization: University of Illinois at Urbana
Lines: 19
Xref: appserv sci.electronics:12384 rec.video:12989


As of this morning, around 50 copies of the IR remote plans have been sent
to everyone who sent me mail requesting them. Check your mailboxes - if you
did not receive your copy, or missed the original post and would like a copy
also, the file has been made available for anonymous ftp from
mrcnext.cso.uiuc.edu [128.174.73.105] in directory /simtel20/txt. The filename
is zapper.zoo. The updated (and corrected) Sony Control-S specs are also in
that same directory under the name sircs.txt.
 
Please send any feedback or comments you may have to the author at the address
listed in the documents, NOT to me.
 
Enjoy!
 

--
uv@f69.n233.z1.fidonet.org
Suffering from PMS (Presentation Manager Syndrome)
 
====== Additional Contact... ================


>From appserv!sun!newstop!sun-barr!decwrl!elroy.jpl.nasa.gov!sdd.hp.com!think!linus!linus!richard!psw Mon Jul 30 20:35:53 PDT 1990
Article 13968 of rec.video:
Path: appserv!sun!newstop!sun-barr!decwrl!elroy.jpl.nasa.gov!sdd.hp.com!think!linus!linus!richard!psw
>From: psw@richard.mitre.org (Phillip Wherry)
Newsgroups: rec.video
Subject: ftp site?
Message-ID: <114857@linus.mitre.org>
Date: 26 Jul 90 17:58:52 GMT
Sender: usenet@linus.mitre.org
Reply-To: psw@richard.mitre.org ()
Organization: MITRE Corporation, McLean, VA
Lines: 13

I recently acquired a Sony SLV-676 VCR, and remembered reading something
on the net a long time ago about a site which had information on the
control-s protocol used by the editing port of these beasts available
for anonymous FTP.  Could someone point me in the direction of this
server?

Thanks very much.

Phil
--
Phillip Wherry
The MITRE Corporation, McLean, VA
psw@mitre.org

======== Better Addresses ==========


>From quintus!unix!Teknowledge.COM!uw-beaver!rice!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!usc!apple!snorkelwacker!spdcc!merk!alliant!linus!linus!richard!psw Tue Aug  7 05:03:06 PDT 1990
Article 14926 of rec.video:
Path: sun!quintus!unix!Teknowledge.COM!uw-beaver!rice!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!usc!apple!snorkelwacker!spdcc!merk!alliant!linus!linus!richard!psw
>From: psw@richard.mitre.org (Phillip Wherry)
Newsgroups: rec.video
Subject: Sony Control-S/Control-L protocol
Message-ID: <115019@linus.mitre.org>
Date: 27 Jul 90 19:25:27 GMT
Sender: usenet@linus.mitre.org
Reply-To: psw@richard.mitre.org ()
Organization: MITRE Corporation, McLean, VA
Lines: 21

Many thanks to all of those who responded to my request for information
on the Sony Control-S protocol.  For others who might be interested
in receiving this information, it is available for anonymous FTP from
mrcnext.cso.uiuc.edu (128.174.73.105) in the video directory.

My VCR (Sony SLV676) also has a 5-pin mini-DIN connector which speaks
the Control-L or LANC protocols.  Ok, I give up:  anyone have info on
this protocol?

One final question, which I'd hoped would be documented in the manual,
but wasn't:  what is the purpose of the EDIT switch?  I'm told to turn
it on when doing a tape-to-tape dub, but given no information on what
it actually accomplishes.  I checked the manual of another [JVC] VCR,
and it was similarly unilluminating.

Phil Wherry

--
Phillip Wherry
The MITRE Corporation, McLean, VA
psw@mitre.org

 
>From newstop!sundc!seismo!uunet!cs.utexas.edu!sdd.hp.com!usc!ucsd!pacbell.com!pacbell!sactoh0!mfolivo Tue Aug  7 05:04:28 PDT 1990
Article 14932 of rec.video:
Path: sun!newstop!sundc!seismo!uunet!cs.utexas.edu!sdd.hp.com!usc!ucsd!pacbell.com!pacbell!sactoh0!mfolivo
>From: mfolivo@sactoh0.UUCP (Mark Newton-John)
Newsgroups: rec.video
Subject: Re: Control-S jacks.... synching Beta decks.... how precise?
Summary: Syncho Edit
         Sony Control-S
Keywords: to what time tolerance?
Message-ID: <3626@sactoh0.UUCP>
Date: 30 Jul 90 03:52:05 GMT
References: <11855@hydra.gatech.EDU>
Organization: Sacramento Public Access, Ca. USA
Lines: 24



Using the Synchro Edit feature to make edits of some of my
SuperBeta tapes, the accuracy of Control-S is much better than the
two hands approach. The time factor is negligible for most consumer
applications.

Remember, you aren't dealing with SMPTE time codes, and uunless
you *need* to do very precise edits, the Control-S Syncho Edit will
send the commands in less than the 0.1 sec time frame.

Frame counts? Well, if you are so concerned, why are you even using
consumer equipment? Anyway, off hand (my guess) frame accuracy is
probably about 3 frames (?????) I never counted, or needed to count
frames.

My experience with Synchro Edit is from using an EDV-9500 ED Beta
connected to a SLHF-860D SuperBeta.


--
(ames att sun)!pacbell! \      Sakura-mendo, CA
           ucdavis!csusac! - sactoh0!mfolivo
                               the good guys!

============================


>From newstop!sundc!seismo!uunet!samsung!uakari.primate.wisc.edu!ark1!nems!oasys.dt.navy.mil!curt Wed Aug 22 21:50:12 PDT 1990
Article 15399 of rec.video:
Path: sun!newstop!sundc!seismo!uunet!samsung!uakari.primate.wisc.edu!ark1!nems!oasys.dt.navy.mil!curt
>From: curt@oasys.dt.navy.mil (Welch)
Newsgroups: rec.video
Subject: Re: Sony Control-L Request
Message-ID: <3077@nems.dt.navy.mil>
Date: 22 Aug 90 20:02:17 GMT
References: <8152@emcard.UUCP>
Sender: news@nems.dt.navy.mil
Reply-To: curt@oasys.dt.navy.mil (Curt Welch)
Organization: David Taylor Research Center, Bethesda, MD
Lines: 61

In article <8152@emcard.UUCP> mat@emcard.UUCP (W Mat Waites) writes:
>It speaks of checking the line to see if you message gets out unmodified
>(paraphrase). Is the signal line similar in operation to Ethernet? Are
>there "collisions"?. The manual is very vague.

Here's my guess as to how it works. (from memory, my copy is
at home)

The serial line is a bi-directional open-collector TTL type buss what
can have multiple controllers on it.  It is like Ethernet in that
multiple stations can try to transmit at the same time, but unlike
Ethernet, you you don't have to stop transmitting when there is
a collision.

The format is a basic 9600 baud, 1 start bit, 8 data bits, and 1 stop
bit. This makes up one word.  Once every frame (1/60 or 1/50 of a sec),
the VCR transmits a block of 8 (or is it 16) words.  (I assume this is
in sync with the video.)

If you want to send a request, you have to wait for the start of the
frame, and transmit in sync with the VCR.  With the open collector
buss, if one station is transmitting +5V (which is logical 0 on this
buss) and another station is transmitting 0V (which is logical 1),
the 0V will win.  This means that someone transmitting a 1 will always
win out over someone trying to transmit a 0.  As you transmit, you
check the value on the buss.  If you try to send a 0, but read back
a 1, then you know that someone else is sending data, and you should
stop and wait for the next frame to try again.  The other transmitter(s)
don't even notice the collision and just keep going.  The commands are
arranged so that the more important ones have more 1's.
 
For example, I think the VCR is normally transmitting all 0's in the
first byte.  All zeros means something like "VCR STATUS".  If no one
requests another type of command, the VCR just constantly transmits
status information.
 
I don't see any easy way to use a serial port on a computer to interface
with this.
 
>Any hints? Or software?
 
Maybe you could do something with a line from a parallel port and a lot
of tricky software.
 

The documentation isn't very clear about all the codes and just what
they mean.  During each 8 byte frame, sometimes the VCR transmits and
sometimes other devices transmits, depending on the commands given, and
the type of devices connected (VCR vs CAMCORDER, vs COMPUTER etc.).
I think it would take a lot of experimentation to determine exactly what
different devices do, and what commands they respond to and what they
ignore etc.
 
They also imply that you can't just send a command once and expect to
work.  They imply it might take 4 frames, so you should transmit
every command 5 times (If I'm remembering the numbers correctly).
 
If someone rigs up a cheap interface and some software for this, I'd love
to hear about it.
 
Curt Welch
curt@oasys.dt.navy.mil
--
Won't look like rain,           Won't look like snow,            | DOD #000007
Won't look like fog,            That's all we know!              | AMA #511250
We just can't tell you anymore, We've never made oobleck before! | MSC #298726