Current, Power & ADC

Microchip MCP3008 in the datasheet corpus

8-channel 10-bit SAR ADC over SPI (200 kSPS) supporting single-ended and pseudo-differential inputs.

standing: provisionalSPISPI Mode 0 or 3 (up to 3.6 MHz at 5 V)
VendorMicrochipCurrent, Power & ADC
InterfaceSPISPI Mode 0 or 3 (up to 3.6 MHz at 5 V)
Record StatusCatalog profileDatasheet / behavioral twin

Driver oracle & capability record

Indexed in the CircuitTwin datasheet corpus (adc-dac class); 3-byte full-duplex command/sample frame.

Driver referenceZephyr microchip,mcp3208 / Adafruit MCP3008
Evidence standingprovisional (register and bus behavior derived from vendor datasheet or driver oracle; not yet hardware-unit verified on two physical samples).
Published recordGenerate or inspect locally via ct twin generate (see /docs/twin-generation).

Key registers & reset values

Address / FieldRegisterReset / ExpectedPurpose
TX[0]START_BIT0x01Leading start bit aligns 10-bit result into RX[1:2]
TX[1]SGL_DIFF + CH[2:0](0x80 | ch<<4)Selects single-ended/differential and channel 0..7
RX[1:2]ADC_10BIT((rx1&3)<<8)|rx210-bit unsigned conversion word

Attach with ct CLI

Shell - run firmware with MCP3008
# Run compiled firmware with MCP3008 attached on rpi-pico
ct run --json --board rpi-pico --device mcp3008 build/app.elf

# Run fault-injection suite and emit JUnit XML
ct test run --json --junit results/mcp3008.xml tests/mcp3008-fault.suite.yaml

Fault-injection test snippet (suite.yaml)

tests/mcp3008-fault.suite.yaml
version: 1
board: rpi-pico
firmware: build/app.elf
tests:
  - name: mcp3008-spi-disconnect-and-fault
    faults:
      - at_ms: 40
        part: mcp3008
        kind: bus_disconnect
        duration_ms: 25
    expect:
      console_contains: "SPI_FAULT_HANDLED"
      exit_code: 0

Compatible board twins

More in Current, Power & ADC