I'm working on a project that requires digital potentiometers and an RTC. I have the code for each component working (one sketch for the digipots and one sketch for the RTC).
However, when I try to fuse them I'm seeing readouts from the RTC that do not change. I suspect that this is due to an address clash, but I haven't been able to find very much info on how to deconflict them.
Unfortunately I can't upload the code as is, so if anyone needs to see it I'll need to sanitize it before uploading.
what host microcontroller are you using and what RTC?
how have you connected the devices to the microcontroller?
if both devices use SPI you need a separate CS (Chip Select) for each device
missed that! the AD5206 is SPI so there should be no address clash
agreed - code would be useful, e.g. select “Edit>Copy for forum” then select < CODE/ > and paste the code or text where it says “type or paste code here”
I believe I have figured it out. The DS3231 uses I2C (2 wire) communication, while the AD5206 uses SPI (3 wire) communication. I'm going to try using a DS1302 RTC instead, which uses SPI.
Instead of editing your code to sanitize it, simply create a small sketch that demonstrates the problem. You may even spot the issue yourself as you do this.
I don't think you have figured anything out, and buying a new clock module may not fix it. You are already (apparently) aware that the RTC and the AD5206 are riding on completely different buses, so you may now conclude that that there is nothing to suggest that one has anything to do with the other.
You are correct. The tutorials I was using for the DS3231 had it plugged into A4 and A5. I came across a tutorial that had them plugged into the SDA and SCL pins (which are unmarked on the Uno R3 clone that I'm prototyping with). No changes were needed in the code to get it working.
I haven't used I2C very much, mainly SPI so this has been a bit of a learning curve for me, haha!
The SDA and SCL pins are the same as A4 and A5; they are just connected in parallel.
In fact, they are the same pins on the microcontroller, as they perform both functions.
If connecting the SDA and SCL pins works well, then connecting A4 and A5 will necessarily work well too.