Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 02:16 17 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : I2C 2004A display

Author Message
grroel.tech
Newbie

Joined: 09/12/2021
Location: Spain
Posts: 23
Posted: 05:50pm 11 Aug 2025
Copy link to clipboard 
Print this post


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 Kingdom
Posts: 7997
Posted: 06:18pm 11 Aug 2025
Copy link to clipboard 
Print this post

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: Germany
Posts: 950
Posted: 06:30pm 11 Aug 2025
Copy link to clipboard 
Print this post

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: Netherlands
Posts: 251
Posted: 07:07pm 11 Aug 2025
Copy link to clipboard 
Print this post

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.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025