Warning: Division by zero in /usr/share/web/joat/webshare/ds/index.php on line 1101

Warning: Division by zero in /usr/share/web/joat/webshare/ds/index.php on line 1101

Warning: Division by zero in /usr/share/web/joat/webshare/ds/index.php on line 1101

Warning: Division by zero in /usr/share/web/joat/webshare/ds/index.php on line 1101

Warning: Division by zero in /usr/share/web/joat/webshare/ds/index.php on line 1101

Warning: Division by zero in /usr/share/web/joat/webshare/ds/index.php on line 1101

Warning: Division by zero in /usr/share/web/joat/webshare/ds/index.php on line 1101

Warning: Division by zero in /usr/share/web/joat/webshare/ds/index.php on line 1101

Warning: Division by zero in /usr/share/web/joat/webshare/ds/index.php on line 1101

Warning: Division by zero in /usr/share/web/joat/webshare/ds/index.php on line 1101

Warning: Division by zero in /usr/share/web/joat/webshare/ds/index.php on line 1101

Warning: Division by zero in /usr/share/web/joat/webshare/ds/index.php on line 1101

Warning: Division by zero in /usr/share/web/joat/webshare/ds/index.php on line 1101

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/web/joat/webshare/ds/index.php:1101) in /usr/share/web/joat/webshare/ds/index.php on line 885
NDSTech Wiki : Real Time Clock browse
Misc /
Real Time Clock

Menu

Getting Started

System Information

Misc

Everything on this page is ARM7 only

Fixme: mis-filed stuff about R_CR R0_CR (0x04000138) c1fc (80ff=80ff, behaves like R cr reg)

R2_CR (0x04000136) reads 007f, can't force any bits (see key info) (R2 because it was the 3rd discovered, rename!)

R1_CR (0x04000138) retains ff7b

The RTC is wired to the second general purpose I/O port on the ARM7 (0x04000138:16):

bitname
3unknown/un-used (always input)
2CS (active high chip select)
1SCK (data clock)
0SIO (data pin)

Data written from the DS to the RTC should be valid on the rising edge of SCK, and data read back from the RTC to the DS should be sampled on the falling edge of SCK (i.e. just before setting SCK low, after the delay).

 
0x60: Write STATUS_REG1
0x62: Write STATUS_REG2
0x64: Write DATA_REG1
0x66: Write DATA_REG2
0x68: Write INT_REG1
0x6A: Write INT_REG2
0x6C: Write CLOCK_ADJUST_REG
0x6E: Write FREE_REG

Time data:

 
byte year;  // year (0..99)
byte month; // month (1..12)
byte day;   // day (1..(28..31))
byte week;  // day of week (0..6)
byte hour;  // hour of day (0..23 or 0..11), bit 6 is PM/AM
byte minute; // minute (0..59)
byte second; // second (0..59)

The data sent to/from the RTC must be in BCD format! LSB first.

The epoch for the year returned is 2000 (i.e. for 2005, it would return 5).

Interrupt mode:

32kEINT1AEINT1MEINT1FEInterrupt conditions
0000No interrupt
0x01Selected frequency steady interrupt
0x10Once a minute edge interrupt
0011Once a minute steady interrupt 1 (50% duty)
0100Alarm interrupt
0111Once a minute steady interrupt 2
1xxx32 kHZ output
Recent Changes (All) | Edit SideBar

Page last modified on March 16, 2005, at 10:32 PM
Edit Page | Page History
Everything done on this project is for the sole purpose of writing interoperable software under Sect. 1201 (f) Reverse Engineering exception of the DMCA.
This site is not affiliated with Nintendo in any manner. Nintendo DS © 2004 Nintendo. TM and ® are trademarks of Nintendo.
Powered by PmWiki