Overview
The ADS1256 is a 24-bit delta-sigma analog-to-digital converter from Texas Instruments. It turns analog voltages into very high-resolution digital readings: up to 23 noise-free bits, at rates from 2.5 to 30,000 samples per second. Its eight inputs can be read as eight single-ended channels or as four differential pairs, and a programmable gain amplifier (1× to 64×) brings millivolt signals from load cells, thermocouples and bridge sensors into range.
This module adds what the chip needs to run: a 2.5 V reference, a 7.68 MHz crystal and a 3.3 V regulator for the digital side. It needs a 5 V supply and talks SPI. Its control inputs accept both 3.3 V and 5 V logic and its outputs are 3.3 V signals, so the same wiring idea works for an Arduino Uno, ESP32, Raspberry Pi and Pico. One 8-pin header carries power and SPI, and a 2×8 header carries AIN0 to AIN7, each next to its own ground pin.
Typical uses are precision data logging, weigh scales, temperature front ends, battery and cell monitoring, and any project where a microcontroller's built-in 10 or 12-bit ADC is not enough. This manual covers the pinout, wiring for Arduino, ESP32, Raspberry Pi and Pico, working code for each, and answers on input ranges, differential readings, gain, noise and speed.
At a Glance
Specifications
| Parameter | Value |
| ADC IC | Texas Instruments ADS1256 |
| Resolution | 24 bits, up to 23 bits noise-free |
| Inputs | AIN0 – AIN7: 8 single-ended or 4 differential |
| Data rate | 2.5 to 30,000 samples per second |
| Gain (PGA) | 1, 2, 4, 8, 16, 32 or 64 |
| Full-scale range | ±5 V differential at gain 1 (±5 V divided by the gain) |
| Input limits | 0 to 5 V on every input (0 to 3 V with the input buffer on) |
| Reference | 2.5 V, on board |
| Interface | SPI mode 1, up to 1.92 MHz, plus DRDY output |
| Supply voltage | 5 V (4.75 – 5.25 V) |
| Logic levels | Inputs accept 3.3 V or 5 V · outputs are 3.3 V |
| Board size | About 60 × 35 mm, four mounting holes |
Pinout Diagram
The pin names are printed on the underside of the board, and the diagram shows that side. The 8-pin header carries 5V, GND, SCLK, DIN (data in, MOSI), DOUT (data out, MISO), DRDY, CS and PDWN. DRDY goes low each time a new reading is ready. PDWN is the sync and power-down input and must be held high for the chip to run, so wire it to 3.3 V. On the 2×8 header, the inner column next to the printed names is AIN0 to AIN7 and the outer column at the board edge is ground. Confirm the ground column with a multimeter's continuity test against the GND pin before you connect a sensor. Seen from the component side, the two headers swap left and right.
Wiring Guide
The module needs 5 V power, the four SPI lines, the DRDY output and a steady high level on PDWN. No level converter is needed on any of the four platforms. Keep every analog input between 0 and 5 V: a voltage below ground or above the supply can damage the chip.
Arduino Uno / Nano Wiring
| ADS1256 Pin | Arduino Pin | Notes |
|---|---|---|
| 5V | 5V | Power |
| GND | GND | Ground |
| SCLK | D13 | SPI clock |
| DIN | D11 | MOSI |
| DOUT | D12 | MISO |
| DRDY | D9 | Data ready |
| CS | D10 | Chip select |
| PDWN | 3.3V | Keep high |
ESP32 Wiring
| ADS1256 Pin | ESP32 Pin | Notes |
|---|---|---|
| 5V | 5V or VIN | Power |
| GND | GND | Ground |
| SCLK | GPIO 18 | SPI clock |
| DIN | GPIO 23 | MOSI |
| DOUT | GPIO 19 | MISO |
| DRDY | GPIO 4 | Data ready |
| CS | GPIO 5 | Chip select |
| PDWN | 3V3 | Keep high |
Raspberry Pi Wiring
| ADS1256 Pin | Raspberry Pi Pin | Notes |
|---|---|---|
| 5V | 5V (Pin 2) | Power |
| GND | GND (Pin 6) | Ground |
| SCLK | GPIO 11 (Pin 23) | SPI clock |
| DIN | GPIO 10 (Pin 19) | MOSI |
| DOUT | GPIO 9 (Pin 21) | MISO |
| DRDY | GPIO 17 (Pin 11) | Data ready |
| CS | GPIO 8 (Pin 24) | CE0 |
| PDWN | 3.3V (Pin 1) | Keep high |
Raspberry Pi Pico Wiring
| ADS1256 Pin | Pico Pin | Notes |
|---|---|---|
| 5V | VBUS (Pin 40) | USB 5 V |
| GND | GND (Pin 38) | Ground |
| SCLK | GP18 (Pin 24) | SPI0 clock |
| DIN | GP19 (Pin 25) | SPI0 TX |
| DOUT | GP16 (Pin 21) | SPI0 RX |
| DRDY | GP20 (Pin 26) | Data ready |
| CS | GP17 (Pin 22) | Chip select |
| PDWN | 3V3(OUT) (Pin 36) | Keep high |
Code Examples
View or download this product's example code on GitHub.
All three examples do the same job: reset the chip, check its ID, select gain 1 and 100 samples per second, run a self-calibration, then print the voltage on AIN0 to AIN7 once a second. Each input is measured against ground. Unconnected inputs float and show random values, so tie unused inputs to GND while you test.
Arduino and ESP32 — Read All Eight Inputs (No Library)
// ADS1256 24-bit ADC - read all eight inputs as single-ended voltages (no library needed)
// Uno/Nano: SCLK = D13, DIN = D11, DOUT = D12, CS = D10, DRDY = D9
// ESP32: SCLK = GPIO 18, DIN = GPIO 23, DOUT = GPIO 19, CS = GPIO 5, DRDY = GPIO 4
// Both: 5V pin = 5 V, GND = GND, PDWN = 3.3 V
#include <SPI.h>
#if defined(ESP32)
const int PIN_CS = 5;
const int PIN_DRDY = 4;
#else
const int PIN_CS = 10;
const int PIN_DRDY = 9;
#endif
const float VREF = 2.5; // on-board reference voltage
const uint8_t CMD_WAKEUP = 0x00;
const uint8_t CMD_RDATA = 0x01;
const uint8_t CMD_SDATAC = 0x0F;
const uint8_t CMD_RREG = 0x10;
const uint8_t CMD_WREG = 0x50;
const uint8_t CMD_SELFCAL = 0xF0;
const uint8_t CMD_SYNC = 0xFC;
const uint8_t CMD_RESET = 0xFE;
const uint8_t REG_STATUS = 0x00;
const uint8_t REG_MUX = 0x01;
const uint8_t REG_ADCON = 0x02;
const uint8_t REG_DRATE = 0x03;
SPISettings adcSPI(1000000, MSBFIRST, SPI_MODE1); // the chip allows up to 1.92 MHz
// Waits until DRDY goes low. Returns false after one second without a new reading.
bool waitDRDY() {
unsigned long start = millis();
while (digitalRead(PIN_DRDY) == HIGH) {
if (millis() - start > 1000) return false;
}
return true;
}
void sendCommand(uint8_t command) {
SPI.beginTransaction(adcSPI);
digitalWrite(PIN_CS, LOW);
SPI.transfer(command);
digitalWrite(PIN_CS, HIGH);
SPI.endTransaction();
}
void writeRegister(uint8_t reg, uint8_t value) {
SPI.beginTransaction(adcSPI);
digitalWrite(PIN_CS, LOW);
SPI.transfer(CMD_WREG | reg);
SPI.transfer(0x00); // write one register
SPI.transfer(value);
digitalWrite(PIN_CS, HIGH);
SPI.endTransaction();
}
uint8_t readRegister(uint8_t reg) {
SPI.beginTransaction(adcSPI);
digitalWrite(PIN_CS, LOW);
SPI.transfer(CMD_RREG | reg);
SPI.transfer(0x00); // read one register
delayMicroseconds(10); // the chip needs 6.5 us before it answers
uint8_t value = SPI.transfer(0x00);
digitalWrite(PIN_CS, HIGH);
SPI.endTransaction();
return value;
}
// Selects AIN<channel> against ground, restarts the filter and returns the settled voltage
float readVolts(uint8_t channel) {
writeRegister(REG_MUX, (channel << 4) | 0x08); // positive = AINx, negative = AINCOM
SPI.beginTransaction(adcSPI);
digitalWrite(PIN_CS, LOW);
SPI.transfer(CMD_SYNC);
delayMicroseconds(5);
SPI.transfer(CMD_WAKEUP);
digitalWrite(PIN_CS, HIGH);
SPI.endTransaction();
delay(12); // one full conversion at 100 samples per second
waitDRDY();
SPI.beginTransaction(adcSPI);
digitalWrite(PIN_CS, LOW);
SPI.transfer(CMD_RDATA);
delayMicroseconds(10); // the chip needs 6.5 us before it answers
int32_t code = SPI.transfer(0x00);
code = (code << 8) | SPI.transfer(0x00);
code = (code << 8) | SPI.transfer(0x00);
digitalWrite(PIN_CS, HIGH);
SPI.endTransaction();
if (code & 0x800000) code -= 0x1000000; // 24-bit two's complement to signed
return code * (2.0 * VREF) / 8388607.0; // gain 1: full scale = +/-5 V
}
void setup() {
Serial.begin(115200);
pinMode(PIN_CS, OUTPUT);
digitalWrite(PIN_CS, HIGH);
pinMode(PIN_DRDY, INPUT);
#if defined(ESP32)
SPI.begin(18, 19, 23); // SCLK, DOUT (MISO), DIN (MOSI)
#else
SPI.begin();
#endif
delay(50);
sendCommand(CMD_RESET);
delay(10);
sendCommand(CMD_SDATAC);
delay(1);
uint8_t id = readRegister(REG_STATUS) >> 4;
if (id != 3) {
Serial.print("ADS1256 not found (ID ");
Serial.print(id);
Serial.println(") - check wiring, 5 V power and PDWN");
while (true) { delay(1000); }
}
writeRegister(REG_ADCON, 0x00); // gain 1, clock output off
writeRegister(REG_DRATE, 0x82); // 100 samples per second
sendCommand(CMD_SELFCAL); // calibrate for these settings
delay(100);
waitDRDY();
}
void loop() {
for (uint8_t channel = 0; channel < 8; channel++) {
Serial.print("AIN");
Serial.print(channel);
Serial.print(": ");
Serial.print(readVolts(channel), 5);
Serial.println(" V");
}
Serial.println();
delay(1000);
}
Raspberry Pi — Python
#!/usr/bin/env python3
# ADS1256 24-bit ADC on Raspberry Pi - read all eight inputs as single-ended voltages
# Enable SPI first: sudo raspi-config, Interface Options, SPI
# Wiring: 5V = pin 2, GND = pin 6, SCLK = GPIO 11, DIN = GPIO 10, DOUT = GPIO 9,
# CS = GPIO 8 (CE0), DRDY = GPIO 17, PDWN = 3.3 V (pin 1)
import time
import spidev
from gpiozero import DigitalInputDevice
VREF = 2.5 # on-board reference voltage
CMD_WAKEUP, CMD_RDATA, CMD_SDATAC = 0x00, 0x01, 0x0F
CMD_RREG, CMD_WREG = 0x10, 0x50
CMD_SELFCAL, CMD_SYNC, CMD_RESET = 0xF0, 0xFC, 0xFE
REG_STATUS, REG_MUX, REG_ADCON, REG_DRATE = 0x00, 0x01, 0x02, 0x03
drdy = DigitalInputDevice(17)
spi = spidev.SpiDev()
spi.open(0, 0) # bus 0, chip select CE0
spi.mode = 1
spi.max_speed_hz = 40000 # a slow clock gives the chip its 6.5 us reply delay
def wait_drdy(timeout=1.0):
"""Wait until DRDY goes low. Returns False if nothing happens in time."""
end = time.monotonic() + timeout
while drdy.value == 1:
if time.monotonic() > end:
return False
return True
def write_register(reg, value):
spi.xfer2([CMD_WREG | reg, 0x00, value])
def read_register(reg):
return spi.xfer2([CMD_RREG | reg, 0x00, 0x00])[2]
def read_volts(channel):
"""Select AIN<channel> against ground and return the settled voltage."""
write_register(REG_MUX, (channel << 4) | 0x08) # positive = AINx, negative = AINCOM
spi.xfer2([CMD_SYNC, CMD_WAKEUP]) # restart the filter on the new input
time.sleep(0.012) # one full conversion at 100 samples per second
wait_drdy()
reply = spi.xfer2([CMD_RDATA, 0x00, 0x00, 0x00])
code = (reply[1] << 16) | (reply[2] << 8) | reply[3]
if code & 0x800000:
code -= 0x1000000 # 24-bit two's complement to signed
return code * (2 * VREF) / 8388607 # gain 1: full scale = +/-5 V
spi.xfer2([CMD_RESET])
time.sleep(0.01)
spi.xfer2([CMD_SDATAC])
chip_id = read_register(REG_STATUS) >> 4
if chip_id != 3:
raise SystemExit(f"ADS1256 not found (ID {chip_id}) - check wiring, 5 V power and PDWN")
write_register(REG_ADCON, 0x00) # gain 1, clock output off
write_register(REG_DRATE, 0x82) # 100 samples per second
spi.xfer2([CMD_SELFCAL]) # calibrate for these settings
time.sleep(0.1)
wait_drdy()
try:
while True:
for channel in range(8):
print(f"AIN{channel}: {read_volts(channel):9.5f} V")
print()
time.sleep(1)
except KeyboardInterrupt:
spi.close()
Raspberry Pi Pico — MicroPython
# ADS1256 24-bit ADC on Raspberry Pi Pico (MicroPython) - read all eight inputs
# Wiring: 5V = VBUS, GND = GND, SCLK = GP18, DIN = GP19, DOUT = GP16, CS = GP17,
# DRDY = GP20, PDWN = 3V3(OUT)
from machine import SPI, Pin
import time
VREF = 2.5 # on-board reference voltage
CMD_WAKEUP, CMD_RDATA, CMD_SDATAC = 0x00, 0x01, 0x0F
CMD_RREG, CMD_WREG = 0x10, 0x50
CMD_SELFCAL, CMD_SYNC, CMD_RESET = 0xF0, 0xFC, 0xFE
REG_STATUS, REG_MUX, REG_ADCON, REG_DRATE = 0x00, 0x01, 0x02, 0x03
spi = SPI(0, baudrate=1000000, polarity=0, phase=1, sck=Pin(18), mosi=Pin(19), miso=Pin(16))
cs = Pin(17, Pin.OUT, value=1)
drdy = Pin(20, Pin.IN)
def wait_drdy(timeout_ms=1000):
# Wait until DRDY goes low. Returns False if nothing happens in time.
start = time.ticks_ms()
while drdy.value() == 1:
if time.ticks_diff(time.ticks_ms(), start) > timeout_ms:
return False
return True
def command(*data):
cs.value(0)
spi.write(bytes(data))
cs.value(1)
def read_after(data, count):
# Send a command, give the chip its 6.5 us reply delay, then read count bytes
cs.value(0)
spi.write(bytes(data))
time.sleep_us(10)
reply = spi.read(count, 0x00)
cs.value(1)
return reply
def read_volts(channel):
# Select AIN<channel> against ground and return the settled voltage
command(CMD_WREG | REG_MUX, 0x00, (channel << 4) | 0x08) # positive = AINx, negative = AINCOM
cs.value(0)
spi.write(bytes([CMD_SYNC]))
time.sleep_us(5)
spi.write(bytes([CMD_WAKEUP])) # restart the filter on the new input
cs.value(1)
time.sleep_ms(12) # one full conversion at 100 samples per second
wait_drdy()
raw = read_after([CMD_RDATA], 3)
code = (raw[0] << 16) | (raw[1] << 8) | raw[2]
if code & 0x800000:
code -= 0x1000000 # 24-bit two's complement to signed
return code * (2 * VREF) / 8388607 # gain 1: full scale = +/-5 V
command(CMD_RESET)
time.sleep_ms(10)
command(CMD_SDATAC)
chip_id = read_after([CMD_RREG | REG_STATUS, 0x00], 1)[0] >> 4
if chip_id != 3:
raise RuntimeError("ADS1256 not found (ID {}) - check wiring, 5 V power and PDWN".format(chip_id))
command(CMD_WREG | REG_ADCON, 0x00, 0x00) # gain 1, clock output off
command(CMD_WREG | REG_DRATE, 0x00, 0x82) # 100 samples per second
command(CMD_SELFCAL) # calibrate for these settings
time.sleep_ms(100)
wait_drdy()
while True:
for channel in range(8):
print("AIN{}: {:9.5f} V".format(channel, read_volts(channel)))
print()
time.sleep(1)



