NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » LED Scrolling display

July 25, 2010
by ermias
ermias's Avatar

Hi Rick, I was trying to add some characters in font.h file. Actually i already modified the font.h file to add more characters. My problem is how to display them. can you Please help me out? I am new for c.

To make my question clear: for example in my font.h file i have a character called 'Al' that represent some kind of drawing. The array reads as follow:

const char font_2[ ] PROGMEM = { 'A1', 4, 0x1f, 0x10, 0x10, 0x1f, 0x00 };

so i want to display this drawing in my LED board using your scrolling function as follow:

scroll_display(PSTR("A1 "));

However, i couldn't do that because your scroll_display function takes one character at a time and compare that character with the characters in font.h file. As a result my LED board will display A and 1 instead of the drawing. I think there should be a way to make the font_get() and the font_display() functions to take two characters at a time instead of one. I have tried different ways and did succeed. Can You please give me a hint or help me modify the code.

Thanks,

Ermias

Post a Reply

Please log in to post a reply.

Did you know that binary numbers use base 2 to represent numbers, and these are important for understanding microcontroller registers? Learn more...