[comp.sys.handhelds] HP48SX Unified Remote Control

ramcte01@ULKYVX.BITNET (NEWS_PERSONALNAME) (02/12/91)

I am posting this for a friend... Since I don't make it onto this newsgroup
very often, please mail source code directly to this account as well as
posting to handhelds. Thanks!


Begin...

I am trying to locate a routine for the hp48sx which would be capable of
transmitting IR commands to a tv.  Has anyone written such code?  I have a
posting by Michiel Niemeijer & Eric Toone regarding controlling RC5 (PHILIPS
equipment) using the 28s.  I could repost this if they are no longer on the
net.  I would greatly appreciate such a routine, or at least guidance on
writing such a routine (necessary hooks etc...).

For those wishing to take up the challenge, here are a few more details about
my specific needs:

     I want my HP48 to be able to transmit Thomson/RCA Unified Remote/Dimensia
ir codes.  RCA ir commands are composed as follows:

     ____      _                               ____
...|    |____| |XXXXXXXXXXXXXXXXXXXXXXXX|____|    |...

       ^    ^  ^ <+-><--+---><+-><--+--->   ^    ^
       |    |  |  |     |     |     |       |    |
       |    |  |  |     |     |     |       |    +- Mark of next
       |    |  |  |     |     |     |       |       transmission.
       |    |  |  |     |     |     |       |
       |    |  |  |     |     |     |       +- Repeat Space = 8 mS
       |    |  |  |     |     |     |          _______
       |    |  |  |     |     |     +- 8 bits (COMMAND)
       |    |  |  |     |     |          ________
       |    |  |  |     |     +- 4 bits (PREAMBLE)
       |    |  |  |     |
       |    |  |  |     +- 8 bits (COMMAND)
       |    |  |  |
       |    |  |  +- 4 bits (PREAMBLE)
       |    |  |
       |    |  +- SYNC = .5 mS
       |    |
       |    +- SPACE = 4 mS
       |
       +- MARK = 4 mS

Namely, a MARK consisting of a logic 1 for 4 mS followed by a SPACE consisting
of a logic 0 for 4 mS, followed by a .5 mS logic 1 SYNC pulse, followed by a 4
bit PREAMBLE and an 8 bit COMMAND.  The PREAMBLE and COMMAND are both
complemented and retransmitted.  Finally a repeat SPACE of 8 mS is inserted
between transmissions.

Where,
                         1mS   ___
A logic bit "1" ==>     ______|   |
                               .5mS

                          2mS        ___
A logic bit "0" ==>     ____________|   |
                                     .5mS

with a carrier frequency of 56.875 kHz (Period = 17.58 uS).  Therefore
transmission lengths are ALWAYS the same (56.5 mSec).  Although the HP uses a
carrier frequency of 32.768 kHz (I think), the HP should still work assuming
it is placed within a couple of feet of the tv/vcr/etc..

The PREAMBLE denotes the device:
     PREAMBLES
===================
TV          0
VCR1        1
VCR2        2
AM/FM       3
etc..

I don't have time to type in all the COMMANDs, but here are a couple for
testing purposes.

    COMMAND (hex)
==================
ON            C5
OFF           C4
MUTE ON       D9
MUTE OFF      DA
CHANNEL UP    D2
CHANNEL DOWN  D1


The possible uses for such a routine and the software that could easily be
built around it is virtually endless.

Couple of simple examples:
   - a single remote for different pieces of equipment simply by changing the
     current keymap.
   - resetting of the tv/vcr time & date after a power failure with a single
     keypress.
   - use of the calculators timer abilities to program shows or to add this
     capability to primitive vcrs.

Although the ir commands for many tvs and vcrs are different, most are easily
accessible.  If someone would be kind enough to provide the machine code to
send a single transmission described above, I would be willing to write some
truly useful programs, as well as provide the remainder of the ir commands.


*** Caution ***

Since it is possible to erase tapes, reinitialize the tv's eeprom to factory
settings, possibly lock something up, etc.,  EXPERIMENT AT YOUR OWN
RISK.  No assurances of performance or usability are neither expressed
or implied.


Aaron D.
===============================================================================
Disclaimer:
   The above in no way reflects the opinions, beliefs, policy, or actions of my
employer, Thomson Consumer Electronics (TCE).
===============================================================================

End...


Rick McTeague
Electrical Engineering Department, Speed Scientific School
University of Louisville, Louisville, KY 40292
(502) 588-7020

RAMCTE01@ULKYVX  (Bitnet)
RAMCTE01%ULKYVX.BITNET@CUNYVM.CUNY.EDU  (Internet)
{akgua,allegra,cbosgd}!psuvax1!ulkyvx.bitnet!ramcte01  (uucp)


I am posting this for a friend... Since I don't make it onto this newsgroup
very often, please mail source code directly to this account as well as
posting to handhelds. Thanks!


Begin...

I am trying to locate a routine for the hp48sx which would be capable of
transmitting IR commands to a tv.  Has anyone written such code?  I have a
posting by Michiel Niemeijer & Eric Toone regarding controlling RC5 (PHILIPS
equipment) using the 28s.  I could repost this if they are no longer on the
net.  I would greatly appreciate such a routine, or at least guidance on
writing such a routine (necessary hooks etc...).

For those wishing to take up the challenge, here are a few more details about
my specific needs:

     I want my HP48 to be able to transmit Thomson/RCA Unified Remote/Dimensia
ir codes.  RCA ir commands are composed as follows:

     ____      _                               ____
