This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

MCP7940 drivers for nrf52840

We are working on external RTC MCP7940(i2c) interfaced with nrf52840. Please check if drivers of the same for nrf52/51 are available or any implementation of CLOCK using MCP7940 with NRF?

Regards

Vishal Aditya

Embedded Software Engineer

Parents Reply
  • Sampling for 5secs:

    Please check the traces of MCP_Breakout with Arduino:

    With Arduino, MCP Works properly able to do i2c, SET & GET DATETIME

    Arduino Code:

    #include <Wire.h>
     
     
    void setup()
    {
      Wire.begin();
     
      Serial.begin(115200);
      while (!Serial);             // Leonardo: wait for serial monitor
      Serial.println("\nI2C Scanner");
    }
     
     
    void loop()
    {
      byte error, address;
      int nDevices;
     
      Serial.println("Scanning...");
     
      nDevices = 0;
      //for(address = 1; address < 127; address++ )
      while(1)
      {
    //SENDING 0x6F in decimal as per arduino Wire library
        Wire.beginTransmission(111);
        error = Wire.endTransmission();
     
        if (error == 0)
        {
          Serial.print("I2C device found at address 0x");
          if (address<16)
            Serial.print("0");
          Serial.print(address,HEX);
          Serial.println("  !");
     
          nDevices++;
        }
        else if (error==4)
        {
          Serial.print("Unknown error at address 0x");
          if (address<16)
            Serial.print("0");
          Serial.println(address,HEX);
        }    
      }
      if (nDevices == 0)
        Serial.println("No I2C devices found\n");
      else
        Serial.println("done\n");
     
      //delay(5000);           // wait 5 seconds for next scan
    }

    Please reply for a possible way of the solution!

Children
Related