i2c does not work on ecio28

A forums to allow bugs and problems with Flowcode v7 to be reported and resolved.

Moderator: Benj

Post Reply
chrisbooth1957
Posts: 26
Joined: Tue May 23, 2017 1:55 am
Been thanked: 1 time
Contact:

i2c does not work on ecio28

Post by chrisbooth1957 »

i have had problems with the i2c , in the end i connected a i2c lcd display and wrote a very simple progran and still did not work . then had the brainwave to swicth to software using the same ports and the display workes . i now can just swicth between hardware and software i2c recompile and it always workes with software never with hardware so my conclusion is there is something wrong with the i2c hardware support ?

User avatar
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 does not work on ecio28

Post by Benj »

Hello,

Could you post your program that shows the problem. I have just tested an accelerometer program using hardware I2C on the ECIO28P and for me it's working fine.

chrisbooth1957
Posts: 26
Joined: Tue May 23, 2017 1:55 am
Been thanked: 1 time
Contact:

Re: i2c does not work on ecio28

Post by chrisbooth1957 »

note i am using the free version of the pic as only have avr and arm licence
Attachments
test_display.fcfx
(7.9 KiB) Downloaded 244 times

chrisbooth1957
Posts: 26
Joined: Tue May 23, 2017 1:55 am
Been thanked: 1 time
Contact:

Re: i2c does not work on ecio28

Post by chrisbooth1957 »

the i2c lcd gets more interesting i have tried to use it on a atmil attiny85 i made a very simple program to just test the outputs and that worked but just the act of adding the i2c lcd without actuly calling it apears to kill all outputs when set to softweare and if set to hardware it gives me lots of errors , note i do have the licence for the atmil chips

here are the 2 programs
Attachments
attiny_dead.fcfx
none working
(12.34 KiB) Downloaded 215 times
attiny_working.fcfx
working
(11.63 KiB) Downloaded 217 times

User avatar
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 does not work on ecio28

Post by Benj »

Hello,

Thanks for letting us know.

I tried a I2C accelerometer on the ECIO28P and for me it was working in hardware and software mode. Maybe the problem is limited to the display for some reason?

Here is an updated CAL C file which should solve the compilation errors you are getting using the hardware mode. Simply copy to your "Flowcode 7/CAL/AVR" folder.
AVR_CAL_I2C.c
(26.47 KiB) Downloaded 243 times
I'm not sure why you would be getting lock ups in software mode unless the clock stretching is kicking in. Do you have pull up resistors on the SDA and SCL pins?

chrisbooth1957
Posts: 26
Joined: Tue May 23, 2017 1:55 am
Been thanked: 1 time
Contact:

Re: i2c does not work on ecio28

Post by chrisbooth1957 »

than you hardware worked on the attiny85 will check it out on the ecio28 later , no i dont have put up resistors but it workes ok now

Post Reply