Simple i2C - Single Byte read and Write
Posted: Thu Jul 06, 2017 1:30 pm
Hi, I am working with another obscure i2C based chip and made up some generic i2C macros, others may find these helpful, especially if your are new to i2C.
I know there are loads of examples and you can instead use the ReceiveTransaction and Send transaction macros but I have traditionally done it using the discrete i2C macros.
They Only send a single data byte or read a single data byte.
But if, like me, your working on a new chip and want to quickly read/write some test bytes using i2C, this might be a good starting point.
I based it on a ECIO40P, and used B4=Data, B3=Clock. but target chip can be anything, you choose. J.
I know there are loads of examples and you can instead use the ReceiveTransaction and Send transaction macros but I have traditionally done it using the discrete i2C macros.
They Only send a single data byte or read a single data byte.
But if, like me, your working on a new chip and want to quickly read/write some test bytes using i2C, this might be a good starting point.
I based it on a ECIO40P, and used B4=Data, B3=Clock. but target chip can be anything, you choose. J.