Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: basic MPC3202 reading problem

  1. #1

    basic MPC3202 reading problem


    I'm trying something very simple: reading samples from an MCP3202.
    I can't get it to work.

    #include <SPI.h>
    #include <Mcp320x.h>

    #define SPI_CS 10 // SPI slave select
    #define ADC_VREF 3300 // 3.3V Vref
    #define ADC_CLK 1600000 // SPI clock 1.6MHz

    MCP3202 adc(ADC_VREF, SPI_CS);

    void setup() {

    pinMode(SPI_CS, OUTPUT);
    digitalWrite(SPI_CS, HIGH);

    SPISettings settings(ADC_CLK, MSBFIRST, SPI_MODE0);

    void loop() {
    Serial.println( ));

    I triple checked the wiring of course but I get no output at all.
    I'm using this library: but an other doesn't work either.
    Connecting the same ADC to an arduino nano works fine.

  2. #2
    Observation: same code + electronics work fine on a teensy 4.0.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts