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
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
Yes getting 0x80
Below is the attached Arduino init sequence:
Wire.begin(); // Start I2C as master device Wire.setClock(i2cSpeed); // Set the I2C bus speed Wire.beginTransmission(MCP7940_ADDRESS); // Address the MCP7940M uint8_t errorCode = Wire.endTransmission(); // See if there's a device present if (errorCode == 0) // If we have a MCP7940M { clearRegisterBit(MCP7940_RTCHOUR, MCP7940_12_24); // Use 24 hour clock setRegisterBit(MCP7940_CONTROL, MCP7940_ALMPOL); // assert alarm low, default high _CrystalStatus = readRegisterBit(MCP7940_RTCSEC, MCP7940_ST); // Status bit from register _OscillatorStatus = readRegisterBit(MCP7940_RTCWKDAY, MCP7940_OSCRUN); // Oscillator state from register }MCP7940.h
Great, then you are good to go. You should be able to reuse the snippet I provided to configure the MCP7940. My suggestion would be to capture a trace of the Arduino Init sequence to see which values that are written to which register and then just copy paste the code snippet I provided and change the REG_RTCSEC register value and the 0x80 to match what you're seeing in the trace.