Microcontroller cant find i2c address of adalogger

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
EjjiShin
 
Posts: 6
Joined: Wed Jun 21, 2017 4:42 pm

Microcontroller cant find i2c address of adalogger

Post by EjjiShin »

I have a M4 express trying to write to an adalogger. The code works on 18 of the devices Ive created however on the other 3 Im getting an error that states that the adalogger is not reachable on the I2C address 0x68. We've ordered about 25 of them, and the 18 that work with the code has a different IC chip on the board.
RTC.png
RTC.png (769.34 KiB) Viewed 87 times
The one on the left produces the error and the one on the right works just fine.

Im using curcuitpython, the code doesn't have a variable where I can change the I2C address. So a i2c sniffer may not help. Though I cant edit the library I am aware of commands able to change the address the code looks for the device at, i am unaware of them currently. If im able to use the adalogers without changing the code that would be appreciated.



https://www.adafruit.com/product/2922

User avatar
dastels
 
Posts: 15820
Joined: Tue Oct 20, 2015 3:22 pm

Re: Microcontroller cant find i2c address of adalogger

Post by dastels »

You can use an I2C scan to see the addresses that respond. See https://learn.adafruit.com/scanning-i2c-addresses.

Where did you get those boards (both types)? Both look legit but it's worth checking.

Dave

User avatar
EjjiShin
 
Posts: 6
Joined: Wed Jun 21, 2017 4:42 pm

Re: Microcontroller cant find i2c address of adalogger

Post by EjjiShin »

Yeah that's what Im currently trying to do but that still leaves the problem of implementing the new address location into the code, its using the library to locate the device " import rtc " and from what i understand .mpy are compiled biananries. Im currently looking up the documentation for the library to see if there's function i can pass near the beginning that changes the address used in the library. Also thank you for the help! Were at zero hour and the person assigned to work on this for the last few months bailed.

Im a Research assistant with a University, my PI told us that they ordered them a 2 months ago, They both came in the same order. The odd part is that the Adafruit store has one of the board versions as the second picture, the first picture is a different version and the other version I have is inst shown in the product page. I expected the different chips to share the same address, but when i correlated the error to the difference in included chip I got really confused. Mainly because I looked over the adalogger learn page and there's no mention of alternate addresses or even mention of there being multiple versions.

User avatar
dastels
 
Posts: 15820
Joined: Tue Oct 20, 2015 3:22 pm

Re: Microcontroller cant find i2c address of adalogger

Post by dastels »

The product description says the two versions are functionally the same so I'd expect them to be at the same address. Most I2C device libraries provide a way to specify an address if the device has adjustable addresses. The PCF8523 is fixed at 0x68 so the RTC on both versions of the board should be at that address.

You can use the scanner to find what addresses are in use. You don't need to know anything about what's on the bus.

Dave

User avatar
EjjiShin
 
Posts: 6
Joined: Wed Jun 21, 2017 4:42 pm

Re: Microcontroller cant find i2c address of adalogger

Post by EjjiShin »

The device comes back as 0x68. Checking through the code.

User avatar
EjjiShin
 
Posts: 6
Joined: Wed Jun 21, 2017 4:42 pm

Re: Microcontroller cant find i2c address of adalogger

Post by EjjiShin »

This is what im importing:
import rtc
import adafruit_pcf8523 # real time hardware_clock

Theres are the errors im getting and the appropriate line after the ":"
File "code.py", line 1500, in <module>:main()
File "code.py", line 128, in main :hardware_clock = adafruit_pcf8523.PCF8523( i2c_bus )
File "code.py", line 1160, in initialize_real_time_clock: hardware_clock = adafruit_pcf8523.PCF8523( i2c_bus )
File "adafruit_pcf8523.py", line 160, in __init__
ValueError: No I2C device at address: 0x68

The 12c Scan is giving the 0x68 address for the rtc.

User avatar
dastels
 
Posts: 15820
Joined: Tue Oct 20, 2015 3:22 pm

Re: Microcontroller cant find i2c address of adalogger

Post by dastels »

Please post photos of your connections/soldering, please.

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”