Hi there. I’m not much of a coder.
Regardless, i got some crazy idea into my head that i could use an arduino and various sensors to get some diagnostic information from the engine and transmission in a pre-OBD2 vehicle.
I know there are projects out there, but all of them seem to be turning into or growing out of stand-alone ECU projects, and i’m just not interested. i want this to be simple and my own.
I like vacuum fluorescent displays, so i bought one. Noritake-Itron GU140X32F-7000. These cost a hundred bucks onsey-twosey from the likes of digikey but there are some on ebay for $30ish. Said to be new, and it was in the characteristic green baggie of an NI display, but no protective film on the glass.
I intend to use this thread blog-style to describe my development of a library to support the GU-7k series displays. And I’ll post my code.
I actually have a CU series display as well, so i started with this site: http://tronixstuff.com/2013/08/23/using-older-noritake-itron-vfd-modules/
So my initial code will look suspiciously like his. But it turns out that the CU and GU series use similar but different commands.
These turn out to be rs232 displays. Not ttl level uart serial - it wants . that took a bit to figure out because the datasheets don’t come right out and say that.
Aside from needing a max232 or similar, they are pretty easy to hook up. Just +5v, ground, and the serial input.
There is also a “busy” line that near as i can tell is like an inverted CTS signal. When the display controller is busy and unable to accept input, it raises the busy line. I think. Application note says that there is a 12 byte input buffer but it doesn’t recommend relying on it.
I may have already run into that.
Trying out the brightness setting (levels available are 1 through 8) i discovered that text pushed to the display directly after setting brightness would get truncated at around 12 characters. Apparently brightness setting is an expensive procedure for the controller. Added a delay after the setting, cleared it right up.
Anyway, here’s what i have so far:
// Noritake Itron GU-7k Test
#include <SoftwareSerial.h>
SoftwareSerial VFD(10,11); // RX, TX
void setup()
{
VFD.begin(38400); // set speed
resetVFD();
VFDclearscreen();
VFD.write(0x1F);
VFD.write(0x02); // vertical scroll mode (on)
}
void resetVFD()
// performs a software reset on the VFD controller
{
VFD.write(0x1B); // ESC
VFD.write(0x40); // software reset
}
void VFDnewline()
{
VFD.write(0x0D); // carriage return
VFD.write(0x0A); // line feed
}
void VFDclearscreen()
{
VFD.write(0x0C); // clear display
VFD.write(0x0B); // form feed
}
void VFDcursor(int mode)
{
VFD.write(0x1F);
VFD.write(0x43);
VFD.write(mode);
}
void VFDbright(int level) // levels 1 to 8
{
VFD.write(0x1F);
VFD.write(0x58);
VFD.write(level);
delay(5); // brightness setting appears to be expensive?
}
void VFDchars()
// run through characters for selected font
{
for (int i = 21 ; i <256; i++)
{
VFD.write(i);
delay(10);
}
}
void moveCursor(byte position)
// moves the cursor - lines are sequential
{
VFD.write(0x1F);
VFD.write(0x24); // move cursor
VFD.write(position); // location
}
void loop()
{
delay(1000);
VFD.print("Hello, Nurse! - 1");
delay(1000);
VFDnewline();
VFD.print("Hello, Nurse! - 2");
delay(1000);
VFDnewline();
VFD.print("Hello, Nurse! - 3");
delay(1000);
VFDnewline();
VFD.print("Hello, Nurse! - 4");
delay(1000);
VFDclearscreen();
VFDbright(1);
VFD.print("** Bright 1 of 8 **");
delay(1000);
VFDclearscreen();
VFDbright(2);
VFD.print("** Bright 2 of 8 **");
delay(1000);
VFDclearscreen();
VFDbright(3);
VFD.print("** Bright 3 of 8 **");
delay(1000);
VFDclearscreen();
VFDbright(4);
VFD.print("** Bright 4 of 8 **");
delay(1000);
VFDclearscreen();
VFDbright(5);
VFD.print("** Bright 5 of 8 **");
delay(1000);
VFDclearscreen();
VFDbright(6);
VFD.print("** Bright 6 of 8 **");
delay(1000);
VFDclearscreen();
VFDbright(7);
VFD.print("** Bright 7 of 8 **");
delay(1000);
VFDclearscreen();
VFDbright(8);
VFD.print("** Bright 8 of 8 **");
delay(1000);
VFDclearscreen();
VFDchars();
VFDclearscreen();
}