Puyb's blog

Arduino et VFD Futaba

Olimex OLIMEXINO-32U4

I just bought an Arduino. Or to be more specific, an enhanced clone of the Arduino Leonardo : the Olimex OLIMEXINO-32U4. This board features, unlike the original Leonardo board, a better power that allows it to run on 5v, 3.3v, or on li-ion battery. It also sports two leds, a button and an extension port.

I plan to use it with a bluetooth module that runs only on 3.3v, so the ability to power this arduino on 3.3v will ease it !

For my start project, I want to try to use an old Futaba GP1006C02 VFD graphic display. It’s a mid 90’s part that I collected in a garbage and that was lying on a shelf since. I wondered if I could use it to make a status display for my home server.

Hardware:

My workbench

The VFD is addressed like a RAM. So I had to use a lot of I/O to handle it. 13 address lines, 8 data bits and 4 control lines. Problem, I only have 23 I/O available on the arduino (20 on the headers and 3 more on the extension port or the ICSP header). The ATMega 32U4 normally provides 26 I/O but two are used by the arduino firmware to drive the USB RX/TX leds and the last one is used by the button. I don’t want to modify the Arduino board and software to use them so I’ll had to find a way to wire everything.

First obvious trick, the /CS and /MERQ signals can be driven by the same I/O according the VFD datasheet. Second trick, I don’t need read access to the display memory, so I can wire /RD to 5v. But I still need 2 I/O. So I decide to use a binary counter to generate the address. I find in a drawer a good old 4029 4 bits binary/décimal counter/decounter. With just a reset and pulse signals, I can drive 4 address bits.

Now, I want an easy way to wire everything. I don’t want to make a custom PCB and just use a stripboard. To simplify wiring, I decided to not try to wire everything in an ordered way. The software will have to convert addresses and datas to the right ports and I/O. But I found a way to not shuffle things too much. I managed to stick the datas to the 4 higher bits of ports B and F, and the address to the 7 available bits of port D and the 4 bits of the counter. I decided to put the 4 bits of the counter to A3 through A7. This can seem odd, but when you look at the way the addresses map to pixels in the VFD datasheet, mapping at this address allow me to push 16 continuous columns of 8 pixels. The display will be sliced in 8 rows of 16 blocks of 16×8 pixels.

The control bits (/CS, /WR, CP and PL) are wired to nearest I/O available. Thank to the use of the counter, I have 2 I/O available. Maybe I could wire the /RD signal after all 😉

Not too messy for so many I/O!

Testing the counter !

Arduino software :

There’s some small challenges with the software. The first one is to map a data byte to the 4 higher bits of the port B and F. Odd bits go to port F and pair bits go to port B.

There maybe an optimized way to do it, but the only way I find was to do it bit by bit. Mask the bit, shift it to it’s position, and repeat… Performance is not really an issue actually, so I’ll stick with this…

The software takes commands over USB serial link. The first byte is the command byte. If the higher bit is 0, then bits 6 to 4 encode the row, and bits 3 to 0 encode the column. The control byte is then followed by 16 data bytes that correspond to the 16 columns of the addressed block.

If the first bit is 0, then the commands are :

Bit

Command

7

6

5

4

3

2

1

0

1

0

0

0

0

0

page

Read / Write page

1

0

0

1

0

0

page

Displayed page

1

0

1

0

luminosity

Set luminosity

1

0

1

1

0

0

0

0

Blank

1

1

0

0

0

0

0

0

Full on

1

1

0

1

0

0

0

0

Test Pattern (/\/\/\/\)

1

1

1

0

0

0

0

0

Test animation (sliding ////)

1

1

1

1

0

0

0

0

Not used

The test pattern (command 0xd0)

Computer software:

I wrote a small python script that sends an hard coded image to the VFD :

Conclusion:

The python script send this image to the VFD !

I’ve had fun playing with this, but unfortunately I think I won’t use this VFD as a side display for my home server. First reason is that it is really greedy. It use ~2A @ 5v, that’s 10W. I can use a small color LCD that will be nicer and more power friendly ! And the second reason is that it make high pitched noise.