I am running v8.2.2.15.
I have tried to get a generic 1602 display working using the I2C protocol.
I have generated a simple code on flow code 8 and on simulation this works.
When uploading to the Arduino, nothing happens.
I have run a the same hardware in the IDE environment and this is working.
I have toggled the backlight on and off- no luck
I am using a generic 1602 display with a PCF8574 I2C piggy backed
data sheet file:///I:/Central%20Beds%20Engineering/RQF%20Unit%206%20Microcontroller%20Systems%20for%20Engineers/data%20sheets/PCF8574_PCF8574A%20I2C%20chip%20set.pdf
Unable to attach the arduino code so here is the code
//web page below gives pin outs
//https://www.makerguides.com/character-i ... -tutorial/
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Addr, En, Rw, Rs, d4, d5, d6, d7, backlighpin, polarity
void setup()
{
lcd.begin(16,2);
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Hello world!");
lcd.setCursor(0, 1);
lcd.print("Row number: ");
lcd.setCursor(12, 1);
lcd.print("2");
}
void loop()
{
}
Just to recap,
using IDE load the programme and the I2C LCD works
USing Flowcode programme- the software emulator is working
Upload code to hardware- does not work!
This is the first time on the forum, I hope I have included everything
regards
ChrisP
I2C LCD display, unable to get hardware working
Moderator: Benj
-
- Posts: 9
- Joined: Wed Jul 15, 2020 6:51 pm
I2C LCD display, unable to get hardware working
- Attachments
-
- I2C LCD flowcode 1602.c
- (25.91 KiB) Downloaded 210 times
-
- I2C LCD flowcode 1602.hex
- (3.67 KiB) Downloaded 192 times
-
- I2C LCD flowcode 1602.msg.txt
- (3.81 KiB) Downloaded 183 times
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: I2C LCD display, unable to get hardware working
Hi Chris,
Welcome to the forums.
I also have the PCF8574 I2C piggy backed with 20x4 LCD
It works well with PIC or Arduino.
Attached is a demo flowchart that works on the Arduino uno.
Just change the LCD for your type I.e 2 x 16
The component to use within Flowcode is LCD I2C (Backpack).
Welcome to the forums.
I also have the PCF8574 I2C piggy backed with 20x4 LCD
It works well with PIC or Arduino.
Attached is a demo flowchart that works on the Arduino uno.
Just change the LCD for your type I.e 2 x 16
The component to use within Flowcode is LCD I2C (Backpack).
- Attachments
-
- Ardunio uno I2C LCD.fcfx
- (8.67 KiB) Downloaded 248 times
Martin
-
- Posts: 9
- Joined: Wed Jul 15, 2020 6:51 pm
Re: I2C LCD display, unable to get hardware working
Hello Martin,
Thanks for answering.
I have tried your programme and it did not work?
The back light is on, but not displaying anything.
When uploading the programme I ensured the TX and RX lights were in their normal uploading sequence.
I have also belled the SDA to pin C4 and the SCL to pin C5 (GND and Vcc would be good as light is on)
Previously with Liams help I did use pull up 10K resistors on both SDA and SCL lines.
I have used the arduino, arduino Uno and the Elegoo arduino Uno boards.
I did change the target to the Uno R3 (sorry forgot to tell you earlier) to match my boards
Same problem simulation ok but cannot load onto hardware?
Thanks for answering.
I have tried your programme and it did not work?
The back light is on, but not displaying anything.
When uploading the programme I ensured the TX and RX lights were in their normal uploading sequence.
I have also belled the SDA to pin C4 and the SCL to pin C5 (GND and Vcc would be good as light is on)
Previously with Liams help I did use pull up 10K resistors on both SDA and SCL lines.
I have used the arduino, arduino Uno and the Elegoo arduino Uno boards.
I did change the target to the Uno R3 (sorry forgot to tell you earlier) to match my boards
Same problem simulation ok but cannot load onto hardware?
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: I2C LCD display, unable to get hardware working
What happens when you rotate the trimmer on the back while light is on?
Martin
-
- Posts: 9
- Joined: Wed Jul 15, 2020 6:51 pm
Re: I2C LCD display, unable to get hardware working
Hello Martin,
When altering the trimmer pot, it is doing as expected, fully clockwise all the top row 16 squares (made up of 5x8 smaller squares) is brighter and the bottom can be see but darker that the non character bits
fully anti clockwise character square disappear.
Just the same as the 10K pot when connecting the D4 to D7 configuration.
regards
Chris
When altering the trimmer pot, it is doing as expected, fully clockwise all the top row 16 squares (made up of 5x8 smaller squares) is brighter and the bottom can be see but darker that the non character bits
fully anti clockwise character square disappear.
Just the same as the 10K pot when connecting the D4 to D7 configuration.
regards
Chris
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: I2C LCD display, unable to get hardware working
Can you try the attached I2C address sniffer.
The top value within brackets, is the value you should have in the LCD properties.
Yours maybe different to mine?
The top value within brackets, is the value you should have in the LCD properties.
Yours maybe different to mine?
- Attachments
-
- IC2 Address Sniffer Ardunio UNO.fcfx
- (18.51 KiB) Downloaded 206 times
Martin