I've been playing around with your code and an Advatel TCD226C wallboard. This is a 7x160 3 colour board. Using your standard code it will operate this board. However the lettering is scrunched up and all different colours! I did a little thinking on this and figured the colours must be selected with extra resolution in the rows. This is confirmed by the number of TPIC6595Ns on each section of the wallboard. 10 on each board compared to the 5 on the one you have.
The above font is made to create Orange by activating the red and the green LED per pixel. This all works fine except... It will not select the correct char from progmem.
For example to get a '#' I might have to enter a '&', or to get and 'A' I might have to enter a 'F' at the serial input. I have been looking at this piece of code from LEDBoard.cpp thinking the problem lays with in.
if (posx>=LED_COLS) return;
if (ch < 32) ch = 32;
if (ch > 128) ch = 128;
ch -= 0x20;
// for each column in the FONT
for (uint8_t c=0; c<FONT_COLS; c++) {
// NB: font data is stored as colums but we are displaying rows
uint8_t FontByte = pgm_read_byte_near(System10x7 + (ch*5) + c); //(ch*5)
// for each row in the FONT
for (uint8_t r=0; r<FONT_ROWS; r++) {
// we always work with LSB of FontBytte (later we rotate it)
uint8_t nib = (FontByte & 1);
// bit = normal bit on
bool bit = (nib==1);
// now play with bit according to state and inverse
if ((bit) && (!state) && (!inv)) bit = false;
if ((inv) && (state)) bit = ! bit;
// update pixel
set_pix(posx+c, r, bit);
FontByte >>= 1;
}//next r
}// next c
}
~~~~~~~~~~~~~~~~~~~
If I lock ch*5 to say 100 I get a hash no matter what character entered in the serial input.
Would you have any ideas to put me on track? This would make your code work on a whole new set of Advatel boards! If theres more information you need let me know. Will gladly provide.
Thanks
Dan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Awesome to see someone using and improving the library.. I have to apologise for not replying (until now) as I did not seem to get any notification that you had posted..
Very glad to hear you got it working though !!! :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you have any questions regarding the use of the library please submit them here and I will try to answer them.
Hi there!
I've been playing around with your code and an Advatel TCD226C wallboard. This is a 7x160 3 colour board. Using your standard code it will operate this board. However the lettering is scrunched up and all different colours! I did a little thinking on this and figured the colours must be selected with extra resolution in the rows. This is confirmed by the number of TPIC6595Ns on each section of the wallboard. 10 on each board compared to the 5 on the one you have.
So I changed LedBoard.h...
and also doubled the spacing
I then modified the glcd-font.h file to contain be 10 pixels wide.....small example:
The above font is made to create Orange by activating the red and the green LED per pixel. This all works fine except... It will not select the correct char from progmem.
For example to get a '#' I might have to enter a '&', or to get and 'A' I might have to enter a 'F' at the serial input. I have been looking at this piece of code from LEDBoard.cpp thinking the problem lays with in.
~~~~~~~~~~~~~~~~~~~~~
void LedBoard::write_char(uint8_t ch, uint8_t posx, bool state, bool inv) {
// state = true (pixel on) / false (pixel off)
// inv = true (inverse display) / false (normal)
}
~~~~~~~~~~~~~~~~~~~
If I lock ch*5 to say 100 I get a hash no matter what character entered in the serial input.
Would you have any ideas to put me on track? This would make your code work on a whole new set of Advatel boards! If theres more information you need let me know. Will gladly provide.
Thanks
Dan
Ha, Typing it all out helped!
uint8_t FontByte = pgm_read_byte_near(System10x7 + (ch5) + c);
changed to
uint8_t FontByte = pgm_read_byte_near(System10x7 + (ch10) + c);
to compensate for wider font!
That got the font working! I can see some other transition problems now but general display of next seems OK. I'll do some testing
Awesome to see someone using and improving the library.. I have to apologise for not replying (until now) as I did not seem to get any notification that you had posted..
Very glad to hear you got it working though !!! :-)