Post Go back to editing

CN0510 port to Arduino Uno / ESP32

Category: Software
Product Number: CN0510

Hej,

I want for my project an Arduino Uno or ESP32 WROOM 32. CN0510 uses the ADICUP3029. Is there a known example (hardware / software) for my purpose?

If not, what would be the best way to port it step by step? Just chaning ADICUP3029Port.c ? 

Best regards

Waleri

  • FormerMember
    0 FormerMember

I know there isn't an existing Arduino Uno or ESP32 project for the CN0510, so porting the existing code is going to be your best option. 

Adding   to see if she has any advice.

  • Yes. There is no Arduino Uno or ESP32 project available on repository.

  • Hej Akila,

    I made my ESP32 WROOM 32D to communicate with the AD5940. But there is still an issue, I guess.

    I have rewritten the ReadWriteNBytes function like this.

    void AD5940_ReadWriteNBytes(unsigned char *pSendBuffer, unsigned char *pRecvBuff, unsigned long length)
    {
        SPI.transfer(pSendBuffer, length);
    
        pRecvBuff = pSendBuffer;
     
    }
    In AD5940Main.cpp in function int32_t AD5940PlatformCfg(void) in AD5940_Initialize();
    I dont get the correct CHIPID
      for (i = 0; i < sizeof(RegTable) / sizeof(RegTable[0]); i++)
        AD5940_WriteReg(RegTable[i].reg_addr, RegTable[i].reg_data);
    
      i = AD5940_ReadReg(REG_AFECON_CHIPID);
      Serial.print("ID: ");
      Serial.println(i, HEX);
    It gives me ID: 8000
    BUT, on my logic analyzer I can see the correct ID coming.