DS2790 Maxim Integrated Products, DS2790 Datasheet - Page 25

no-image

DS2790

Manufacturer Part Number
DS2790
Description
Programmable 1-Cell Li-Ion Fuel Gauge and Protector
Manufacturer
Maxim Integrated Products
Datasheet
www.DataSheet4U.com
DataSheet U .com
PROGRAMMABLE TIMER/COUNTER
The Timer/Counter block operates as a simple 8-bit interval timer or counter. The start value is programmable and
is automatically reloaded when a rollover occurs. The TMOD bit in the TCC register selects between the counter
and timer modes. In the counter mode, external events on the P0.3 pin are counted. In the timer mode, OSCA
clock source cycles are counted. The OSCA clock and brown-out detectors continue to run if the CPU is stopped.
Figure 8. Timer / Counter Block Diagram
The timer low byte (TLOW) is used to count input events, while the timer high byte (THI) is used to store the reload
value. Firmware must initialize TLOW and THI with the same value for the first count to be the same as succeeding
counts. TLOW counts up until FFh is reached, it is then automatically reloaded with the value in THI. THI remains
unchanged unless modified by firmware. The clock source is selected with TTCK[1:0] bits. The following table
describes the possible resolution and range of the timer.
Table 9. Programmable Timer Configuration
2-WIRE SLAVE PERIPHERAL INTERFACE MODULE
A 2-wire serial-peripheral interface for interconnection with external devices is incorporated into the DS2790. The
2-Wire Slave (TWS) peripheral allows interrupt driven I
of CPU overhead. A Transmit/Recieve Data register (TWSTXD/RXD) handles byte level data transfers and the
TWS FIFO register (TWSFIF) monitors the usage of the transmit and receive buffers. The 2-Wire Slave Command
register (TWSCMD) maintains the command byte of every communication sequence for use by the MAXQ20 core.
Configuration of the 2-wire interface is handled through the TWS Configuration register (TWSCFG) allowing system
software to change the DS2790’s slave address, control handshaking on the clock line, and control bus timeout
settings. The asynchronous interface between the TWS and MAXQ20 core is handled by TWS generated
interrupts reported in the Interrupt register (TWSINT) and controlled in Interrupt Mask Register (TWSIM).
4
TMOD
1
1
1
1
0
6.86ms
14.3us
220ms
OSCA
343us
TTCK[1:0]
TTCK[1:0]
N/A
0 0
0 1
1 0
1 1
2
TMOD
P0.3
0
1
0
0
DS2790 Programmable 1-Cell Li-Ion Fuel Gauge and Protector
CLOCK PERIOD
25 of 41
2
C or SMBus device communication with a minimal amount
6.86ms
14.3µs
220ms
343µs
TLOW
THI
Counter Mode
TIMER RANGE ( t * 2
7
7
INTERRUPT
Reload
TCI
3.66ms
87.9ms
1.76s
56.3s
8
)

Related parts for DS2790