why do i exist

Hand crafting a digital interface by learning the device's respective pin out

Different plugs and different cable means you cannot plug one device to another, right? Not necessarily. Plug adapters exist to solve this exact problem. You can use an adapter to plug something awesome from the 80s like the IBM Modem M keyboard, which uses the old AT plug, and use it in a workstation that only takes PS/2. Your machine only has USB for keyboards? Use a PS/2 to USB adapter in-line with the AT to PS/2. So the plug shape and size is no matter.

But how far can this go? In this project born from necessity, we will see as long as the devices use the same protocol, which are actually nowhere as diverse as the zoo of connectors that are out there, they can talk. In fact, before USB, Ethernet, and 802.11 ruled the day, RS-232 was pretty much the universal way digital devices talk to one another. Terminal at Norad in War Games that the heros used to talk to WOPR? RS-232. The Acoustic Coupler that they literally plugged the phone headset on? RS-232 serial Modem (same setup was shown being used inside the Matrix.) As with all the production hardware, they keep using what is reliable rather than chase the hot and new, so if what you do matters, serial communication is still useful to this day.

9 Pin RS-232 connector pinout
original image

Yes, Mr. CCNA, serial is how you telnet into your nice routers. Terminal redirection is so useful and cool with a TRS-80 Model 100 inside a data center talking to servers directly without touching the network, programmer's access indeed. This is spinal tap, digital style.


The Verifone Tranz 330 - A tinkerer's dream device

Verifone Tranz 330 Credit Card Terminal

Originally designed to process credit card transactions at retailers. You slide your mag stripe credit card, the merchant inputs the sale amount, a slip prints out for you to sign, and the fund gets transferred. You have probably seen it at a restaurant or maybe even used it yourself.

Software wise this thing is as simple and as modifiable as can be. You will see versions of it in use even after the PCI security standard made it obsolete for its original intended purpose. The code it runs is called TCL (Terminal Control Language), Verifone's assembly language for this range of devices. If you take the time to read the documentations and learn its assembly, it is programmable right on the terminal itself, the knowledge to do so is available for free. The system is open sourced, as in speech (and as far as the information and tools are concerned, as in beer too.) The only thing you pay for to hack this device is the trivial cost of obtaining the terminal hardware itself. Inputting a program in assembly into a terminal using 10-key is more fun than texting on a Nokia flip phone I tell you. People with Altair programming experiences (most of them are billionaires at this point, I am sure Bill Gates and Paul Allen qualify both on the experience count and the money) will know the fun of flipping bits on 8 blade switches to input a byte into memory.

Of course, you could buy something called ZoneTalk or TCLOAD, which is probably a higher level compiler or some such for banks to buy so their BIS programmers with their cushy salary will not have to endure the pain and pleasure of messing with assembly...

Back to its fun uses - you will see it being sold this day as a magnetic time card system among other things.


A card

(Perhaps a door entry security or fancy vehicle start system. Okay, so things like getaround use an iphone now to talk to the BCU. We will get to those in a future article here.) Replacing the old clock punch time card regime companies used to log employee attendance. (okay, these days there are no excuse not to use biometric finger print systems, which PANG Industries does sourcing consultation, installation, programming, and training by the way.)

Biometric Time Card System

At any rate, using the Tranz's internal real time clock, ability to read and log mag card, accept numeric keypad input, and generate pin out, or even more awesomely, to dial the data out to a remote system using POTS. A competent programmer can build an awesome system. (What the people who sell the Tranz for time card will not tell you, you actually don't need to buy all those blank mag cards. In California at least, our Driver's Licenses have mag stripes on the back, and protocol being most valuable when they are compliant, the Tranz's mag reader can read that too). What a free and neat way to ID your employee huh. Swipe your DL on the terminal, and it logs your work time.

Contact me if you are interested in modifying the Tranz for your own use. Because if I start showing you how to turn a 10 buck surplus 'e-waste' (there is no such thing) into a 500 dollar commercial product here, I would be taking hard working people's well earned money out of their pocket, whist saving their wealthy client literally just a couple bucks a day.

All while leaving me with not a penny, and still have to front the cost of running the server. In short, nobody wins if I spill the beans.


So here is the story, the receipt printing part, the companion receipt size Dot Matrix, the Printer 250, with its many mechanical moving parts, died beyond repair. Newer similar devices use thermal print strips, without the back and forth motion the pin heads would use in a dot matrix. Those cost a bit more, are faster, but the paper cost more and they cannot generate an impact carbonless carbon copy, which is a neat built in safety feature against fraud. (The merchant's copy can be forensically matched with the customer's copy because each dot was punched at the same time by the same pin, it is near impossible to fake something like that. We recently have a case where we needed to show one pair in court.

This very sane rationale for using Dot Matrix or Daisy Wheel or old style typewriters in this day and age will be discussed in another article.)

Back to the Printer 250, so it died, and a replacement is not trivial cost wise as these things go. But I have the full documentation on hand for the Tranz and the Printer 900. Which told me it is just a regular printer, with a fixed character set, which despite its smaller size, runs on a regular serial interface.

