Library for Princeton PT6301 VFD controller. Used in Futaba CIG VFD tubes.

This is a library for the Princeton PT6301 VFD controller. The controller is used by Futaba 'Chip In Glass' (CIG) VFD tubes. The device supports upto 20 Grids of 5x7 matrix segments for 2 rows of characters (A and B). It also supports 1 additional segment for 2 rows (A and B). In addition to the internal ROM character set, the PT6301 also supports 16 User Defined Characters.

The PT6301 has an SPI Serial interface. Control data consists of an 8-bit command and one or more data bytes. Command and data are sent LSB first and latched on rising edge of CLK. Idle CLK is high. Data address is auto incremented. Same for Icon and UDC addresses. The commands and data are transmitted during CE low and latched on rising CE edge.

The PT6301 has internal memory for all characters and icons. The content is automatically displayed on the tube. The memory consists of two banks (row A and row B) for character memory and two banks (row A and row B) for icon memory. Each of those banks is accessed by separate commands. However, these command do not support addressing individual locations in the memory. Memory updates always start at address 0 in the selected row A or B. Consequently, the whole displaymemory needs to be rewritten when any location (except for 0) is to be updated. The library therefor uses a local mirror memory to store the display content, update one or more characters in the mirror-memory as needed, and rewrite the whole display memory from the mirror-content. The write-back is performed by calling the 'refresh' method. Additional advantage of the mirror-memory is that we can also implement wrap-around and scrolling from row A to B for multi-line displays.

The lib was tested on displays salvaged from two Samsung cable TV receivers (e.g. Samsung SMT-C7140 and Samsung SMT-G7400). The examples don't use all features as this depends on how the controller has been applied inside the tube. The SMT-C7140 for example does not use the icon segments, but uses a separate grid to display a User Defined Character. The segments in the UDC light up specific icons (eg mail, clock). See picture below.

https://os.mbed.com/media/uploads/wim/img_4409.jpg

The example code is

Import programmbed_PT6301

Test for PT6301 VFD. First release.

I stumbled on the SMT-C7140 display and found some useful reverse engineering info by Codebeat here that helped to identify the controller. The pinout for the VFD tube connector (starting from the left side in the picture above) is: GND1, GND2, +35V DC (switched), 5V DC supply (switched), OSC pin (RC network between 5V and GND), /RST, /CS, CLK, DAT, NC, NC

The 35V DC is generated on the PCB by a DC/DC converter. The 35V generator, the 5V supply and the filament supply are all enabled by a pin on the connector at the bottom of the PCB.

The SMT-G7400 had a similar schematic for the tube connection as the SMT-C7140, but used a dedicated processor on the display PCB. The processor was removed and replaced by flying wires to an mbed LPC1768 for testing with the lib.

General explanation of VFD is here

Committer:
wim
Date:
Sun Jun 13 13:14:12 2021 +0000
Revision:
1:aa0195b0f83c
Parent:
PT6302_UDC.h@0:ecc29c13a997
First release.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wim 1:aa0195b0f83c 1 /* mbed PT6301 UDC Library, for Princeton PT6301 VFD controller
wim 1:aa0195b0f83c 2 * The controller is used by Futaba 'Chip In Glass' (CIG) VFD tubes.
wim 0:ecc29c13a997 3 *
wim 1:aa0195b0f83c 4 * Copyright (c) 2021, v01: WH, Initial version
wim 0:ecc29c13a997 5 *
wim 0:ecc29c13a997 6 * Permission is hereby granted, free of charge, to any person obtaining a copy
wim 0:ecc29c13a997 7 * of this software and associated documentation files (the "Software"), to deal
wim 0:ecc29c13a997 8 * in the Software without restriction, including without limitation the rights
wim 0:ecc29c13a997 9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
wim 0:ecc29c13a997 10 * copies of the Software, and to permit persons to whom the Software is
wim 0:ecc29c13a997 11 * furnished to do so, subject to the following conditions:
wim 0:ecc29c13a997 12 *
wim 0:ecc29c13a997 13 * The above copyright notice and this permission notice shall be included in
wim 0:ecc29c13a997 14 * all copies or substantial portions of the Software.
wim 0:ecc29c13a997 15 *
wim 0:ecc29c13a997 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
wim 0:ecc29c13a997 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
wim 0:ecc29c13a997 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
wim 0:ecc29c13a997 19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
wim 0:ecc29c13a997 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
wim 0:ecc29c13a997 21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
wim 0:ecc29c13a997 22 * THE SOFTWARE.
wim 0:ecc29c13a997 23 */
wim 1:aa0195b0f83c 24 #ifndef MBED_PT6301_UDC_H
wim 1:aa0195b0f83c 25 #define MBED_PT6301_UDC_H
wim 0:ecc29c13a997 26
wim 1:aa0195b0f83c 27 #include "PT6301_Config.h"
wim 0:ecc29c13a997 28
wim 1:aa0195b0f83c 29 #if(PT6301_UDC == 1)
wim 0:ecc29c13a997 30 // User Defined Characters (UDCs) consist of 5x7 dots and are defined by a 5 byte bitpattern.
wim 0:ecc29c13a997 31 // The C0..C34 form the character pattern.
wim 0:ecc29c13a997 32 // D7 D6 D5 D4 D3 D2 D1 D0
wim 0:ecc29c13a997 33 // 0 x C30 C25 C20 ...... C0
wim 0:ecc29c13a997 34 // 1 x C31 C24 ........... C1
wim 0:ecc29c13a997 35 // . .............
wim 0:ecc29c13a997 36 // 4 x C34 C29 ........... C4
wim 0:ecc29c13a997 37 //
wim 0:ecc29c13a997 38 //
wim 0:ecc29c13a997 39 // The UDC matrix will show on the VFD as
wim 0:ecc29c13a997 40 // 0 C0 C1 C2 C3 C4
wim 0:ecc29c13a997 41 // 1 C5 C6 ..... C9
wim 0:ecc29c13a997 42 // . .............
wim 0:ecc29c13a997 43 // . .............
wim 0:ecc29c13a997 44 // . .............
wim 0:ecc29c13a997 45 // 6 C30 C31 ... C34
wim 0:ecc29c13a997 46 //
wim 0:ecc29c13a997 47
wim 0:ecc29c13a997 48
wim 0:ecc29c13a997 49 // Some sample User Defined Chars 5x7 dots */
wim 0:ecc29c13a997 50 //extern const char udc_Bat_Hi[]; // Battery Full
wim 0:ecc29c13a997 51 //extern const char udc_Bat_Ha[]; // Battery Half
wim 0:ecc29c13a997 52 //extern const char udc_Bat_Lo[]; // Battery Low
wim 0:ecc29c13a997 53 //extern const char udc_checker[];
wim 0:ecc29c13a997 54
wim 0:ecc29c13a997 55 //extern const char udc_PO[]; //Padlock Open
wim 0:ecc29c13a997 56 //extern const char udc_PC[]; //Padlock Closed
wim 0:ecc29c13a997 57
wim 0:ecc29c13a997 58 extern const char udc_LAR[]; // Left Arrow
wim 0:ecc29c13a997 59 extern const char udc_RAR[]; // Right Arrow
wim 0:ecc29c13a997 60 #endif
wim 0:ecc29c13a997 61
wim 0:ecc29c13a997 62 #endif