Thoughts on using I2C LCD... or should I just stick to 4 bit parallel mode?


Closed Thread
Results 1 to 5 of 5
  1. #1

    Default Thoughts on using I2C LCD... or should I just stick to 4 bit parallel mode?

    Hi all, I've lurked about the forum for years when I needed help with some code for my occasional PIC based hobby stuff.

    So when I first got into microprocessors I initially used a PARALLAX kit I bought from eBay and then my mom's husband helped me get into the PIC based stuff which I have now used here and there for the past 10+ years.

    The first LCD I added was some eBay screen with a single wire serial adapter for it.
    When I got into the PIC someone helped me with code to send text and data to it. It worked fine.

    Shortly after that however I just started using the common LCD displays (from NEWHAVEN and similar) with the 4 bit mode requiring 6 of the PIC output pins which then allowed me to utilize the so easy LCDOUT command.
    I've been using that method over the last several years.

    So earlier this year I ordered some inexpensive LCD's from Amazon and they came packaged with the I2C adapters.
    At first I just ordered them to try the LCD itself i the 4 bit mode and they of course worked fine as an inexpensive source.

    Now about a week ago I thought I'd give the I2C method a try since I had those adapters that came with my last order of LCD displays.

    I've been scourging the net and reading all about how I need to set address (based on chip version PCF8574T) and trying to find some basic code I could utilize but all I see is a mess and no real standard.
    And I promise, I've been searching for a week and have tried several versions of code before I finally decided to make this forum post. So far all I have got was some random cursor action on my LCD.

    So before I attempt to bother anyone with some code to help to give me a kick start using this method my honest question is should I even bother trying to base my future projects of of I2C based LCD interface or just stick to the simple LCD OUT 4 bit method and just give up the 6 pins? From what I see using I2C is going to require a bit of code and includes and all that jazz where LCDOUT is just a simple setup I copy n paste with each new project.

    My PIC of choice has been the 16F690 as a good bang for the buck option but I have a few others in my stash.

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,383


    Did you find this post helpful? Yes | No

    Default Re: Thoughts on using I2C LCD... or should I just stick to 4 bit parallel mode?

    http://dt.picbasic.co.uk/CODEX/LLCDSerialBackpack

    has worked fine for at least the last seven years
    Warning I'm not a teacher

  3. #3
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: Thoughts on using I2C LCD... or should I just stick to 4 bit parallel mode?

    Wow! The unasked questions are numerous! Are you a hobbiest that wants to create a platform to build 1-4 "cool" projects for family and friends, or are you an engineer developing a product to be mass produced? Hobbiests tend to work with established platforms that make their project(s) easy (like Audrino boards). Engineers, on the other hand, NEED to integrate platforms and systems into a PCB that meet the objectives of the project. In the latter case, crap like Audrino and Dev Boards are NOT production stuff.

    With that said, the fact you consider the PIC16F690 a processor of choice tells me you are a hobby type guy (it is at least a decade old). If you simply want to create a 1-off project, and use the cheapest stuff you can get; use close-outs, eBay items, old inventory, etc. If you are engineering a product, you must consider the long-term costs and availability of your BOM, and the prospect of future purchasing.

    Back to your original line of questions, if you have a display module with the flexibility for parallel or SPI/I2C, pick one and use it; so long as both sides of the equation suggest long-term availability. From what I gather, the display industry still hasn't settled on a standard. I tend to use Nextion displays which use UART communications protocols. In the past i utilized numerous LCD displays relying on parallel communications protocols. If you can refine your question, we may be better to give you guidance.

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: Thoughts on using I2C LCD... or should I just stick to 4 bit parallel mode?

    Quote Originally Posted by mpgmike View Post
    Wow! The unasked questions are numerous! Are you a hobbiest that wants to create a platform to build 1-4 "cool" projects for family and friends, or are you an engineer developing a product to be mass produced? Hobbiests tend to work with established platforms that make their project(s) easy (like Audrino boards). Engineers, on the other hand, NEED to integrate platforms and systems into a PCB that meet the objectives of the project. In the latter case, crap like Audrino and Dev Boards are NOT production stuff.

    With that said, the fact you consider the PIC16F690 a processor of choice tells me you are a hobby type guy (it is at least a decade old). If you simply want to create a 1-off project, and use the cheapest stuff you can get; use close-outs, eBay items, old inventory, etc. If you are engineering a product, you must consider the long-term costs and availability of your BOM, and the prospect of future purchasing.

    Back to your original line of questions, if you have a display module with the flexibility for parallel or SPI/I2C, pick one and use it; so long as both sides of the equation suggest long-term availability. From what I gather, the display industry still hasn't settled on a standard. I tend to use Nextion displays which use UART communications protocols. In the past i utilized numerous LCD displays relying on parallel communications protocols. If you can refine your question, we may be better to give you guidance.
    I use the PIC for various hobby and projects.
    It's one aspect of my projects that is something I use from time to time but not on a continual basis.

    For some idea, the recent projects I'm working on are simple things like turn signals for my Can-Am (controller already made but I haven't gotten around to installing it), and now a battery switch for my high voltage solar battery project.

    Recently I just made a PIC based board that I used to interface and alter the command signal from a variable speed heat pump unit to use the evap and electronic variable speed motor from another (changing one PWM signal to another that creates a 1-5 VDC speed request signal to the electronically controlled motor) and that same PIC also takes the feedback pulse signal (via external interrupt) and alters that before sending it back to the controller that was expecting a different frequency feedback signal (using Assembler for that).
    I basically mixed and matched two different HVAC brands into one because I already had the equipment from left over stuff from work.
    It works and the I'm sitting in my garage being cooled by that unit right now.

    So basically I don't design anything to be mass produced.
    I make one-off controllers for various projects.
    The LCD is sometimes part of the project such as in my home made heat pump water heated which I do need to read temp and set point etc, and sometimes the LCD is just hooked up to display values as I tinker with a project and then the LCD could be left off once finished.

    The PIC 16F690 was something I selected over a decade ago.
    And I just ordered more and I just found out that it is not so available as it was.
    But, I liked that I am familiar with it and it makes each new project easy to just grab one and use it.

    It sounds like using I2C isn't going to be anything as simple like the built in commands for LCDOUT with 4 bit parallel port but will add a lot more difficulty and chances of conflicts with new projects etc.
    So perhaps I'll stick to the simple tried and true and maybe tinker with I2C just to get it to work sometime.


    I'll add some photos below of the kind of stuff I tinker with...

    The board with the arrows pointing at it is something I added to this VRP unit.





    The LCD is mostly used so I can see the values of variables etc.
    It's not always part of the final project.



    Oh, and something that can make your sphincter pucker with what is shown in the photos above is that that controller of mine, with the multiple optical isolators involved and all to isolate signals from the two different systems, is powered by the indoor fan motor of a mini split high wall and the 15VDC power and common from that motor into the controller is at about 300VDC potential to ground!
    So, everything within the processor controller board I made is within 5 VDC to it's own common however touching any of it when grounded will knock you on your a**
    LOL.
    Last edited by TrueMetalGeek; - 17th October 2021 at 00:06.

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: Thoughts on using I2C LCD... or should I just stick to 4 bit parallel mode?

    Quote Originally Posted by richard View Post
    http://dt.picbasic.co.uk/CODEX/LLCDSerialBackpack

    has worked fine for at least the last seven years
    Thanks. I am not sure if I came across that in the many searches yet.
    It doesn't seem to mention I2C much so maybe I haven't seen it.

Similar Threads

  1. First use of i2c from parallel output processing
    By queenidog in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 14th May 2018, 00:39
  2. EPP mode parallel port comms
    By cncmachineguy in forum General
    Replies: 9
    Last Post: - 3rd August 2011, 15:34
  3. 8 bit parallel debounce routine
    By cncmachineguy in forum Code Examples
    Replies: 0
    Last Post: - 26th July 2011, 15:54
  4. LCD in 8-bit mode
    By thesaxmachine in forum General
    Replies: 1
    Last Post: - 7th April 2006, 09:10
  5. LCD 4-bit mode affecting rest of port?
    By Mark Scotford in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 22nd August 2005, 09:43

Members who have read this thread : 5

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts