Control a display with I2C bus in Microchip Code Configurator

Thread Starter

Meidling

Joined Dec 15, 2020
4
Hello,

I am currently programming a dispaly with a PIC16F1827(MCC). The display
has 4 lines and 20 columns. I also use an I2C bus (PCF8574T).

(https://asset.conrad.com/media10/ad...b-x-h-x-t-98-x-60-x-116-mm-dem20486fgh-pw.pdf).
For the beginning I would like to output a letter or a word but I have
no idea how to do that in MCC.

I would be very happy if someone can help me, because I need this
information for a school project.

Thank you
 

LesJones

Joined Jan 8, 2017
4,174
you do not make it clear if you plan to communicate with the LCD display via the PCF8574T or if the LCD is connected directly to the PIC and the PCF8574T is being used for some other purpose. .

Les.
 

Thread Starter

Meidling

Joined Dec 15, 2020
4
you do not make it clear if you plan to communicate with the LCD display via the PCF8574T or if the LCD is connected directly to the PIC and the PCF8574T is being used for some other purpose. .

Les.
I‘m sorry. The PCF8574T is connected with the Display. The microcontroller should communicate to the display over the I2C bus.
 

LesJones

Joined Jan 8, 2017
4,174
This seems like a complex project for school age children. Have you been taught I2C protocol and anything about any other microcontrollers than PICs ? I see that you have the data sheet on the display so you have the timing information for driving the display. You will need to obtain the data sheets on the PIC and the PCF8574T if you have not been supplied with them by your teacher. This will be classed a a homework topic so we don't just give you the answer as this would not teach you anything. We do our best to help you and and point out errors in your thinking. I suggest getting the display working connected directly to the PIC, The pic you have been told to use has enough I/O pins to drive the display directly. You can use either 4 or 8 data lines to transfer data to the display. If you use 4 lines then the high and low nibbles are transferred in sequence, This is a link that I found useful when I first used this type of LCD display. When you have got that working you can get the I2C communication working with the PCF8574T. (I have not used this device but I have used other I2C devices.)
I found magazine articles (In Elector and EPE ) on PIC projects helpful to understand programming them. You can download the code for projects from the EPE website to see how others have programmed them.

Les.
 

Phil-S

Joined Dec 4, 2015
238
Did you choose PIC or was it suggested?
You would get a lot more support, tutorials, libraries, examples etc. with the Arduino platform.
Personal opinion only, but PIC is harder to get going.
All my LCD, OLED, 7-segment displays etc. are Arduino
 

jpanhalt

Joined Jan 18, 2008
11,087
MPLAB® Code Configurator (MCC) is a free, graphical programming environment that generates seamless, easy-to-understand C code to be inserted into your project. Using an intuitive interface, it enables and configures a rich set of peripherals and functions specific to your application. o_O
It is quite easy to send a character or word to a 4x20 LCD without MCC. Can't imagine it being much simpler.

Perhaps, learn to do it with any code with which you are comfortable on the enhanced mid-range device you are assigned to use. Then try to incorporate that with the "help" of MCC.
 
Top