I've been working with the Raspberry Pi Pico for a project, but I need more ADC inputs than the pico itself has. To work around this issue, I've gotten an ADS7828, but I'm not sure how to use it so I've been going in circles...
I need to use the Arduino IDE, but the documentation on the subject is sparce or unclear (at least to me). The pinout for the 7828 is as follows:
Now the problem I face here is I'm not sure how to declare them in the code. I'm also not sure what the slaves A0 and A1 on the 7828 work and whether I need to connect them to the Pico or not (if I do, I also need to know how to declare them)
I'm new to this kind of situation as I've only done projects with a lot of documentation in the past, so I'm not sure how to approach this and would appreciate some help.
Hi, welcome to the forum.
Are you using the Raspberry Pi Pico with the Arduino IDE with C++ ?
Then you can use a normal library and hope that the environment for the Raspberry Pi Pico is good enough by now to be compatible.
Have you installed the Raspberry Pi Pico board in the Arduino IDE ?
I suggest to use the default pins. A call to Wire.begin(); should use the default.
Connect SDA to SDA, and SCL to SCL. Add pullup resistors of 10k.
Then the next step is to upload a I2C Scanner sketch to check if it can find the chip.
ADS7828 manufacturer's page: https://www.ti.com/product/ADS7828.
To understand the chip, you have to read the datasheet.
At page 9, you will see an example how to connect it.
A0, A1, GND to GND.
REF to a capacitor.
I have managed to make simple programs with the Pico thanks to a library made for it (that does work properly) and the board. I have no issues in that regard.
Thank you, this is the information I was looking for! The code you sent through the link seems like it'll work, I'll be able to test things out with this. I'll be sure to test things out and verify everything's working according to my needs
I've tried getting an I2C scanner sketch to work for a while now, but no matter what I try, I keep getting the same "No I2C devices found" message, meaning
if (nDevices == 0)
Serial.println("No I2C devices found\n");
else
Serial.println("done\n");
This part of the code is active, AKA there's no devices despite the 7828 being connected to the Pico
I've connected the chip as shown at page 9 and ran multiple versions of I2C scanner codes I could find, but in the end it's the same result...
I'll try it out with micropython but I still would like to be able to do it with the Arduino IDE, if anyone has an idea of how to fix the issue I'd appreciate it.
Do you have a Arduino board to test the ADS7828 with a I2C Scanner sketch ? It operates at 3.3V and and 5V, so any Arduino board is okay.
I have a Pico board, but no time at this moment to test it.
I've managed to fix it! I'm not sure what the exact solution is, as I had moved onto Python since Arduino wasn't working, and when I came back to it it did work (?)
Maybe my wiring was wrong, I have added a wire at pin 10 of the 7828 and connected it to VCC (I'm not sure if I had done so before)
In any case, here are all the resources I used for anyone interested (for the Arduino part, I'm still having some issues with Python) :