e997031.pdf
(
46 KB
)
Pobierz
138908498 UNPDF
EEPROM protection
in AVR controllers
031
H. Bonekamp
AVR controllers have the unfortunate property of their data EEP-
ROM being affected when the supply voltage drops below a cer-
tain level, which can, of course, be prevented by making the reset
low in good time to disable the processor. Unfortunately, this
requires a circuit for monitoring the supply voltage and for taking
the requisite action automatically when needed.
This requirement is met by the circuit in the diagram, which
draws a low enough current to enable it being powered by a bat-
tery. The circuit may be split into a detector, T
1
, and an amplifier,
T
2
–T
3
.
The trip voltage of the detector is determined by the values of
R
1
and R
2
. Normally, the transistor conducts, but as soon as the
supply voltage drops below the trip level, it is cut off. The output of
Elektor Electronics
7-8/99
59
T
1
is applied to a low-power amplifier.
During normal operation, transistor T
3
is off, so that R
5
func-
tions as pull-up resistor to retain the RST input of the AVR
processor high. When the detector goes off, T
3
is switched on and
the RST input goes low, a process that is enhanced by transistor
T
2
being switched on, whereupon R
3
is shorted out. The resulting
hysteresis requires the supply voltage to exceed the trip voltage
before this situation can change. A manual reset is possible at all
times with witch S
1
.
As stated earlier, the trip voltage is determined by the values
of R
1
and R
2
(and, to some degree, the base-emitter potential of T
1
– about 540 mV), and the tolerance of these resistors should there-
fore be 1%. If the trip voltage needs to be altered, it is best to
retain the value of R
1
at 10 M
5V
R1
R4
R5
ISP
VCC
BC
557B
R3
T2
AVR
AT90S.....
RST
T3
and change the value of R
2
T1
BC
GND
according to
547B
R2
S1
C3
C1
C2
R
2
=0.54R
1
/(
U
b
–0.54),
100n
547B
100n
100n
RESET
where R
2
is in ohms and
U
b
is the supply voltage.
The hysteresis is determined by the value of R
4
: the smaller this
is, the larger the hysteresis. The specified value of 3.3 MΩ
994083 - 11
is fine
for most cases, but some experimentation does no harm.
[994083]
BC
Plik z chomika:
TirNaNog
Inne pliki z tego folderu:
bge.jpg
(22 KB)
detail1.htm
(5 KB)
detail10.htm
(6 KB)
detail12.htm
(12 KB)
e991018.pdf
(794 KB)
Inne foldery tego chomika:
1974
1975
1976
1977
1978
Zgłoś jeśli
naruszono regulamin