Page 1 of 1

Pic32 I2C

Posted: Sat Nov 09, 2019 5:40 am
by chad
My I2c baud is 1/2 of what i set it to in the component. This might be my fault with a some clock config but you might want to check because other timing stuff seems to work.?

CHad

Re: Pic32 I2C

Posted: Mon Nov 11, 2019 10:10 am
by ronaldlijs
Hi Chad,

In my setup, I2C works perfect in Software mode on PIC32MZ1024EFE100.

Make sure you use the PIC32 calculator to get all timings correctly configured, otherwise it will give you trouble. I have no extra C code in the program, just adjusted the settings in Flowcode as the calculator pointed me out and worked like a charm.

https://microchipdeveloper.com/32bit:mz-osc

For my setup, the external XO is 12MHz and the MCU ends up being clocked at 198Mhz, not 200Mhz as I had before checking this PIC32 calculator, so nothing was working well including I2C, after I corrected all settings, everything worked like a charm.

Regards,
R

Re: Pic32 I2C

Posted: Mon Nov 11, 2019 1:46 pm
by Benj
I've pushed a new version of the I2C CAL for the PIC32 to the update system now. It will hopefully fix the problem and not make it twice as bad :wink:

Let me know how you get on.

Re: Pic32 I2C

Posted: Mon Nov 11, 2019 3:16 pm
by chad
Thanks, I'll give it a shot in the next day or so.

Chad