Home › Forums › Mayfly Data Logger › Mayfly SCL and SDA voltage level
Tagged: I2C
- This topic has 5 replies, 4 voices, and was last updated 2020-08-07 at 11:25 AM by Shannon Hicks.
-
AuthorPosts
-
-
2020-07-07 at 8:50 AM #14291AnonymousHi there. I have ordered a Mayfly board but I’m having some issues finding documentation on what voltage level the SCL and the SDA pins run at. I see on the hardware page for the 0.5 version thaHi there. I have ordered a Mayfly board but I’m having some issues finding documentation on what voltage level the SCL and the SDA pins run at. I see on the hardware page for the 0.5 version that it runs at 3.3 volts, but the 2 2kohm resistors on the documentation are throwing me off a bit. Any help would be greatly appreciated!
-
2020-07-07 at 10:49 AM #14292
All of the data lines on the Mayfly run at 3.3 volts. The 2.2k resistors on the I2C lines are the pullup resistors that are required per the I2C design spec.
-
2020-07-07 at 11:10 AM #14294Anonymous
Awesome! Thank you for the quick response.
-
2020-08-05 at 9:02 PM #14451Hello. I’m currently trying to get a sensor working using I2c protocol, and I have a question about the 2.2 kohm resistors on the SDA and SCL lines. Are those resistances automatically enabled,Hello. I’m currently trying to get a sensor working using I2c protocol, and I have a question about the 2.2 kohm resistors on the SDA and SCL lines. Are those resistances automatically enabled, or is there a line of code that would enable them? Otherwise, if the pull-up resistors are automatically enabled on the Mayfly, is there any way to disable those resistances? Any help would be greatly appreciated! Thank you in advance for your time!
-
2020-08-06 at 4:40 PM #14454I’m not an expert, but based on the Mayfly schematic (see pins 19 and 20 on tI’m not an expert, but based on the Mayfly schematic (see pins 19 and 20 on the ATMega1284P, upper left), it looks like SDA and SCL are pulled high via external resistors on the board, so there is no way to disable them in code.
Reading a tutorial at Adafruit, it looks like that is an inherent part of the design of the I2C protocol:
The I2C clock and data lines need pull-up resistors to prevent from floating to random values. Since many different devices can share these lines the I2C protocol requires that each device ‘give up’ or stop driving the lines when not in use. If no device is driving the lines then the pull-up resistors ensure they go up to a high logic level instead of floating at random values.
Matt
-
2020-08-07 at 11:25 AM #14460Matt is correct, the pullup resistors on the I2C bus on the Mayfly board are soldered to the board and can’t be disabled unless you want to unsolder them, which will cause issues if you try to uMatt is correct, the pullup resistors on the I2C bus on the Mayfly board are soldered to the board and can’t be disabled unless you want to unsolder them, which will cause issues if you try to use I2C devices on the Mayfly like the DS3231 clock or the ADS1115 aux A/D.
-
-
AuthorPosts
- You must be logged in to reply to this topic.