IntroductionI bought a couple of Noritake Itron CU24025ECPB-W1J from Surplus Gizmos - our local surplus store. It is a character display similar to popular LCD displays based on Hitachi HD44780 LCD controller. While the HD44780 only supports the Motorola 6800 interface, this VFD also supports the Intel 8000 interface, which makes it simple to connect to my MiniMax8085 SBC, all that's needed is an I/O address decoder. VFD Hardware InterfaceConsiderations
Initially I've used the comparator as shown on figure (2) on the right. This is a simple approach and it has a couple of advantages: The I/O address can be set to any number using 7 DIP switches. And it does the complete I/O address decode, so that no I/O port aliasing occurs. This approach worked fairly well, but eventually I switched to using the 74LS138 decoder. I wired it as shown on figure (1) on the right. The I/O decoder has 8 outputs and so it can be used to decode addresses for 8 different devices. I've chosen this since I also wanted to decode the I/O address for a keypad controller (more on this later). The drawbacks are that the addresses are pretty much predefined by the way 74LS138 is wired, and it doesn't perform complete I/O decode, and so there is an I/O port aliasing. In my case, it uses ports 0x38 and 0x39 for the VFD, but ports 0x3A-0x3F also will address the VFD. The final schematic of the MiniMax8085 to VFD connection is shown on the left. The 5V power, ground, and the data signals AD0-AD7 connect directly to the VFD power, ground, and the data DB0-DB7 signals respectfully. The address line A0 is connected to the RS (register select) signal of the VFD, so that the lower address bit determines whether a command (A0 == 0) or data (A0 == 1) is being written to the VFD. An 74LS138 I/O decoder and two 74LS32 2-input OR gates are used for I/O decode and generating /WR and /RD signals to the VFD. It works as follows:
Programming the VFDInitializationPrior to displaying text, the VFD display needs to be initialized by sending the following commands (see the Hitachi HD44780 LCD controller Wikipedia page for more details and options):
Displaying the textOnce the display is initialized, the characters can be written to the display by sending their ASCII codes to port 0x39. After writing a character, the cursor automatically advances to the next position on the display. If needed, the cursor can be moved to a different position using "Set DDRAM address" command. This command's code is 0x80 + DDRAM address. The DDRAM addresses start from 0 for the first row (row 0), and from 0x40 for the second row (row 1). For example:
Other VFD commands such as "Clear display" and "Display on/off control" can also be used. Using programmable character generatorThe VFD provides eight user-programmable characters. These characters have ASCII codes from 0 to 7. The VFD controller contains Character Generator RAM (CGRAM) that holds the bitmaps for the user-programmable characters. The CGRAM can be programmed by sending "Set CGRAM address" command. This command's code is 0x40 + CGRAM address. Here are the "Set CGRAM address" commands with corresponding addresses for each of the user programmable characters:
After issuing "Set CGRAM address" command, the character bit map can be set using port 0x39. After writing each byte the CGRAM address is automatically incremented by the controller. Here is an example of programming a smiley face character: Character bitmap:
Commands to program the character in MON85:C> o 38 80 - set DDRAM to the first character C> o 39 00 - print the first programmable character C> o 38 40 - set CGRAM to the first programmable character C> o 39 00 \ C> o 39 0A | C> o 39 00 | C> o 39 00 } Character data C> o 39 11 | C> o 39 0E | C> o 39 00 / C> o 39 00 - no underline C> o 38 81 - set DDRAM to the correct position because modifying CGRAM moves the cursor |
Home > Michael's Projects >