Connecting Futaba GP1183A01B VFD Display to Raspberry Pi



To connect a 16x2 character display to my Raspberry Pi, I chose the VFD Futaba GP1183A01B. How is he good? Firstly, it is an endangered species, giving a “warm tube” luminescent light of a pleasant green color (it is really green, this is something the camera is lying about). Secondly, it uses a serial protocol for communication, which means that it can be connected with just three wires, without using any additional devices, and communication with it will go through / dev / tty. Thirdly, he needs just 5 volts of power, which are already there (and even enough, though not always).

I connected it two years ago, but I sat down to write an article now - the signal wire fell off the display and at the same time I decided to talk about this display. Still, it is easily connected. And they are still for sale!

Connection to Raspberry



We connect through the GPIO pins located at the top left of the board. We are interested in the top row - the first pin (+ 5V), the third (GND) and the fourth (TX). By standard numbering, these are 2, 6 and 8 pins.
Power on pin + 5V is enough end-to-end. If you use video rather than HDMI on the Raspberry Pi, VFD will not turn on. You can bring + 5V separately, for example, from the USB hub from which the Malinka is powered - take the red and black (GND) wires (cut off the unnecessary USB cable), not forgetting to close the black one with GND from GPIO. I have done so now.

Connect to VFD



The top of the display has a series of solder pin holes. We are interested in the left three in the right block of six holes. The first (+ 5V), the second (RX), the third (GND). Solder!

Configure VFD



There are four jumpers on the back of the display, allowing you to adjust the speed and mode of operation. We close jumper J1 so that the speed is 9600 baud. In principle, it pulls 115200, but there interference begins to break through.

Kernel tuning

The kernel messages that we use are used to output kernel messages at boot (surprise!). To see them, you need to configure the speed of the serial console - in the file /boot/cmdline.txt you need to define the parameter console = ttyAMA0,9600. The file may be like this:

dwc_otg.lpm_enable=0 console=ttyAMA0,9600 kgdboc=ttyAMA0,9600 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait


Userland setup

So that after loading nothing is displayed on VFD without our participation in the / etc / inittab file, you need to comment out the last line:

#T0:23:respawn:/sbin/getty -L ttyAMA0 9600 vt100


Fan

To display the screen, you can use the echo command, for example:

echo "Privet, Habrahabr!" > /dev/ttyAMA0


The screen capabilities are quite large, you can read the specification ( search in Google ), but I will give some commands that I use myself:

clear the screen and place the cursor in the upper left corner
echo -en "\x0C" > /dev/ttyAMA0


minimum to maximum brightness
echo -en "\x1F\x58\x01" > /dev/ttyAMA0
echo -en "\x1F\x58\x02" > /dev/ttyAMA0
echo -en "\x1F\x58\x03" > /dev/ttyAMA0
...
echo -en "\x1F\x58\x08" > /dev/ttyAMA0


turn off the display
echo -en "\x1F\x28\x61\x40\x00" > /dev/ttyAMA0


turn on the display
echo -en "\x1F\x28\x61\x40\x01" > /dev/ttyAMA0


More Fan

You can use LCDProc to display all kinds of information on this screen, for example, RaspBMC can display information about the current menu item and playback status through LCDProc. Setting up on RaspBMC required writing a driver for LCDProc, but it was not difficult at all (four lines were removed to draw a frame from the standard text driver) if possible, I will write about this later.



[update] uploaded video from RaspBMC


Unfortunately, the hands have not yet reached the Russian language, but it is there (CP866)!

Also popular now: