|Re: Ir ... I have an HP Ir question ... |
Message #6 Posted by James M. Prange on 5 June 2003, 8:48 p.m.,
in response to message #5 by Christoph Giesselink
This isn't correct, you can't compare the 416us (2400 baud) bit time of
the Serial InfraRed protocol with the 427us _half_ bit time of the HP
REDEYE HP82240B printer protocol. Both protocols use a complete
Apparently we basically agree on a lot of this, but perhaps I don't
understand the definition of "baud". I think of "baud" as "bits per
second" or "1/bit time". By "effectively about the same as 600 bps
RS-232", I meant that either would send about the same number of bytes
per second. The comparison was intended to be a very rough one.
For the RedEye encoding used for the 82240A/B: "A bit time is defined as
precisely 28 cycles of an exact 32768 Hz reference, about 854.5
microseconds." Thus, slightly over 1170 bits per second. A 1-byte frame
consists of a "start bit", which is 3 half-bits, plus 4 error correction
bits, plus 8 data bits, for 27 half-bit times. A delay of at least 3
half-bit times is needed before the next frame begins. Thus, there are
at least 30 half-bit times, or 15 bit-times, per 1-byte frame. So
15*28=420 cycles of a 32768 Hz reference, or about 12.8 ms, is needed to
transmit one byte. Looking at it another way, 32768/420 yields slightly
over 78 bytes per second. Of course, the operating system will no doubt
add delays because it has a lot of work to do, but perhaps 78 bytes per
seconds might be achieved within bursts. Surely we can expect each
individual byte to be transmitted in about 1/78 second.
For 2400 bps RS-232, a bit-time is of course 1/2400 second, or about 417
microseconds. A 1-byte frame (sending from an HP 48 series) is 1 start
bit, plus 8 data bits (or 7 data bits plus 1 parity or pseudo-parity
bit), plus 2 stop bits, and a 3/16 (0.1875) bit-time delay is added
before the next frame can begin. Thus, 11.1875 bit-times (about 4.66 ms)
are needed for each byte. Looking at it another way, 2400/11.1875 yields
slightly over 214 bytes per second. Of course, when using a file
transfer protocol, numerous delays are involved, so you can't expect to
achieve an average of 214 bytes per second as the transfer rate. But
when using XMIT, without transmit pacing, I've experimentally found that
a 48 really does transmit at about the theoretical maximum rate.
Of course the 48 doesn't allow for 600 bits per second. But if it did,
then the maximum rate would be about 54 characters per second.
Randy though about the HP17B, HP17BII, HP18C, HP19B, HP19BII, HP27S,
HP28C, HP28S, HP41 with Ir printer module, HP42S calculators (hopefully
I forgot none) which all only can send data in the HP REDEYE HP82240B
printer and not the Serial InfraRed protocol.
Sorry, I didn't read Randy's mind, but just what he'd actually written
in his post. What came to my mind was the 48 series, where data and file
transfers are routine, and I've read that someone has very successfully
used a relatively simple SIR to RS-232 adapter, without any need to
connect a cable to the calculator.
Even if what I've written doesn't help Randy, perhaps it will help
others. Not having to connect a cable might be sufficient compensation
for having to use 2400 bps instead of 9600 bps, particularly for short
transfers. Apparently, HP felt that this was the case for transfers
between two 48 series calculators.
Of course a RedEye to RS-232 adapter could be built, but it would be
considerably more complicated than an SIR to RS-232 adapter.