Hi I'm new to the LPC82x ecosystem but I was interested by the 4 I2C ports possible on the LPC824 and I'd like to implement an I2C sensor hub.
I want to configure I2C0 as Slave that connects to a Host (I2C master). Configure I2C1, I2C2, I2C3 as I2C master ports that read data from attached sensors.
I want to make it possible for Host to 'see' the sensors attached to the LPC824 and be able to read and write to them. Is this possible with the LPCOpen drivers? or could someone suggest another possible way to implement it?
Thanks,
Mike.
Hello Mike!
The examples of the LPCOpen are definitely a good starting point for your project. You can use this as a guide to see how the configurations of the drivers are made.
Another good thing about the LPC824 is that it has a code bundle. In the code bundle you will find three different examples of I2C, probably the one that suits better to your needs is the I2C_MasterSlave example. The good thing about the code bundle is that the examples provided here doesn't add so much overhead as the ones in the LPCOpen.
Besides all the examples come with very good comments so you will have no problem understanding how they work
You can download the code bundle from the next link:
Hope it helps!
Victor.
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
We just released MCUXpresso SDK for the LPC8xx series, so I would recommend you look at that option because LPCOpen is on available for LPC82x and LPC81x parts. LPCOpen is a good driver package, but NXP is focusing on MCUXpresso SDK for future development.