![]() |
Forum Index : Microcontroller and PC projects : I2C 2004A display
Author | Message | ||||
grroel.tech Newbie ![]() Joined: 09/12/2021 Location: SpainPosts: 23 |
![]() Hello, I have a 4-line 2004A LCD screen (pictured) with an I2C interface. In the PicoMite manual, I have seen how to connect one directly with its pins, but would the process of doing so via I2C be very complex? Best regards. |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7997 |
Connecting it is easy. Making it work is something else entirely as text I2C displays aren't directly supported in MMBasic. You will need to write I2C routines to send the correct control characters and text to the display unless someone has already done so. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Frank N. Furter Guru ![]() Joined: 28/05/2012 Location: GermanyPosts: 950 |
You can try this code: https://fruitoftheshed.com/wiki/doku.php?id=mmbasic:driving_lcd_with_i2c_interface_using_a_micromite_5_3 The code will probably need to be adapted to the current MMBASIC... Frank |
||||
JanVolk Senior Member ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 251 |
grroel.tech, You can connect everything directly, but that requires a lot of pins, and you have to make sure there's no 5V on the pins. The I2C code has been working for me for a while now with a 4x20 LCD without any problems. It can be found somewhere on this forum using various subroutines. I didn't come up with it myself, but I made some adjustments, and unfortunately, the help is in Dutch. LCDI2CLIB.pdf There are a few things to keep in mind. 1. The I2C hardware and LCD are designed for a low bus speed, otherwise the text and custom character display will be disrupted. So, OPTION SYSTEM I2C GPpinsda, GPpinscl, SLOW. 2. The LCD screen and the I2C converter operate at 5V. This can be solved with a level shifter or by converting the two 4K7 pullup resistors on the bus module from 5V to 3V3, which also works fine. Regards, Jan. |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |