iC2 2004A from Flowcode 7 via ATMEGA32 FAILURE

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

Moderator: Benj

Post Reply
tony_lawrence
Posts: 4
Joined: Fri Nov 13, 2020 1:51 pm
Contact:

iC2 2004A from Flowcode 7 via ATMEGA32 FAILURE

Post by tony_lawrence »

I have a working Flowcode 7 program printing to a 2004A (parallel) LCD 20 x 4 display and want to upgrade to run iC2 2004A displays recently purchased from Banggood.
I wrote a simple printing program using the LCD(I2C) Flowcode component. It prints Ints and strings in simulation and complied to the ATMEG32 Hex without error.
On connecting GND, VCC, SDA, and SCL to the iC2 2004A, no printing was achieved.
The panel properties showed that SDA was port B4 and SCL, port B6 not Port C0 and Port C1 as shown on the ATMEGA32 diagram. The component address could be 0x27 (32) or 0x3F (63) but neither worked. I tried using the B port pins or the C port pins but with no success. One possibility is that all 6 of the i2c 2004 displays are faulty. With the old version turning the contrast pot changes the blocks from bright through dark to background, but with the new devices this only happens to line 0 and 2. The blocks for line 1 and 3 remain very dimly discernable throughout. I am a naive 82-year old programmer, and have only just come across iC2, but this program is important to me and with a sense of urgency and I would be most grateful for help.

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: iC2 2004A from Flowcode 7 via ATMEGA32 FAILURE

Post by kersing »

Are there pull up resistors on the I2C lines? Those might be present on the display module, however if there aren’t any yet you will need to add them to your hardware setup.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

tony_lawrence
Posts: 4
Joined: Fri Nov 13, 2020 1:51 pm
Contact:

Re: iC2 2004A from Flowcode 7 via ATMEGA32 FAILURE

Post by tony_lawrence »

Thanks kersing. No pull-up resistors, but easy to add. Suggest 10k?
Do you have any comment on the response to the contrast potentiometer. Is this normal behaviour?

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: iC2 2004A from Flowcode 7 via ATMEGA32 FAILURE

Post by kersing »

Resistors as a rule of thumb 4k7.

The same contrast behavior is something I’ve seen with perfectly working displays so isn’t necessarily an issue.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

tony_lawrence
Posts: 4
Joined: Fri Nov 13, 2020 1:51 pm
Contact:

Re: iC2 2004A from Flowcode 7 via ATMEGA32 FAILURE

Post by tony_lawrence »

Thanks again kersing. I would like to ask whether or not in going from the Flowcode 4 X20 LCD display to the i2C LCD display are there significant ways in which the program technique differs? I just use the start/cursor/print number or print string functions with no other refinements.

Tony

tony_lawrence
Posts: 4
Joined: Fri Nov 13, 2020 1:51 pm
Contact:

Re: iC2 2004A from Flowcode 7 via ATMEGA32 FAILURE

Post by tony_lawrence »

Hi kersing,

Thanks for your help. I am very happy to report success. Two modifications were made. Firstly the 5k pullup on SDA and SCL and secondly putting in the address as 0x27 ie 39. Flowcode had specfied 32. It is a great pleasure to sit and look at the print. Construction of my device is so much simpler with this 4 wire chip than the parallel chip and the Banggood prices are unbelievably low. If you want to know what I am doing with this I could send you my website details.

kindest regards

Tony

Post Reply