User Tools

Site Tools


info:verifone_tranz_330_hacking

This is an old revision of the document!


VeriFone Tranz 330 Hacking

The VeriFone Tranz 330 is one of those ubiquitous credit card readers you see all over the place.

Looks like it's a Z80 based board. Inside, it's all 5V, but it has a voltage regulator so you can plug a 7.5V-9V AC Adapter into it.

Inside, it's two pieces. There's the bottom board (the motherboard), that has all the intelligence, and a top board with all the peripherals on it, like an alphanumeric display, a keypad, a piezo speaker, and the mag stripe reader.

Conveniently, the top board and bottom board are connected through a .1“ spaced header. This makes it easy to hack.

Motherboard

I suppose I could flash some Z80 machine code onto that EPROM? But really, why bother? I can replace this board completely with some AVR chips _and_ have room left over for a bunch of batteries.

Upper Board

The upper board seems to be just peripherals for the bottom board, all conveniently accessible through a 1×20-pin female header block.

There's a VFD Display with controller chip, a 4×4 button pad, a speaker, and a mag stripe reader. I expect to be able to control all of these through the header block.

The Controller Chip seems to be a simple serial shift-register controlled thing.

I expect the button pad will be a simple 4 row, 4 column matrix. I expect 8 of the pins on the header will be for the button pad.

I expect one of the pins will be to the piezo buzzer.

Probably one pin for the mag stripe reader too?

That leaves 5 pins unaccounted for.

Header Block Pinout

Pin  1 - Row 1 of the keypad
Pin  2 - Row 2 of the keypad
Pin  3 - Row 3 of the keypad
Pin  4 - Row 4 of the keypad
Pin  5 - Column 4 of the keypad
Pin  6 - Column 3 of the keypad
Pin  7 - Column 2 of the keypad
Pin  8 - Column 1 of the keypad
Pin 13 - /POR on the OKI display chip.  Set this low for 
         200ns to reset the chip.
Pin 14 - DATA on the OKI display chip.
Pin 15 - SCLK on the OKI display chip.
Pin 16 - +5V for the board.
Pin 18 - Speaker
Pin 20 - GND for the board.

Display

Thing thing has an awesome 16 character 16-segment VFD display with a OKI C1937-01 display driver.

It's a pretty standard shift register thing to get data into it, except that it reads DATA when SCLK goes _LOW_ instead of HIGH. Also, there's no LATCH. You have to be very careful about clocking it data, I guess?

To write to the display, you clock in “00” followed by 6 bits of value. 0x00 is ”@“. Actually, you can use ASCII values, sent through a “if (val > 63) val -= 64;” filter.

Power Consumption: OKI + VFD == 55-60mA

API

Okay, so I have a pretty simple API in place now..

  • resetOki - Resets the controller IC
  • setPosition - Sets the cursor to a certain position.
  • writeChar - Takes an ASCII character, displays it on the screen.
  • setBrightness - Sets the duty cycle (brightness).
  • printString - A generic print that prints a series of letters on the screen.
  • cyclon - Make a character go back and forth across the screen.

Still needed:

  • Fade special effect (just calls setBrightness at a specified rate).
  • Scroll special effect. Scroll a message across the screen at a specified rate and direction.

Keypad

This looks like a standard matrix keypad. To read, you just activate the columns one by one, and see which (if any) of the row pins light up. Pins 1-8 of the header are the keypad.

Tie this to a timer interrupt, and you'll always have an uint16_t with the active buttons listed in it. (Er.. Overly complex. Just poll it when you need it.)

Speaker

A Piezo Buzzer, connected to pin 18.

Mag stripe reader

Man, NO idea. This is utter magic to me.

Is it a high and low value? Does it need an op-amp? There are a bunch of op-amps on the board. Maybe one of them?

How is data encoded?

info/verifone_tranz_330_hacking.1218944164.txt.gz · Last modified: 2008/08/16 23:36 by tomgee