I2C stops program
Posted: Fri Nov 22, 2013 2:40 am
I have never used I2C before, but I just purchased a sensor using the I2C protocol.
According to the Datasheet I need to send the following I2C data:
- Start
- 0x23 -> this is the Slave address
- 0
- 0x10 -> Slave will start measuring
- stop
wait 100 msec
- Start
- 0x23
- 1
+Read High Byte
+Read Low Byte
- stop
SOLVED: (The problem I have that the stop byte is causing the program to stop. As soon as I disable this icon, no problem.)
Also, I'm trying to figure out when to use the MI2C_Transmission_Byte or when to use the MI2C_Send_Byte_Transaction.
Any help will be appreciated
henk
According to the Datasheet I need to send the following I2C data:
- Start
- 0x23 -> this is the Slave address
- 0
- 0x10 -> Slave will start measuring
- stop
wait 100 msec
- Start
- 0x23
- 1
+Read High Byte
+Read Low Byte
- stop
SOLVED: (The problem I have that the stop byte is causing the program to stop. As soon as I disable this icon, no problem.)
Also, I'm trying to figure out when to use the MI2C_Transmission_Byte or when to use the MI2C_Send_Byte_Transaction.
Any help will be appreciated
henk