Okay, so there is a reason why the Parallel port on a PC is synonymous with Printer Port. Almost all printers that are not USB or WiFi are Parallel. The plugs are different, and the protocol is different. Remember what I said earlier about how everything used to use serial, not just the production, specialized devices like today? Welcome to my childhood friend: the Apple II, and arguably the best consumer dot matrix printer ever made: The Image Writer and the Image Writer II.

/pang/imagewriter/iw1.jpg
The original image writer
/pang/imagewriter/iw1top.jpg
The original image writer as viewed from the top
/pang/imagewriter/imagewriterii.jpg
The slightly improved, just as reliable Image Writer II

Being made in the late 1970s and early 1980s, these things did not have the luxury of IEEE 1284 since it wasn't widely adopted yet. Besides they run too slow to require anything with that much bandwidth. So the engineers at Apple used RS-232.

The Tranz uses a 8-pin Din for printer output,

Eight pin
original image

Connector pinout

  1. +5V limited current
  2. +5V limited current
  3. RTS
  4. CTS
  5. RXD
  6. TXD
  7. GND
  8. Cash Drawer Kick, +24 VDC @ 300 mS
original image

Interestingly, Pin#8 is a 24V Drawer Kick, presumably this little terminal is even capable of being programmed to function as a cash register as well. Take that Clover.

The Imagewriter, on the other hand, uses a 25pin D-Sub.

Apple ImageWriter Serial pinout
Pin Name Dir Description
1 GND --- Ground
2 SD --> Send Data
3 RD <-- Receive Data
4 RTS --> Request to send
7 GND --- Ground
14 FAULT- --> False when deselected
20 DTR <-- Data Terminal Ready
original image

Direction is Printer relative Computer.

Wasn't hard to figure out which pin goes where, it's just like trying to hook up the old camcorder to the old vcr to the old TV, just with soldering iron and individual wires and pins, that's all.

Verifone Printer 250 pinout
original image
Tranz 330 to Imagewriter II serial printing connection

So if we can use the Image Writer to print credit card receipts, why not also make a cable for the Image Writer II?

The II actually uses a different connector despite also being serial. It is a 8-pin miniature DIN.

8-pin miniature DIN connector (female)
Pin no. Symbol Signal Direction Signal Name
1 GND - Ground
2 TXD OUT Transmitted data
3 RXD IN Receive data
4 RTS OUT Request to send
5 CTS IN Clear to send
6 DSR OUT Data set ready
7 DTR OUT Data terminal ready
8 DCD IN Data carried detect
E CGND - Frame Ground
original image
8 pin              25 pin

DTR 1 ---------   *- 5 CTS * 5,6,8 are jumpered
                  *- 6 DSR   together at db25 end.
                  *- 8 DCD

DSR 2 ---------     20 DTR
TD- 3 ---------      3 RD
SG  4 **-------      7 SG
RD+ 8 **
** 4 and 8 are jumpered
together at 8-pin end.

RD- 5 ---------      2 TD
                     Connector SHIELD or pin 1 (PG)
                     connected to cable shield on
                     DB25 end. (Only one end of the
                     cable shield needs to be
                     connected to the connector shield.)
original image

Mac name RS-232 name Mac DIN-8 Pin# PC DB-9 Pin# PC DB-25 Pin #
RxD- RD 5 3 2 TD
TxD- TD 3 2 3 RD
Ground SGND 4 5 7 SGND
RxD+ DCD 8
HSKi CTS 2 7 4 RTS
HSKo RTS 1 8 5 CTS
original image

Mini DIN-8 Macintosh Serial Port Pinout

       /------###------\        1 HSKo      Output Handshake
     /        ###        \                  (Zilog 8530 DTR pin)
   /                       \    2 HSKi/CLK  Input Handshake *OR*
  /     [|]   [|]    [|]    \                External Clock
 /       8     7      6      \  3 TxD-      Transmit Data (-)
|                             |
|                             | 4 Ground    Signal ground
|     ===     ===     ===     |
|      5       4       3      | 5 RxD-      Receive data (-)
|                             |
|                             | 6 TxD+      Transmit Data (+)
 \----+    ===   ===    +----/
  \###|     2     1     |###/   7 N/C       (no connection)
   \##|                 |##/
     \|                 |/      8 RxD+      Receive data (+)
       \------###------/
              ###
original image

Same methodology, diffent model variant.

Tranz 330 to Imagewriter II serial printing connection

What might be of more of an interest to the reader who just happened to come across an Imagewriter and wanted to have fun with it. Being a standard serial printer, all you really needed is an off the shelf adapter / cable and an available serial port on your PC (have tried unsuccessfully to use a USB-Serial adapter.) The driver to use with it is the model C. Itoh 8510, which should be in the Windows driver repository as shipped. At our lab we have tested this setup to work on a desktop.

blue green yellow cyan green blue purple yellow red green orange green red orange

Views: 267

Replies coming soon