Thanks for the new component to run the i2c LCD, I'm now trying to run it with a UNO but am having problems, it compiles, simulates and uploads to the board no problem but the board won't run the program.
I've tried a simple led blink before doing any lcd command and the led does blink but then the program seems to get stuck on the first lcd command and will do nothing until the board is reset, any ideas ?
If I put the "LCD start" at the beginning where it should be, that's where the program will halt and the LED won't blink.
Thanks Andy.
i2c LCD problem
Moderator: Benj
-
- Posts: 13
- Joined: Fri May 18, 2018 3:42 pm
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: i2c LCD problem
Hello,
Do you have external pull up resistors on the I2C pins? Or have you enabled the internal pull up resistors? It could be clock stretching and the lack of pull up resistors that is causing the program to hang. Might also be worth trying the software channel to see if you have any more joy with this.
Do you have external pull up resistors on the I2C pins? Or have you enabled the internal pull up resistors? It could be clock stretching and the lack of pull up resistors that is causing the program to hang. Might also be worth trying the software channel to see if you have any more joy with this.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 13
- Joined: Fri May 18, 2018 3:42 pm
- Contact:
Re: i2c LCD problem
Thanks Benj
I can't see where to set the pull ups on those pins in flowcode...............
Andy
I can't see where to set the pull ups on those pins in flowcode...............
Andy
-
- 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 problem
Hi Andy,
I must confess, I don't know much about AVR so I could be wrong.
I believe to set an internal Pull-up, the relevant input pins have to be set high.
This could be done with a C code block.
Since I2C is using port C4 & C5, you could try a C code block at the very start with
What I would do if I was you would be to use an I2C sniffer.
That would help in two ways.
1) Will confirm that I2C hardware is connected correctly including pins and pull-up resistors.
2) Will display the address of I2C device.
If you scroll down, mnf posted about Arduino running the sniffer.
I must confess, I don't know much about AVR so I could be wrong.
I believe to set an internal Pull-up, the relevant input pins have to be set high.
This could be done with a C code block.
Since I2C is using port C4 & C5, you could try a C code block at the very start with
Code: Select all
PORTC= PORTC|48;
That would help in two ways.
1) Will confirm that I2C hardware is connected correctly including pins and pull-up resistors.
2) Will display the address of I2C device.
If you scroll down, mnf posted about Arduino running the sniffer.
Martin