0

USB Serial LCD Backpack Custom Characters
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

USB Serial LCD Backpack Custom Characters

by Wumbologist on Tue Jan 08, 2019 6:58 pm

I'm trying to print a degree symbol on my 20x4 LCD character display. Unfortunately, I find Adafruit's command reference (https://learn.adafruit.com/usb-plus-ser ... -reference) to be a bit hard to follow. I've got other commands working (brightness, contrast, clear, reset cursor, etc.).

I've got it connected to a Windows PC and am successfully communicating to the backpack through C#'s SerialPort class. The command I'm using to try and write a degree symbol is as follows:

Code: Select all | TOGGLE FULL SIZE
port.Write(new byte[]
{
   0xFE, 0x4E, // create custom character command
   0b000000110, // degree symbol in binary
   0b000001001,
   0b000001001,
   0b000000110,
   0b000000000,
   0b000000000,
   0b000000000,
   0b000000000,
}, 0, 10); // offset 0 (start at index 0 of the above array), count 10 (write all 10 bytes in the above array)

Wumbologist
 
Posts: 12
Joined: Fri Dec 28, 2018 1:41 am

Re: USB Serial LCD Backpack Custom Characters

by adafruit_support_carter on Wed Jan 09, 2019 9:14 pm

The Learn Guide page is more of a quick reference to the most useful commands. But the docs from Matrix Orbital have more info. See here for example:
https://www.matrixorbital.ca/manuals/lc ... vision-2-0

I think the first byte is the location and then the pixels, so it's something like:
[0xFE][0x4E][ID BYTE][ROW 1][ROW 2]...etc

adafruit_support_carter
 
Posts: 11467
Joined: Tue Nov 29, 2016 2:45 pm

Re: USB Serial LCD Backpack Custom Characters

by Wumbologist on Thu Jan 10, 2019 7:36 pm

Thanks, that's just what I needed. That document even has a great example for a degree symbol.

Wumbologist
 
Posts: 12
Joined: Fri Dec 28, 2018 1:41 am

Please be positive and constructive with your questions and comments.