Hello,
I am working on PIC24 and Would like to have the I@C example code for PIC24 and I2C peripheral library for PIC24.
Please suggest some documents and code. Thank you in advance!!
Hello,
I am working on PIC24 and Would like to have the I@C example code for PIC24 and I2C peripheral library for PIC24.
Please suggest some documents and code. Thank you in advance!!
Greetings,
I did a really quick google search and came up with the following hits:
https://www.microchip.com/forums/m745734.aspx
Hopefully one of the above links will be helpful to you.
Good luck,
Gene
Hi Vishal,
Which toolchain are you using for development?
If you are using MPLAB X or MPLAB Xpress IDE (the cloud based version) then you can use an add in tool called Microchip Code Configurator (MCC) to make things a bit easier. In MCC you select the peripherals you want to work with using an intuitive GUI - then you click generate code and all the skeleton code is generated for you. You then just have to utilise it i.e. call the function to send a byte out, poll the interrupts for a I2C byte received.
The nice thing about MCC is that it draws to your attention all those register flags that are required to get something working. If you work directly from the datasheet you can sometimes omit to set a single bit and .....nothing happens !
regards,
Rod