How sanandapatel/ads1220_adc works
This is Pico firmware for polling a TI ADS1220 and streaming alternating-channel raw samples over UART. At startup, main.c configures MCU peripherals and initializes the ADC; its loop waits for DRDY, reads a 24-bit result, switches the MUX, then sends a packet. The README also describes a downstream Arduino/PC receiver. Only polling_adc/main.c was sampled: its packet uses A5 5A and has no checksum, differing from the README’s packet-format description.
Main entry points: main.c Main Loop
Components 11
Firmware Control
- Main Loop
polling_adc/main.c - MCU I/O Setup
polling_adc/main.c
ADC Acquisition
- ADS1220 Setup
polling_adc/main.c - DRDY Polling
polling_adc/main.c - Raw Sample Read
polling_adc/main.c - MUX Switching
polling_adc/main.c
Data Streaming
- Packet Assembly
polling_adc/main.c - UART Output
polling_adc/main.c
Other components
- Power On
- ADS1220 ADC
- Serial Receiver
Connections 13
- Power On → Main Loop: starts
README.md - Main Loop → MCU I/O Setup: configures
polling_adc/main.c - Main Loop → ADS1220 Setup: calls
polling_adc/main.c - ADS1220 Setup → ADS1220 ADC: configures via SPI
polling_adc/main.c - Main Loop → DRDY Polling: polls
polling_adc/main.c - DRDY Polling → ADS1220 ADC: checks ready pin
polling_adc/main.c - Main Loop → Raw Sample Read: reads after ready
polling_adc/main.c - Raw Sample Read → ADS1220 ADC: reads via SPI
polling_adc/main.c - Main Loop → MUX Switching: advances channel
polling_adc/main.c - MUX Switching → ADS1220 ADC: writes register via SPI
polling_adc/main.c - Main Loop → Packet Assembly: assembles sample
polling_adc/main.c - Main Loop → UART Output: writes packet
polling_adc/main.c - UART Output → Serial Receiver: streams bytes
README.md