M200 interfacing

From: Frank McConnell <fmc_at_reanimators.org>
Date: Sun Dec 29 12:24:01 2002

Sellam Ismail <foo_at_siconic.com> wrote:
> 80 characters x 11 bits = 880 bits / 9600 bps = .092 seconds. Should be
> no problem. I'll see what the manual says about timing between card
> reads.

Except that, if you want to read binary cards (trust me, you will --
those binary cards are contain boot and other code for these
machines), you need to do all 12 rows. 80 columns x 12 rows = 960
bits / 8 bits per byte = 120 bytes per record.

OK, now as for sending that over a serial line, remember that serial
I/O adds framing information , so it becomes 10 bits per byte supposing
8 data bits, no parity, 1 start and 1 stop bit. So 1200 bits at 9600
bps = 0.125 second. You probably want to do at least a simple
checksum of the data for each record and send that too (so the
receiver can verify, send ack or nak, and the sender can retransmit on
receipt of nak or just non-receipt of ack).

You've got RAM in the Apple, use it as a buffer between the card
reader and the serial port. 16KB would hold 136 full card images,
which you might think would be more than enough time to tell the
reader to stop picking cards and actually have it stop. So, when the
buffer's fullness gets above some threshold, stop picking cards until
it gets below some lower threshold.

You may be able to do some cheap buffer- and serial-time savings by
either run-length encoding or just keeping a record length and not
storing or sending trailing blank (unpunched) columns. Depends on
your data. I think I would go for this last.

-Frank McConnell
Received on Sun Dec 29 2002 - 12:24:01 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:34:41 BST