I also found a couple of small issues in the h1632_putchar routine that works much better now. Before I would have left over random colored LEDs in the last row of the text messages displayed. Now they are correct.
This
for (char row=0; row <7; row++) {
was changed to this: for (char row=0; row <=7; row++) {
Also in the void line, it had byte declarations for x and y which caused displaying issues especially in the scrolling routine. However, changing it to integer fixed this (as changed previously in past coding).
However, I would like some assistance in cleaning up the coding for char c as my bitwise coding is lacking (as there has to be a cleaner way for this).
//void ht1632_putchar(byte x, byte y, char c, byte color=GREEN)
void ht1632_putchar(int x, int y, char c, byte color=GREEN)
{
byte dots;
//if (c >= 'A' && c <= 'Z' ||
// (c >= 'a' && c <= 'z') ) {
// c &= 0x1F; // A-Z maps to 1-26
//}
//else if (c >= '0' && c <= '9') {
// c = (c - '0') + 27;
//}
//else if (c == ' ') {
// c = 0; // space
//}
if (c == ' ') {c = 0;}
else if (c == '!') {c = 1;}
else if (c == '"') {c = 2;}
else if (c == '#') {c = 3;}
else if (c == '
Overall the coding is working very well (except for the scrolling is still a bit slow even with the digitalwritefast routines) now thanks to everyones help.
Here is the latest code for up to 4 working displays:
http://forums.parallax.com/showthread.php?128037-Sure-Electronics-new-32x16-bi-color-display-3216-RG&p=974131#post974131) {c = 4;}
else if (c == '%') {c = 5;}
else if (c == '&') {c = 6;}
//else if (c == ''') {c = 7;}
else if (c == '(') {c = 8;}
else if (c == ')') {c = 9;}
else if (c == '*') {c = 10;}
else if (c == '+') {c = 11;}
else if (c == ',') {c = 12;}
else if (c == '-') {c = 13;}
else if (c == '.') {c = 14;}
else if (c == '/') {c = 15;}
else if (c >= '0' && c <= '9') {
c = (c - '0') + 16;
}
else if (c == ':') {c = 26;}
else if (c == ';') {c = 27;}
else if (c == '<') {c = 28;}
else if (c == '=') {c = 29;}
else if (c == '>') {c = 30;}
else if (c == '?') {c = 31;}
else if (c == '@') {c = 32;}
else if (c >= 'A' && c <= 'Z') {
c = (c - 'A') + 33;
}
else if (c == '[') {c = 59;}
//else if (c == '') {c = 60;}
else if (c == ']') {c = 61;}
else if (c == '^') {c = 62;}
else if (c == '_') {c = 63;}
else if (c == '`') {c = 64;}
else if (c >= 'a' && c <= 'z') {
c = (c - 'a') + 65;
}
else if (c == '{') {c = 91;}
else if (c == '|') {c = 92;}
else if (c == '}') {c = 93;}
for (char col=0; col< 6; col++) {
dots = pgm_read_byte_near(&my3font[c][col]);
for (char row=0; row <=7; row++) {
if (dots & (64>>row)) // only 7 rows.
plot(x+col, y+row, color);
else
plot(x+col, y+row, 0);
}
}
}
Overall the coding is working very well (except for the scrolling is still a bit slow even with the digitalwritefast routines) now thanks to everyones help.
Here is the latest code for up to 4 working displays:
http://forums.parallax.com/showthread.php?128037-Sure-Electronics-new-32x16-bi-color-display-3216-RG&p=974131#post974131