...|    |____| |XXXXXXXXXXXXXXXXXXXXXXXX|____|    |...

       ^    ^  ^ <+-><--+---><+-><--+--->   ^    ^
       |    |  |  |     |     |     |       |    |
       |    |  |  |     |     |     |       |    +- Mark of next
       |    |  |  |     |     |     |       |       transmission.
       |    |  |  |     |     |     |       |
       |    |  |  |     |     |     |       +- Repeat Space = 8 mS
       |    |  |  |     |     |     |          _______
       |    |  |  |     |     |     +- 8 bits (COMMAND)
       |    |  |  |     |     |          ________
       |    |  |  |     |     +- 4 bits (PREAMBLE)
       |    |  |  |     |
       |    |  |  |     +- 8 bits (COMMAND)
       |    |  |  |
       |    |  |  +- 4 bits (PREAMBLE)
       |    |  |
       |    |  +- SYNC = .5 mS
       |    |
       |    +- SPACE = 4 mS
       |
       +- MARK = 4 mS

Namely, a MARK consisting of a logic 1 for 4 mS followed by a SPACE consisting
of a logic 0 for 4 mS, followed by a .5 mS logic 1 SYNC pulse, followed by a 4
bit PREAMBLE and an 8 bit COMMAND.  The PREAMBLE and COMMAND are both
complemented and retransmitted.  Finally a repeat SPACE of 8 mS is inserted
between transmissions.

Where,
                         1mS   ___
A logic bit "1" ==>     ______|   |
                               .5mS

                          2mS        ___
A logic bit "0" ==>     ____________|   |
                                     .5mS

with a carrier frequency of 56.875 kHz (Period = 17.58 uS).  Therefore
transmission lengths are ALWAYS the same (56.5 mSec).  Although the HP uses a
carrier frequency of 32.768 kHz (I think), the HP should still work assuming
it is placed within a couple of feet of the tv/vcr/etc..

The PREAMBLE denotes the device:
     PREAMBLES
===================
TV          0
VCR1        1
VCR2        2
AM/FM       3
etc..

I don't have time to type in all the COMMANDs, but here are a couple for
testing purposes.

    COMMAND (hex)
==================
ON            C5
OFF           C4
MUTE ON       D9
MUTE OFF      DA
CHANNEL UP    D2
CHANNEL DOWN  D1


The possible uses for such a routine and the software that could easily be
built around it is virtually endless.

Couple of simple examples:
   - a single remote for different pieces of equipment simply by changing the
     current keymap.
   - resetting of the tv/vcr time & date after a power failure with a single
     keypress.
   - use of the calculators timer abilities to program shows or to add this
     capability to primitive vcrs.

Although the ir commands for many tvs and vcrs are different, most are easily
accessable.  If someone would be kind enough to provide the machine code to
send a single transmission described above, I would be willing to write some
truely useful programs, as well as provide the remainder of the ir commands.

P.S.
Since it is possible to erase tapes, reinitialize the tv's eeprom to factory
settings, possibly lock something up, etc.  Perform the above at your own risk.
No assurances of performance or usability are neither expressed or implied.

Aaron D.
===============================================================================
Disclaimer:
   The above in no way reflects the opinions, beliefs, policy, or actions of my
employer, Thomson Consumer Electronics (TCE).
===============================================================================

End...


Rick McTeague
Electrical Engineering Department, Speed Scientific School
University of Louisville, Louisville, KY 40292
(502) 588-7020

RAMCTE01@ULKYVX  (Bitnet)
RAMCTE01%ULKYVX.BITNET@CUNYVM.CUNY.EDU  (Internet)
{akgua,allegra,cbosgd}!psuvax1!ulkyvx.bitnet!ramcte01  (uucp)

diamant@hpfcbig.SDE.HP.COM (John Diamant) (02/14/91)

>      I want my HP48 to be able to transmit Thomson/RCA Unified Remote/Dimensia
> ir codes.

>    - a single remote for different pieces of equipment simply by changing the

> Although the ir commands for many tvs and vcrs are different, most are easily
> accessible.  If someone would be kind enough to provide the machine code to
> send a single transmission described above, I would be willing to write some
> truly useful programs, as well as provide the remainder of the ir commands.

Great!  As far as I know, no one has done this yet.  Sorry I can't answer your
IR question, but I would like to suggest that you write the program to
work as a learning remote, rather than hardcoded with a particular command
set (maybe in addition to a built in command set -- to access features not
on a particular remote, but on the receiving unit).  Ideally, the program
would be modular enough that the IR routine could be added to several
different types of remote control programs (the IR receiver/generator
portion may be the only part that must be written in ML for performance).


John Diamant
Software Engineering Systems Division
Hewlett Packard Co.		ARPA Internet: diamant@hpfclp.sde.hp.com
Fort Collins, CO		UUCP:  {hpfcla,hplabs}!hpfclp!diamant

This response does not represent the official position of, or statement
by, the Hewlett-Packard Company.  The above data is provided for informational
purposes only.  It is supplied without warranty of any kind.  I do not work
for the calculator division, even though I do work for HP.  I just happen
to be a 48SX user.

P.S.  This note is also emailed to the account as requested.

amonson@wombat.ee.uidaho.edu (Paul Amonson) (02/16/91)

I agree, a learning remote would much better than a fixed hard coded one.  If
someone has the specs for the IR input and IR output ports I would attempt to
write the program!  At 2 MHz in machine code it should be fast enough to sample
accuratly.




Paul Amonson
amonson@wombat.ee.uidaho.edu  (amonson@129.101.102.3)