leollo98 / AD7606

AD7606 library for Arduino framework
MIT License
13 stars 2 forks source link

Test serial example on Arduino H7 with breakout board #3

Open cuu123 opened 1 year ago

cuu123 commented 1 year ago

All zero, it seems no data was collected?why? Attache the code as follows:

#include <AD7606.h>
#include <Arduino_PortentaBreakout.h>

#define DB7 SPI1_CIPO
#define CS SPI1_CS
#define RD SPI1_CK

#define DB8 GPIO_0
#define CVA_CVB GPIO_4
#define RESET GPIO_3
#define BUSY GPIO_5

AD7606_Serial AD(DB7, DB8, RD, CS, CVA_CVB, CVA_CVB, BUSY, RESET);

void setup()
{
    Serial.begin(115200);
}

void loop()
{
    int16_t Data[8];
    AD.read(Data);
    for (uint8_t i = 0; i < 8; i++)
    {
        Serial.println(Data[i]);
    }
}
leollo98 commented 6 months ago

what's the microcontroller are you using? The arduino family was really problematic because I set the clock divider of the SPI wrong. The Dev branch was updated and is possibly working.