Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 21:22 29 Mar 2024 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 LCD modules....

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9030
Posted: 05:47am 06 Jan 2020
Copy link to clipboard 
Print this post

Hello.

I am wanting to use a 2004 LCD module, fitted with one of those I2C adaptors to it such as this one here.

They are designed to plug into the standard two or four line LCD modules, and you can drive them from I2C rather then a parallel port.  Most of the converters I have found all seem to use the Philips PCF8574 I2C-to-parallel expander thing.

Has anyone here used these on the Micromite?
If so, is there much to learn in order to get them to work via I2C?
I will be wanting to use one on a 2004(20-character, 4-line) LCD module.

Thanks for any replies.
Smoke makes things work. When the smoke gets out, it stops!
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 839
Posted: 06:14am 06 Jan 2020
Copy link to clipboard 
Print this post

A member on here has posted a bit of code/library for these some time ago.

GoodToGo post

Regards
Gerry
Latest F4 Latest H7
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9030
Posted: 06:26am 06 Jan 2020
Copy link to clipboard 
Print this post

Lovely, thanks.
I have copied that code and will study it.

I am desperately short of pins on a 170 MM2 chip, and I don't want to have to redesign the entire project for a bigger chip.  If I put the LCD onto I2C, I save some pins that I can then assign to other things.
Smoke makes things work. When the smoke gets out, it stops!
 
PeterB
Guru

Joined: 05/02/2015
Location: Australia
Posts: 639
Posted: 06:50am 06 Jan 2020
Copy link to clipboard 
Print this post

G'Day Grogster

They work a treat so why not use them, however they can have different address' which can be a bit frustrating. The one next to me on the desk is 27 but others are 3F. It's the last thing you think of when a display doesn't work. And 3.3V versions are available I think.

Peter

just for you
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9030
Posted: 07:35am 06 Jan 2020
Copy link to clipboard 
Print this post

  PeterB said  G'Day Grogster

They work a treat so why not use them, however they can have different address' which can be a bit frustrating. The one next to me on the desk is 27 but others are 3F. It's the last thing you think of when a display doesn't work. And 3.3V versions are available I think.


Cool, thanks.
I assume then, that you have used these without any MAJOR issues?

  PeterB said   just for you


Shucks.....  

Yep, those smillies really work to let others know what your mood is.
Without them.....
I know I have had you up about that before, so thanks for now including them.
I probably OVER-use them!!!!  
Smoke makes things work. When the smoke gets out, it stops!
 
GoodToGo!

Senior Member

Joined: 23/04/2017
Location: Australia
Posts: 188
Posted: 06:45am 07 Jan 2020
Copy link to clipboard 
Print this post

Hey Grogs,
I posted some updated code on Fruit of the Shed
It eliminated most of the delays that weren't needed so the display runs much better.
I use it in one of my Xmas lights power supply monitors and it works well.

Cheers!

GTG!
...... Don't worry mate, it'll be GoodToGo!
 
PeterB
Guru

Joined: 05/02/2015
Location: Australia
Posts: 639
Posted: 08:59am 07 Jan 2020
Copy link to clipboard 
Print this post

Quite correct.
I had a closer look at my code and a lot of things like pause 400 are missing.
Well done GTG

My code has been reduced to 16x2 but I have used it on the bigger one.

Peter
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9030
Posted: 05:04am 01 Feb 2020
Copy link to clipboard 
Print this post

My 8574 modules arrived the other day, so while I had a spare second this afternoon, I had a bit of a play with one using GTG's demo code - thanks very much for posting that, GTG, as I doubt I would have been able to work out the mathematics for the MSN/LSN nibble stuff for the commands to the LCD without your example code to study.





I did have the almost standard head-scratching when I got the slave address wrong, but once I fixed that, it sprang immediately to life.  My mistake was ASSUMING that leaving A0/A1/A2 open meant those bits were zero.  It is the other way around.  The comments in GTG's code mention that, but it took a few minutes before I managed to read that and realise my mistake.  

This LCD is a TOPWAY LMB204BDC unit I had in my spares.
These seem to be a good quality and reliable LCD module.
Not cheap eBay rubbish, as they cost about $30 each.
Well, they did THEN, but these days.....

I also have some of those 20x4 LCD's from eBay too, which are white on blue.
I might just have to dig one of those out and play with it next.

I must say that even with the code delays enabled, the I2C method works well, and the LCD displays the text very quickly even though there is a lot of bit-conversions going on here!!!
Smoke makes things work. When the smoke gets out, it stops!
 
Print this page


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

© JAQ Software 2024