(Caveat: I'm a programmer, not an electronics engineer.)
Edit: Fixed a misunderstanding, added better smallest possible sample code.
I'm in the process of repurposing an old device containing a 2x40 character NEC FC40X2EA-AB
vacuum flourescent display, but the WR
signal seems to work differently than documented.
The VFD has a driver board so power, control, and data input should be taken care of, but:
- Serial data input works, but is limited to 9600 baud which is too slow for the intended usage.
- Parellel data input seems to be documented, but following the instructions yield incorrect results. This is what I request help on.
I could not find a datasheet specifically for the one in my device:
FC40X2EA
(2x40 characters), but I found datasheets for:
FC20X2JA
(1x20 characters, very brief) and
FC20X1SA
(1x20 characters, thorough) which I assume are compatible.
I have hooked up a Teensy 3.5 to the VFD controller board and I can operate most functions, but I am still having problems with parallel data input, specifically the WR
signal. Here are the relevant parts from the datasheet:
Critically, pin WR
should be set "0→1" for writing data. I assume this means that I should be setting A0
to LOW
to indicate I'm sending a character as opposed to a command, and I should be setting D0
-D7
according to the character I intend to send. Then, I would toggle WR
to LOW
for a brief moment to instruct the controller board to accept this character.
What I am seeing is that, regardless of what else is going on, the display keeps continuously resetting for as long as WR
is active (LOW
).
Code:
// Data pins, configured to send an 'A' character
pinMode(0, OUTPUT); // Active HIGH
pinMode(1, OUTPUT); // Active HIGH
pinMode(2, OUTPUT); // Active HIGH
pinMode(3, OUTPUT); // Active HIGH
pinMode(4, OUTPUT); // Active HIGH
pinMode(5, OUTPUT); // Active HIGH
pinMode(6, OUTPUT); // Active HIGH
pinMode(7, OUTPUT); // Active HIGH
digitalWriteFast(0, HIGH);
digitalWriteFast(1, LOW);
digitalWriteFast(2, LOW);
digitalWriteFast(3, LOW);
digitalWriteFast(4, LOW);
digitalWriteFast(5, LOW);
digitalWriteFast(6, HIGH);
digitalWriteFast(7, LOW);
// Configure to send data, not command
const int pinA0 = 12;
pinMode(pinA0, OUTPUT); // Active LOW
digitalWriteFast(pinA0, HIGH);
// Briefly set WR to instruct VFD to read data
const int pinWR = 26;
pinMode(pinWR, OUTPUT); // Active LOW
digitalWriteFast(pinWR, LOW);
delay(200);
digitalWriteFast(pinWR, HIGH);
Here, in the 2nd to last line, I am pausing for 0.2 seconds. This is long enough to visually determine that the VFD is actually resetting -- although the datasheet says that the signal needn't be active for more than 100 nanoseconds.
I can wiggle a temporary jumper wire on the serial input pin to simulate serial data input (this creates random charactes on the display) and this also confirms that the entire display is cleared when WR
is set. I am utterly confounded.
What gives? How am I misreading the datasheet; how am I supposed to send parallel data to this display?