Page 1 of 1

i2c does not work on ecio28

Posted: Mon Jun 26, 2017 12:32 am
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 ?

Re: i2c does not work on ecio28

Posted: Mon Jun 26, 2017 1:48 pm
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.

Re: i2c does not work on ecio28

Posted: Mon Jun 26, 2017 2:04 pm
by chrisbooth1957
note i am using the free version of the pic as only have avr and arm licence

Re: i2c does not work on ecio28

Posted: Fri Jun 30, 2017 11:42 pm
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

Re: i2c does not work on ecio28

Posted: Mon Jul 03, 2017 9:36 am
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 267 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?

Re: i2c does not work on ecio28

Posted: Tue Jul 04, 2017 2:25 pm
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