|
DS80CH11 Datasheet, PDF (34/88 Pages) Dallas Semiconductor – System Energy Manager | |||
|
◁ |
DS80CH11
6.2 REGISTER DESCRIPTION
The microcontroller interface to either 2âWire serial port
consists of six Special Function Registers (SFRâs), per
Port, which are documented below. None of these reg-
isters are bit addressable.
6.2.1 2WFSx â 2âWire Frequency Select Registers
2WFS1; SFR ADDR.=09CH, 2WFS2; SFR ADDR.=0D3H
BIT 7
BIT 6
BIT 5
BIT 4
BIT 3
BIT 2
BIT 1
BIT 0
Read/Write Access: Unrestricted.
Initialization: 00H on any type of reset
The 2âWire Frequency Select Registers are 8âbit read/
write registers which are used by the microcontroller to
set the 2âWire clock data rate. The value programmed
into these registers sets the reload value for an 8âbit
autoâreload timer, which is clocked by the CPU
machine clock (tMCLK) through a divideâbyâ8 prescaler.
The CPU machine clock period is the oscillator clock
period (tCLK) multiplied times 4, 64, or 1024 as deter-
mined by the programming of the system clock divider
6.2.2 2WDATx â 2âWire Data I/O Registers
bits (CD1, CD0) in the PMR register. The 2âwire clock
frequency can therefore be calculated using the follow-
ing formula:
f2Wx = fMCLK /((8 * Reload) +2); t2WCL= 1 / f2Wx
where
Reload=(2WFSx register value) for 2â255,
and
Reload=(256) for 2WFSx value=0
Reload=(1) is invalid
2WDAT1; SFR ADDR.=09BH, 2WDAT2; SFR ADDR.=0D2H
BIT 7
BIT 6
BIT 5
BIT 4
BIT 3
BIT 2
BIT 1
BIT 0
Read/Write Access: Unrestricted.
Initialization: 00H on any type of reset
The Data I/O Registers consist of transmit buffers and
the receive buffers. Both registers are located at SFR
address 9BH for Port 1 and D2H for Port 2. A write to
these locations results in a write to the transmit buffer
registers, while a read results in a read from the receive
buffer registers.
During transmit, a write to these locations results in
8âbits of data being transmitted on the 2âWire bus when
either master or slave transmit mode is established.
When master or slave receive mode is in effect, 8âbits
are shifted in via the shift register and immediately
transferred to the receive buffer. All data is shifted MSB
first.
6.2.3 2WSADRx â 2âWire Slave Address Registers
2WSADR1; SFR ADDR.=09AH, 2WSADR2; SFR ADDR.=0D1H
BIT 7
SLA6
BIT 6
SLA5
BIT 5
SLA4
BIT 4
SLA3
BIT 3
SLA2
BIT 2
SLA1
BIT 1
SLA0
BIT 0
â
Read/Write Access: Unrestricted.
Initialization: 00H on any type of reset
SLA6â0 â Slave Address bits
SLA6â0 are used to establish the 7âbit address recog-
nized by the 2âWire port when it is operating in slave
mode. The 7âbit slave address is MSB justified when it
is read or written by the firmware. When read, bit 0 is
always returned as a 0.
011200 34/88
|
▷ |