Pic32 I2C

Moderator: Benj

Post Reply
chad
Posts: 198
Joined: Sun Nov 04, 2018 7:13 pm
Has thanked: 27 times
Been thanked: 33 times
Contact:

Pic32 I2C

Post 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

ronaldlijs
Posts: 139
Joined: Tue Jan 05, 2010 10:07 am
Has thanked: 20 times
Been thanked: 25 times
Contact:

Re: Pic32 I2C

Post 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
Attachments
FC_I2C_Master_Properties.jpg
FC_I2C_Master_Properties.jpg (24.18 KiB) Viewed 2503 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: Pic32 I2C

Post 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.

chad
Posts: 198
Joined: Sun Nov 04, 2018 7:13 pm
Has thanked: 27 times
Been thanked: 33 times
Contact:

Re: Pic32 I2C

Post by chad »

Thanks, I'll give it a shot in the next day or so.

Chad

Post Reply