Hi, i´m using an 20*4 LCD but have some problems with locate function .
Here are the results
First test went ok:
#include "mbed.h"
#include "TextLCD.h"
TextLCD lcd(p24, p25, p26, p27, p28, p29, p30, 20, 4); // rs, rw, e, d0, d1, d2, d3 , 20*4 LCD
int main() {
lcd.locate(0,0);
lcd.printf("1234567890");
lcd.locate(0,1);
lcd.printf("1234567890");
}
Second test Have some problems with the locate function, it seems that does not work for a 20*4 lcd
#include "mbed.h"
#include "TextLCD.h"
TextLCD lcd(p24, p25, p26, p27, p28, p29, p30, 20, 4); // rs, rw, e, d0, d1, d2, d3 , 20*4 LCD
int main() {
lcd.locate(0,0);
lcd.printf("1234567890");
lcd.locate(0,1);
lcd.printf("1234567890");
lcd.locate(0,2);
lcd.printf("1234567890");
}
Third test, It seems that locate well the column 19 but the text does not continue in next line
#include "mbed.h"
#include "TextLCD.h"
TextLCD lcd(p24, p25, p26, p27, p28, p29, p30, 20, 4); // rs, rw, e, d0, d1, d2, d3 , 20*4 LCD
int main() {
lcd.locate(0,0);
lcd.printf("1234567890");
lcd.locate(0,1);
lcd.printf("1234567890");
lcd.locate(19,1);
lcd.printf("123");
}
Fourth test the test will work ok for a 20*2 lcd, for example if the text start as column 16 when it reach the end at 20 it will go fine to next line and continue the text
#include "mbed.h"
#include "TextLCD.h"
TextLCD lcd(p24, p25, p26, p27, p28, p29, p30, 20, 4); // rs, rw, e, d0, d1, d2, d3 , 20*4 LCD
int main() {
lcd.locate(16,0);
lcd.printf("1234567890");
}
It seem this library as a problem for 4 line lcd, it works great for 20*2 lcd but not with 20*4
It will be nice the experts to fix that
Please tell me if i´m doing something wrong
Hi,
I just got my mbed and it is cool.
I am a newbie so please point me in the right direction.
the following is my code:
The Test Row1 prints correctly (col2 row 0).
The problem is the Test Row2 line is printed at col 0 row 2, instead of col 3 row 2.
Can anyone point me in the right direction to get the charachters to start printing at col 3 row 2?