Was writing some code to interact with a small LCD screen (Keyestudio KS0061) which, from what I understand, is controlled by a HD44780 Hitachi driver with a PCF8574 I2C port expander on top (so you can interact with it via I2C).
I got it to work, but for something that's I2C, this whole thing is way weirder than I expected... For the initialization routine I'm sending the same command multiple times with precise timings while turning on and off a flag... Maybe I'm just not that used to hardware programming.
I'm still not sure the Enable bit pulse works though... The datasheets makes me believe that I need to pulse the enabled bit 4 times to send the data (so, something like [1, 0, 1, 0]).
Looking at how other libraries handle this, however:
- In RPLCD, the bit goes
[0, 0, 1, 0] - In PCF8574-HD44780-LCD, the bit goes
[1, 0, 1, 0] - In LiquidCrystal_I2C, the bit goes
[0, 1, 0]
Surprisingly, I can only get this to work by going [0, 0, 1, 0], which makes absolutely no sense to me... But I guess I can't argue with "it works" .