Close

Entry 0x06 - Finally received the display!

A project log for KOAT0 Portable Terminal

A cyberdeck with a fluorescent display for max cyberpunk looks

robsoncoutoRobsonCouto 07/23/2023 at 18:250 Comments

Got the VFD in the mail! Now I feel more confident to start designing around it. Also, I initially though it was grayscale, but it simply has a dimmer feature for the whole display.

Testing the Display with u8g2

The listing said it was compatible with arduino and u8g2, a popular library for monochrome displays. Thus, to confirm my display was working I tried using that. The display seems quite fragile, since it is made out of glass, and I was afraid it could have been damaged in transport despite being well packaged.

I have not used arduino in many years now. Firstly, I tried uploading a blink sketch to an arduino Nano to confirm my installation was working, but for some reason I could not upload sketches. It was recognised on the PC but the software would hang on upload.

Then I tried with a micro and that also did not work. I was quite surprised since it used to be way easier, but these probably have code misusing the serial port and need to be reset.

Ok, finally I tried with an MKR board I got as a present for translating the documentation to Portuguese. Finally I could upload sketches, but the u8g2 installed with the library manager did not support my display. I thought my display was GP1287 but it seems to be GP1294, which I have yet to confirm.   

Anyways, I finally got the display to work after downloading and manually installing the library version on one of the issues of the u8g2 repo. The following video shows the display working.

Of course, it is hard to capture how nice the display looks on camera, but I took a picture with lower exposure:

I got the custom graphics on the display still using u8g2 with Lopaka. The smallest font is 4x6, which I'm am surprised how good it still looks. I'm planning to use a 6x8 font, but now 4x6 seems enticing.

Lopaka

Some time ago I saw a tweet about lopaka, an embedded graphics designer and code generator tool, which seems to have been used to design the screens for flipper zero and was compatible with u8g2, so I tried that with the display too. It is quite simple, I just had to drag and drop what I wanted and then copy the resulting code to the arduino sketch.

For example, the following design in the editor:

Gives the following code:

static unsigned char icon_Hackaday_Jolly_Wrencher_BBG_bits[] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0xff,0xff,0xf3,0x1f,0xff,0xff,0xf8,0x3f,0xff,0xff,0xfc,0x3f,0xfe,0x7f,0xfc,0x1d,0xfe,0x7f,0xb8,0x01,0xfe,0x7f,0x80,0x03,0xf8,0x1f,0xc0,0x07,0x18,0x18,0xe0,0x7f,0x04,0x20,0xfe,0xff,0x04,0x20,0xff,0xff,0x03,0xc0,0xff,0xff,0x01,0x80,0xff,0xff,0x31,0x8c,0xff,0xff,0x79,0x9e,0xff,0xff,0x79,0x9e,0xff,0xff,0x19,0x98,0xff,0xff,0x01,0x80,0xff,0xff,0x83,0xc1,0xff,0xff,0x02,0x40,0xff,0x7f,0x04,0x20,0xfe,0x07,0x08,0x10,0xe0,0x03,0x08,0x10,0xc0,0x09,0x4e,0x72,0x90,0x1d,0xfe,0x7f,0xb8,0x3f,0xfe,0x7f,0xfc,0x3f,0xff,0xff,0xfc,0x1f,0xff,0xff,0xf8,0xcf,0xff,0xff,0xf3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
u8g2.drawXBM( 4, 5, 32, 32, icon_Hackaday_Jolly_Wrencher_BBG_bits);
u8g2.drawFrame(1, 2, 254, 60);
u8g2.setFont(u8g2_font_4x6_tr);
u8g2.drawStr(4, 50, "The quick brown fox jumps over the lazy dog");
u8g2.setFont(u8g2_font_helvB08_tr);
u8g2.drawStr(41, 17, "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
u8g2.setFont(u8g2_font_helvB08_tr);
u8g2.drawStr(41, 29, "abcdefghijklmnopqrstvuwxyz");
static unsigned char icon_Lock_8x8_bits[] = {0x3c,0x42,0x42,0xff,0xff,0xe7,0xff,0xff};
u8g2.drawXBM( 209, 47, 8, 8, icon_Lock_8x8_bits);
static unsigned char icon_dir_10px_bits[] = {0x00,0x00,0x3f,0x00,0x41,0x00,0xff,0x03,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0xfe,0x01,0x00,0x00};
u8g2.drawXBM( 224, 46, 10, 10, icon_dir_10px_bits);
static unsigned char icon_Alert_9x8_bits[] = {0x10,0x00,0x38,0x00,0x28,0x00,0x6c,0x00,0x6c,0x00,0xfe,0x00,0xee,0x00,0xff,0x01};
u8g2.drawXBM( 239, 47, 9, 8, icon_Alert_9x8_bits);
static unsigned char icon_Medium-chip-22x21_bits[] = {0xfc,0x03,0x02,0x00,0xf9,0x03,0x85,0x02,0xc5,0x03,0x25,0x00,0x95,0x03,0x5d,0x00,0x55,0x00,0x1d,0x00};
u8g2.drawXBM( 224, 21, 10, 10, icon_Medium-chip-22x21_bits);

That was enough to test the display, since I plan to make a Linux driver for it, that as far as I can go with u8g2.

Discussions