I have been researching all I can find on direct port pin manipulation, and it appears I should be able to use something likeĬORE_PIN37_CONFIG = PORT_PCR_PE | PORT_PCR_PS | PORT_PCR_MUX(1) ĬORE_PIN38_CONFIG = PORT_PCR_PE | PORT_PCR_PS | PORT_PCR_MUX(1) īut placing this in my little test program immediately after Wire1.begin() (I'm using Wire1, pins 37/38 for the tests) also flatlines the output. I tried using pinMode() & digitalWrite() to turn on the pullups, but this unfortunately overwrites something vital in the pin config and flatlines my I2C output. So, I'm trying to figure out how to configure the I2C pins for internal pullup AFTER Wire.begin(). With internal pullups, my Teensy-to-Teensy I2C link worked just fine with a I2C jumper length of about 25cm. I know this can be done, because I had it working using the i2c_t3.h library, which allows the selection of internal or external pullups. I'm working on a project that uses I2C Wire & Wire1, and I want to avoid using external pullups if at all possible.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |