Torretje
Futaba NA202SD08FA VFD
>>Torretje/Projects/Vfd 20S401DA1/
Futaba NA202SD08FA driven by Arduino
Bought this nice Vacuum Fluorescent Display with 2x20 chars.
Every character is formed with a 5x7 dot matrix.
It took some time to figure out how to connect this old school display.
After some probing and searches finaly found the best matching data-sheet IEE_03601-96_2x40_VFD.pdf.
A generous reader of this page sended the right datasheet! :-) NA202SD08FA Datasheet.pdf
This vfd has a 8bit interface and 1 write strobe to command the display.
You can control the display with a set of predefined characters and cursor commands.
For example hex 0x14 resets the display hex 0x21 shows an ! After every byte the write strobe is set to high for 250 micro sec.
Pinouts NA202SD08FA VFD.
The j1 header(see pic) contains 14 pins with pin 1 not attached.
Pin assignment form top to bottom:
-14 Reset
-13 NC
-12 GND
-11 +5V
-10 - 3 Data Lines D0 - D7
-2 Write Strobe
-1 Busy? is not connected
See also the data sheet:NA202SD08FA Datasheet.pdf
Code VFD driven with arduino:
/* NA202SD08FA VFD Display Karel Reinhard 04/13/2016 Basic code for NA202SD08FA 20x2 VFD With 13 pin connector see http://torretje.nl/futaba for pin-out and data-sheet */ //NA202SD08FA 14 pin connector 2 pins for power-supply and pin 1 and 13 NC : const int RST = 11; //J1-14 const int WR = 10; //J1-2 const int DB0 = 2; //J1-10 const int DB1 = 3; //J1-9 const int DB2 = 4; //J1-8 const int DB3 = 5; //J1-7 const int DB4 = 6; //J1-6 const int DB5 = 7; //J1-5 const int DB6 = 8; //J1-4 const int DB7 = 9; //J1-3 //Add all data ports to an Array int outData[8]={DB0,DB1,DB2,DB3,DB4,DB5,DB6,DB7}; void setup() { // set the digital pin as output: pinMode(RST, OUTPUT); pinMode(WR, OUTPUT); pinMode(DB0, OUTPUT); pinMode(DB1, OUTPUT); pinMode(DB2, OUTPUT); pinMode(DB3, OUTPUT); pinMode(DB4, OUTPUT); pinMode(DB5, OUTPUT); pinMode(DB6, OUTPUT); pinMode(DB7, OUTPUT); //RESET digitalWrite(RST, 1); delay(500); digitalWrite(RST, 0); //Clear screen cursor home setData(0x14); } void loop() { for(int y=0x20;y<0x7F;y++){ setData(0x16);//Cursor Home for(int i=0;i<40;i++){ setData(y); } delay(100); } for(int y=0xA0;y<0xFF;y++){ setData(0x16);//Cursor Home for(int i=0;i<40;i++){ setData(y); } delay(100); } } void setData(byte data){ int i=0; for (byte mask = B00000001; mask>0; mask <<= 1) { if (data & mask){ // if bitwise AND resolves to true digitalWrite(outData[i],HIGH); }else{ //if bitwise and resolves to false digitalWrite(outData[i],LOW); } i++; } digitalWrite(WR, 1); delayMicroseconds(250); digitalWrite(WR, 0); }
Code on GitHub:futabavfd
Hex ascii codes
Command hex codes
--- ---------- -----
00 NULL
01 SOH
02 STX
03 ETX
04 EOT n Set display brightness level (DIM = 0x20, MED1 = 0x40, MED2 = 0x60, FULL = 0xFF).
05 ENQ
06 ACK
07 BEL Turn on blinking underline cursor.
08 BS Backspace and erase. Spans both lines.
09 HT Moves cursor one position right. Wraps to Line 01. Does not scroll at end of Line 01.
0A LF If on Line 00: moves cursor down one line, same column.
If on Line 01: scrolls line up, moves cursor to column one.
0B VT Turn on blinking characters. ---- |---- Use in pairs.
0C + FF Turn off blinking characters. ---
0D CR Moves cursor to start of line. Does not clear line.
0E + SO Turn off cursor.
0F SI Turn on solid underline cursor.
10 DLE
11 DC1 Turns on wrap around. When Line 01, Col 19 is reached, continue at Line 00, Col 00.
12 + DC2 Turns off wrap around. When Line 01, Col 19 is reached, characters overprint that position.
13 DC3 When Line 01, Col 19 is reached, scroll characters on Line 01 left. No effect on Line 00.
14 DC4 Clear screen. Home cursor. Turns cursor on. INITIALIZE SCREEN.
15 NAK Clear screen. Home cursor. Leaves cursor off if off.
16 SYN Home cursor. Does not clear screen.
17 ETB n Turns underlines on/off (underline on = 0x44, blinking underline on = 0x46, underline off = 0x45).
18 CAN
19 EOM Adds 80H to following character. Allows printing of high-bit characters if sending 7-bit data.
1A SUB
1B ESC n Moves cursor to position 0-39. Both lines contiguous.
1C FS
1D GS
1E RS Multi-byte command. Possible user defined characters.
1F US