Rf22, Low battery detector, Adcvalue mv tage batteryvol × + = 50 7 . 1 – Rainbow Electronics RF22 User Manual

Page 39: Wake-up timer, Ms m wut

Advertising
background image

RF22

Version: 0.1 Date: 12/23/2008

Tel: +86-755-82973805 Fax: +86-755-82973550 E-mail: [email protected] http://www.hoperf.com

39

8.5. Low Battery Detector

A low battery detector (LBD) with digital read-out is integrated into the chip. A digital threshold may be programmed
into the lbdt[4:0] field in "Register 1Ah. Low Battery Detector Threshold". When the digitized battery voltage reaches
this threshold an interrupt will be generated on the nIRQ pin to the microcontroller. The microcontroller will then need to
verify the interrupt by reading "Register 03h. Interrupt/Status 1" and "Register 04h. Interrupt/Status 2". If the LBD is
enabled while the chip is in SLEEP mode, it will automatically enable the RC oscillator which will periodically turn on
the LBD circuit to measure the battery voltage. The battery voltage may also be read out through "Register 1Bh.
Battery Voltage Level" at any time when the LBD is enabled. The Low Battery Detect function is enabled by setting
enlbd=1 in "Register 07h. Operating Mode and Function Control 1".

Ad R/W

Function/Description

D7

D6

D5

D4

D3

D2

D1

D0

POR Def.

1A R/W

Low Battery Detector Threshold

lbdt[4]

lbdt[3]

lbdt[2] lbdt[1] lbdt[0]

14h

1B

R

Battery Voltage Level

0

0

0

vbat[4] vbat[3] vbat[2] vbat[1] vbat[0]

The LBD output is digitized by a 5-bit ADC. When the LBD function is enabled, enlbd = 1 in "Register 07h. Operating
Mode and Function Control 1", the battery voltage may be read at anytime by reading "Register 1Bh. Battery Voltage
Level". A Battery Voltage Threshold may be programmed to register 1Ah. When the battery voltage level drops below
the battery voltage threshold an interrupt will be generated on nIRQ pin to the microcontroller if the LBD interrupt is
enabled in "Register 06h. Interrupt Enable 2". The microcontroller will then need to verify the interrupt by reading the
interrupt status register, Addresses 03 and 04H. The LSB step size for the LBD ADC is 50 mV, with the ADC range
demonstrated in the table below. If the LBD is enabled the LBD and ADC will automatically be enabled every 1 s for
approximately 250 μs to measure the voltage which minimizes the current consumption in Sensor mode. Before an
interrupt is activated four consecutive readings are required.

ADCValue

mV

tage

BatteryVol

×

+

=

50

7

.

1

ADC Value

VDD Voltage [V]

0

< 1.7

1

1.7–1.75

2

1.75–1.8

29

3.1–3.15

30

3.15–3.2

31

> 3.2

8.6. Wake-Up Timer

The chip contains an integrated wake-up timer which periodically wakes the chip from SLEEP mode. The wake-up
timer runs from the internal 32.768 kHz RC Oscillator. The wake-up timer can be configured to run when in SLEEP
mode. If enwt = 1 in "Register 07h. Operating Mode and Function Control 1" when entering SLEEP mode, the wake-up
timer will count for a time specified by the Wake-Up Timer Period in Registers 10h-12h. At the expiration of this period
an interrupt will be generated on the nIRQ pin if this interrupt is enabled. The microcontroller will then need to verify the
interrupt by reading the Interrupt Status Registers 03h-04h. The wake-up timer value may be read at any time by the
wtv[15:0] read only registers 13h-14h.
The formula for calculating the Wake-Up Period is the following:

ms

M

WUT

D

R

768

.

32

2

32

Ч

Ч

=

WUT Register

Description

wtr[3:0]

R Value in Formula

wtd[1:0]

D Value in Formula

wtm[15:0]

M Value in Formula

Advertising