DS28DG02: 2Kb SPI EEPROM with PIO, RTC, Reset, Battery Monitor, and Watchdog
10 of 34
PIO Direction
ADDR b7 b6 b5 b4 b3 b2 b1 b0
122h
DIR7 DIR6 DIR5 DIR4 DIR3 DIR2 DIR1 DIR0
123h
X X X X DIR11 DIR10 DIR9 DIR8
There is general read and write access to these addresses. These registers are automatically loaded with data
from address 10Ch/10Dh when the device powers up.
BIT DESCRIPTION BIT(S) DEFINITION
DIRn: PIO Direction
Direction of PIO0 to PIO11. DIR0 applies to PIO0, etc.
Legend: 0 output; 1 input
X: (Not Assigned) Reserved for future use.
PIO Read Inversion (PIO0 to PIO7)
ADDR b7 b6 b5 b4 b3 b2 b1 b0
124h
IMSK7 IMSK6 IMSK5 IMSK4 IMSK3 IMSK2 IMSK1 IMSK0
There is general read and write access to this address. This register is automatically loaded with data from address
10Eh when the device powers up.
BIT DESCRIPTION BIT(S) DEFINITION
IMSKn: PIO Read-
Inversion
Read-inversion bit of PIO0 to PIO7. IMSK0 applies to PIO0, etc.
Legend: 0 no inversion; 1 inversion
PIO Read Inversion (PIO8 to PIO11), PIO Output Type and Output Mode
ADDR b7 b6 b5 b4 b3 b2 b1 b0
125h
OTM OT3 OT2 OT1
IMSK11 IMSK10
IMSK9 IMSK8
There is general read and write access to this address. This register is automatically loaded with data from address
10Fh when the device powers up.
BIT DESCRIPTION BIT(S) DEFINITION
IMSKn: PIO Read-
Inversion
b0 to b3
Read-inversion bit of PIO8 to PIO11. PIM8 applies to PIO8, etc.
Legend: 0 no inversion; 1 inversion
OT1: Output Type b4
Output type of PIO0 to PIO3;
Legend: 0 push-pull; 1 open drain
OT2: Output Type b5
Output type of PIO4 to PIO7;
Legend: 0 push-pull; 1 open drain
OT3: Output Type b6
Output type of PIO8 to PIO11;
Legend: 0 push-pull; 1 open drain
OTM: Output Mode b7
Output mode of PIO0 to PIO11;
Legend: 0 low-current, simultaneous switching; 1 high-current,
sequential switching
DS28DG02: 2Kb SPI EEPROM with PIO, RTC, Reset, Battery Monitor, and Watchdog
11 of 34
PIO Read Access
ADDR b7 b6 b5 b4 b3 b2 b1 b0
126h
IV7 IV6 IV5 IV4 IV3 IV2 IV1 IV0
127h
0 0 0 0 IV11 IV10 IV9 IV8
There is only read access to these addresses. Bits 4 to 7 of address 127h always read 0. Read access is functional
for all PIOs, regardless of their direction setting. Reported is the logic state of the pin, which may be different from
what the PIO output value register implies.
BIT DESCRIPTION BIT(S) DEFINITION
IVn: Input Value of PIOn
Logic state read from PIO0 to PIO11 pins. IV0 applies to PIO0, etc.
Legend: IVn = PIOn XOR’ed with IMSKn
Figure 4 shows a simplified schematic of a PIO. The flip flops are accessed through the PIO Output State (OVn)
and Read Access (IVn) registers and memory addresses 122h to 125 (DIRn, IMSKn, OTn). They are initialized at
power-up or during Refresh (see the SPI Interface Description) according to the data stored at memory addresses
10Ah to 10Fh. When a PIO is configured as input, the PIO output is tri-stated (high impedance). When a PIO is
configured as output, the PIO input is the same as the output state XORed with the corresponding read inversion
bit. The differences of the PIO behavior in low current and high current mode are explained in the PIO Read/Write
Access section near the end of this document.
Figure 4. PIO Simplified Schematic
D Q
CLK
D Q
CLK
D Q
CLK
D Q
CLK
DIRn
OVn
OTn
Vcc
D Q
CLK
IMSKn
PIOn Pin
to SPI Interface
IVn
OTn
from SPI Interface
CLK
DIRn
from SPI Interface
OVn
from SPI Interface
IMSKn
from SPI Interface
DS28DG02: 2Kb SPI EEPROM with PIO, RTC, Reset, Battery Monitor, and Watchdog
12 of 34
RTC and Calendar Registers
ADDR b7 b6 b5 b4 b3 b2 b1 b0
129h
0 10 Seconds Single Seconds
12Ah
0 10 Minutes Single Minutes
10hrs
12Bh
0 12/24
A/P
10hrs Single Hours
12Ch
0 0 0 0 0 Day of Week
12Dh
0 0 10 Date Single Date
12Eh
0 0 0 Single Months
12Fh
10 Years Single Years
There is general read and write access to these addresses. Bits shown as 0 cannot be written to 1. The RTC and
calendar registers are reset to 00h when the battery voltage ramps up. Writes take effect immediately. To prevent
unexpected increments during write access, first update the seconds; this creates a 1s window to finish updating
the RTC/Calendar registers without any carryover from the Seconds register. Whenever the DS28DG02 receives a
SPI Read command, the RTC and Calendar registers are copied to a buffer. When during a read access the
address counter points to the RTC/Calendar registers, data from the buffer is transmitted. To obtain most accurate
RTC data, start reading at the Seconds register.
The number representation of the RTC/Calendar registers is BCD (binary-coded decimal). The RTC can run in the
12-hour AM/PM and the 24-hour mode. The “12/24” bit (bit 6 of address 12Bh) defines the mode. For 12-hour
AM/PM mode, set this bit to 1; bit 5 of address 12Bh then indicates AM (0b) or PM (1b). In the 24-hour mode, bit 5
and bit 4 together indicate the multiple of 10 hours. The Day of Week register counts from 1 to 7. The calendar
logic is designed to automatically compensate for leap years. For every year value that is either 00 or a multiple of
4 the device will add a 29th of February. This will work correctly up to (but not including) the year 2100.
RTC Alarm Registers
ADDR b7 b6 b5 b4 b3 b2 b1 b0
130h
AM1 10 Seconds Single Seconds
131h
AM2 10 Minutes Single Minutes
10hrs
132h
AM3 12/24
A/P
10hrs Single Hours
0 0 0 Day of Week
133h
AM4 DY/DT
10 Date Single Date
There is general read and write access to these addresses. Bits shown as 0 cannot be written to 1. The RTC Alarm
registers are reset to 00h when the battery voltage ramps up. To generate an alarm, there must be a match
between Alarm registers and RTC registers. Alarm register addresses 130h to 132h correspond to RTC register
addresses 129h to 12Bh; bits 6:0 participate in the comparison. The lower 6 bits of register address 133h
correspond to 12Ch if DY/DT is 1 and to 12Dh if DY/DT is 0; the upper 2 bits of this register do not participate in the
comparison. The control bits AM1, AM2, AM3, and AM4 determine the frequency of the alarm, as shown in Table
1. When the alarm occurs, the CLKA bit of the Alarm and Status register at address 135h changes to 1. The RTC
must be running for the device to generate RTC alarms (OSCE at address 134h = 1).

DS28DG02E-3C+

Mfr. #:
Manufacturer:
Maxim Integrated
Description:
EEPROM 2Kb SPI EEPROM w/PIO RTC/Rst/Bat Mtr/Wtdg
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet