Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Creating special characters on LCD

MFToolbox LCD

  • Please log in to reply
2 replies to this topic

#1 marcoe

marcoe

    New Member

  • Members
  • Pip
  • 8 posts
  • LocationBrazil

Posted 18 September 2015 - 08:23 PM

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 )

 



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 20 September 2015 - 05:30 PM

Hi marcoe,

Thanks for sharing this... Did you contact the NETMF toolbox creator, to see if you could contribute this back to the library? I see a really cool blog post in your future showing off this new feature, perhaps? :)

Chris

#3 marcoe

marcoe

    New Member

  • Members
  • Pip
  • 8 posts
  • LocationBrazil

Posted 21 September 2015 - 07:43 PM

Hi Chris,

 

    did not contact him, but will do. For sure is a nice feature to be added to the Toolbox.

 

Thanks.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.