You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use some of those LOGO displays offered by Pollin here in germany as HB10401 (see https://www.pollin.de/p/lcd-modul-hb10401-4x10-121148).
The application I use one of it is described on my hompage.
(It's written in german. At the bottom of the page I added a translation feature (Google translate)).
To get your library up and running with those displays, one has to add a few lines of code in "LCD.cpp" to make the cursor positioning follow the somewhat different screen layout of the HB10401:
// 2017.10.18 deharry - add support for SIEMENS LOGO display, 10x4 chars (see "row_offsetsSpecial")
...
void LCD::setCursor(uint8_t col, uint8_t row)
{
const byte row_offsetsDef[] = { 0x00, 0x40, 0x14, 0x54 }; // For regular LCDs
const byte row_offsetsSpecial[] = { 0x00, 0x40, 0x0A, 0x4A }; // For LOGO Display <<< add this line
const byte row_offsetsLarge[] = { 0x00, 0x40, 0x10, 0x50 }; // For 16x4 LCDs
if ( row >= _numlines )
{
row = _numlines-1; // rows start at 0
}
// 16x4 LCDs have special memory map layout
// ----------------------------------------
if ( _cols == 16 && _numlines == 4 )
{
command(LCD_SETDDRAMADDR | (col + row_offsetsLarge[row]));
}
// LOGO Display (10x4) has special memory map layout <<< add this line
else if ( _cols == 10 && _numlines == 4 ) // LOGO Display <<< add this line
{ <<< add this line
command(LCD_SETDDRAMADDR | (col + row_offsetsSpecial[row])); <<< add this line
} <<< add this line
else
{
command(LCD_SETDDRAMADDR | (col + row_offsetsDef[row]));
}
}
You may add these lines to your lib to support this sort of displays out of the box.
Thanks!
Harry
The text was updated successfully, but these errors were encountered:
Hi Francisco!
I use some of those LOGO displays offered by Pollin here in germany as HB10401 (see https://www.pollin.de/p/lcd-modul-hb10401-4x10-121148).
The application I use one of it is described on my hompage.
(It's written in german. At the bottom of the page I added a translation feature (Google translate)).
To get your library up and running with those displays, one has to add a few lines of code in "LCD.cpp" to make the cursor positioning follow the somewhat different screen layout of the HB10401:
You may add these lines to your lib to support this sort of displays out of the box.
Thanks!
Harry
The text was updated successfully, but these errors were encountered: