Go Down

Topic: I2C LCD .write issue (Read 574 times) previous topic - next topic

HazardsMind

I got an 20x4 I2C LCD and it is my first time using one, so I tried the Serial display example and at first it seemed to work fine until I entered more than 20 characters. I enter "1111111111111111111122222222222222222222" and I get this.

Quote

11111111111111111111
____________________ <= empty unused boxes
22222222222222222222
____________________ <= empty unused boxes


It also messed up when I added 33333333333333333333, I got this.
Quote

11111111111111111111
33333333333333333333
22222222222222222222
____________________ <= empty unused boxes


Why does lcd.write() do that?

And yes I did set it up correctly with the 20x4 compatible library.
lcd.begin(0x27,20,4); I also tried lcd.begin(0x27,16,2); to rule it out.
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

abrookfield

you're seeing the internal actual mapping of the display coming into play

+-----------------------+
|0 -------------------19 |
|40------------------59 |
|20------------------49 |
|60------------------79|
+------------------------+
www.reeftopper.com

HazardsMind

Oh, so its normal, I thought it was a bug in the code. Ok then.
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

abrookfield

you could put your own wrapper around lcd.write so that when it hits character number 21, it does a setpos followed by the characters until it hits the next end-point, the setpos again etc
www.reeftopper.com

floresta

Quote
you're seeing the internal actual mapping of the display coming into play

Follow the LCD Addressing link at http://web.alfredstate.edu/weimandn for more information about this mapping.

Don

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy