Hi guys,
I want to share this small code that I created based on a Arduino implementation of a LCD Special Character Creator code. ( http://playground.ar...n/LiquidCrystal )
The .NET Micro Framework Toolbox has the Hd44780LCD class ( https://netmftoolbox...d/Hd44780Lcd.cs ) is great but it only implements basic character output to the LCD display, and I needed to display a low battery sign and this character does not exist on the LCD ROM, so I found out that this kind of display has 8 addresses that we can write to any 5x7 "bitmap" of our choice and then display it.
public void CreateSpecial(byte[] character, byte location) { location &= 0x7; LCD.Write((byte)(0x40 | (location << 3)), true); for (int i = 0; i < 8; i++) { LCD.Write(character[i]); } }
LCD on the code above is the Hd44780Lcd from MFToolbox.
private static byte[] box1 = { 31, 17, 17, 17, 17, 17, 31 }; private static byte[] box2 = { 14, 27, 17, 17, 17, 17, 31 }; . . . . LCD.CreateSpecial(box1, 0x0); LCD.CreateSpecial(box2, 0x1); LCD.Write(0x0); LCD.Write(0x1);
This website lets you draw your character and just paste it's numbers, makes it a lot easier.
( http://www.quinapalu...hd44780udg.html )