Both arduino and MPIDE seem to have the I2C bus speed set to 100 kHz by default. So, here it is how to change it to 400kHz.
Inside the MPIDE folder, go to hardware\pic32\libraries\Wire\utility.
Inside file twi.h Find the string #define TWI_FREQ 100000 and change it to: #defineTWI_FREQ 400000.
In my simple test i went from a 20Hz sinewave to a 72Hz just by effecting this change to the bus speed.
No comments:
Post a Comment
Feel free to contact me with any suggestions, doubts or requests.
Bless