I2C on Teensy4

Status
Not open for further replies.
Is i2c_t3 the correct library for Teensy4 for I2C, because when I open the examples they do not compile. When I go through the .c and .h for that library I do not see references to T4.

I have installed the teensyduino and can download and execute code on the T4.
 
@ChrisAldridge

i2c_t3 has not been updated by the author for use on the T4 that I know of. You will have to Wire.h, the normal I2C library for use with the T4.
 
Thanks the code compiles when I use the functions in Wire, but now I have another question.

When running the function Wire,begintransmission(). And I address a non existent I2C device on the bus. would the following Wire.write(data) functions send their bytes, or are these skipped.
 
In answer to my last question, if the device at the slave address does not ACK (produce an active low bit at the ack position of the bus protocol) , then no data will be sent over the link with the Wire.write() commands. I verified this using an oscilloscope and manually stepping through all of the addresses on the bus until I found my target device (which was a digital potentiometer).

I believe I have all the information I require, so moderators you may now close this thread.
 
Status
Not open for further replies.
Back
Top