I2C LCD

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
jimhook_uk1
Posts: 5
Joined: Sun Nov 10, 2019 1:22 pm
Been thanked: 1 time
Contact:

I2C LCD

Post by jimhook_uk1 »

Hi,
This is my first post and looking for some advice. I am a hardware designer and this is my first venture into the programming side of design. I already have some hardware of my own design that I am trying to use with Flowcode 8. I'm not sure what I'm doing wrong and would welcome any suggestions as I am at the bottom of a steep learning curve.
My hardware has a dsPIC33FJ128GP708A and there is a 20x4 I2C LCD fitted (MC42005A6W-BNMLWI-V2 Midas Displays), it has an external address of 00 and internally the RW1063 address is 0x3C.
The attached simulates fine and displays ok but when I run it on the hardware nothing is displayed on the LCD, backlight is connected to a drive circuit from B8 and that lights up so I'm assuming it is the I2C part I have wrong.

Thanks in advance.
Attachments
I2C_LCD_Test2.fcfx
(10.21 KiB) Downloaded 144 times

mnf
Valued Contributor
Valued Contributor
Posts: 1191
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 440 times
Contact:

Re: I2C LCD

Post by mnf »

Are you sure the address is correct? - 0 is usually reserved for 'general call' on the i2c bus.

Martin

jimhook_uk1
Posts: 5
Joined: Sun Nov 10, 2019 1:22 pm
Been thanked: 1 time
Contact:

Re: I2C LCD

Post by jimhook_uk1 »

Yes I designed the PCB myself, the address pins are 00, the board is in production and works with code written by a software developer.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: I2C LCD

Post by medelec35 »

Hi Jim,
Looks like your configuration (Build, Project options) settings are not correct.
For example you have got Auto Clear Watchdog enabled, yet you have Watchdog Timer Enabled set to enabled.
So your hardware is constantly being reset due to watchdog time out.
My advice is always start off new hardware designs with a 1 second flasher .
If the duration is 1 second then all the components with delays including LCD's should then work.
If the time is a fair bit longer or shorter then a second, then you know the settings/hardware has an oscillator timing issue.
therefore needs sorting before you can progress.
If my memory serves me right then my I2C dispaly did now work with the Stop Delay set to enabed.
Martin

jimhook_uk1
Posts: 5
Joined: Sun Nov 10, 2019 1:22 pm
Been thanked: 1 time
Contact:

Re: I2C LCD

Post by jimhook_uk1 »

Thanks for the reply, I have an LED blinking at the correct rate on the same PCB but still nothing on the display. (I2C_LCD_Test2),

I can get garbage displayed (I2C_LCD_Test) on the LCD using the I2C_Master1:: SendByteTransaction() macro but I do not understand what it is displaying and why, I am sending a new number for the upper and lower addresses plus DATA using counters - any ideas?
Attachments
I2C_LCD_Test2.fcfx
(11.64 KiB) Downloaded 131 times
I2C_LCD_Test.fcfx
(14.41 KiB) Downloaded 142 times

Post Reply