I am looking for using arduino due's internal rtc with a 3v rtc battery.
RTC oscillator already assembled and connected battery to VDDBU.
But i haven't got any idea about codes.
Have someone already tried to use it?
feveran:
I am looking for using arduino due's internal rtc with a 3v rtc battery.
RTC oscillator already assembled and connected battery to VDDBU.
But i haven't got any idea about codes.
Have someone already tried to use it?
Try this.
Hi, its not working.
When i make usb connection off and on again, rtc resets to 2007 0..0
feveran:
RTC oscillator already assembled and connected battery to VDDBU.
Hello feveran, just in case, verify that in your battery backup system, the VDDBU pin is powered from the 3.3V and the backup battery via a dual Schottky diode D1, as follows.
Regards!
No, i connected battery directly to the VDDBU.
Is this can be problem?
I also want to ask, is this scheme, no 1 pin of bat54c is connected to the 3.3 v. what is purpose of this? what will be done if connected or not connected?
thanks.
feveran:
No, i connected battery directly to the VDDBU.
Is this can be problem?
BAT54c is more a protection device for the battery backup system, but here is your problem:The Arduino Due reset pin is the NRSTB and not NRST, thus, every time that NRSTB lost power, it will reset the SAM3X8E Backup region (RTC, RTT and Supply Controller). This wouldn't be the case if NRST were connected to the reset button, because NRST does not reset the Backup region. This is one of the design changes to be done by the Ardino team in future Due revisions.
feveran:
I also want to ask, is this scheme, no 1 pin of bat54c is connected to the 3.3 v. what is purpose of this? what will be done if connected or not connected?
thanks.
I assume your backup battery is not rechargeable. and as I stated before, the BAT54c (schottky barrier) has a protective role, keeping the battery to be discharged in case no 1 drops below 3.3v. It also protects the battery in the opposite case when the power supply voltage is above 3.3v. Additionally, BAT54c has a low voltage drop. Regards!
I don't touch reset button, i only toggle the power. Is it same problem?
Could you show the connection between power supply (3.3v), backup battery and VDDBU pin? Thanks.
When i make usb connection off and on again, rtc resets to 2007 0..0
Hi, please look at the DUE schematic. There you find that Master-Reset is connected to the 16U2 which produces the reset pulse when reseting or during power-up sequence (DUE: Pin 47, NRSTB <-- MASTER-RESET--> 16U2: PC7, RESET_CMD) which take place during toggling power.
Bummer, there are really so little soldering jumpers for additional configuration on the board. I also think about how to use VDDBU.
Transistorfips:
Hi, please look at the DUE schematic. There you find that Master-Reset is connected to the 16U2 which produces the reset pulse when reseting or during power-up sequence (DUE: Pin 47, NRSTB <-- MASTER-RESET--> 16U2: PC7, RESET_CMD) which take place during toggling power.Bummer, there are really so little soldering jumpers for additional configuration on the board. I also think about how to use VDDBU.
So may i need to broke 16u2 pc7 connection?
feveran:
Transistorfips:
Hi, please look at the DUE schematic. There you find that Master-Reset is connected to the 16U2 which produces the reset pulse when reseting or during power-up sequence (DUE: Pin 47, NRSTB <-- MASTER-RESET--> 16U2: PC7, RESET_CMD) which take place during toggling power.Bummer, there are really so little soldering jumpers for additional configuration on the board. I also think about how to use VDDBU.
So may i need to broke 16u2 pc7 connection?
And finally without 16U2, RTC is keep alive with external battery
Here example code:
void setup() {
SerialUSB.begin(9600);
pmc_switch_sclk_to_32kxtal(PMC_OSC_XTAL);
while (!pmc_osc_is_ready_32kxtal());
RTC_SetHourMode(RTC, 0);
pinMode(6,INPUT);//rtc will be set without reset
}
void loop() {
int x=digitalRead(6);
if(x==0){
RTC_SetTime(RTC, 5, 4, 40); //set the time one time
}
uint8_t hour, minute, second;
uint8_t year, month, day, week;
RTC_GetTime(RTC, &hour, &minute, &second);
SerialUSB.print(hour);
SerialUSB.print(minute);
SerialUSB.println(second);
}
Some have reported that the 32 kHz oscillator (Y2) is not
on their Due board. I just got 4 "genuine" Due R3 boards,
and all 4 have the Y2 populated.
So, there remains two problems with trying to use the RTC:
- The NRSTB resets the RTC.
- VDDBU is tied directly to 3.3v power.
Hello,
I'm sorry but someone can show me a picture of the DUE that shows the connection of the modification for VDDBU?
Thanks in advance.
I was able to connect a battery to VDDBU. I've disconnected the VDDBU from 3.3V and connected to battery. The only difficult is to cut the pist correctly. I will post a picture.
This worked for me however I had slight issues when reconnecting the USB and random USB disconnects(they would cause the RTC to restart for no reason). I solved this by putting at 10nF and 100nF cap on the battery circuit, and one extra 10uF on the 3.3V to power just for good measure. No more random resets.