数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

ADE7166 数据表(PDF) 107 Page - Analog Devices

部件名 ADE7166
功能描述  Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
PDF  144 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  AD [Analog Devices]
网页  http://www.analog.com
标志 AD - Analog Devices

ADE7166 数据表(HTML) 107 Page - Analog Devices

Back Button ADE7166 Datasheet HTML 103Page - Analog Devices ADE7166 Datasheet HTML 104Page - Analog Devices ADE7166 Datasheet HTML 105Page - Analog Devices ADE7166 Datasheet HTML 106Page - Analog Devices ADE7166 Datasheet HTML 107Page - Analog Devices ADE7166 Datasheet HTML 108Page - Analog Devices ADE7166 Datasheet HTML 109Page - Analog Devices ADE7166 Datasheet HTML 110Page - Analog Devices ADE7166 Datasheet HTML 111Page - Analog Devices Next Button
Zoom Inzoom in Zoom Outzoom out
 107 / 144 page
background image
ADE7566/ADE7569/ADE7166/ADE7169
Rev. A | Page 107 of 144
The sequence for writing the protection bits is as follows:
PROTECTING THE FLASH MEMORY
1.
Set up the EADRH, EADRL, PROTB1, and PROTB0
registers with the write/erase protection bits. When erased,
the protection bits default to 1 (like any other bit of flash
memory). The default protection setting is for no protection.
To enable protection, write a 0 to the bits corresponding to
the pages that should be protected.
Two forms of protection are offered for this flash memory: read
protection and write/erase protection. The read protection ensures
that any pages that are read protected are not able to be read by
the end user. The write protection ensures that the flash memory
cannot be erased or written over. This protects the end system
from tampering and can prevent the code from being overwritten
in the event of a unexpected disruption of the normal execution
of the program.
2.
Set up the PROTR register with the read protection bits.
Note that every read protection bit protects four pages.
To enable the read protection bit, write a 0 to the bits that
should be read protected.
Write/erase protection is individually selectable for all 32 pages.
Read protection is selected in groups of 4 pages (see Figure 92
for the groupings). The protection bits are stored in the last
flash memory locations, Address 0x3FFA through Address
0x3FFF (see
3.
To enable the protection key, write to the PROTKY register.
If enabled, the protection key is required to modify the
protection scheme. The protection key, Flash Memory
Address 0x3FFA, defaults to 0xFF; if the PROTKY register
is not written to, it remains 0xFF. If the protection key is
written to, the PROTKY register must be written with this
value every time the protection functionality is accessed.
Note that once the protection key is configured, it cannot
be modified. Also note that the most significant bit of
Address 0x3FFA is used to enable a lock mechanism for
the watchdog settings (see the
Figure 94); four bytes are reserved for write/erase
protection, one byte is for read protection, and another byte sets
the protection security key. The user must enable read and
write/erase protection for the last page for the entire protection
scheme to work.
Note that the read protection does not prevent MOVC
commands from being executed within the code.
Watchdog Timer section
for more information).
There is an additional layer of protection offered by a protection
security key. The user can set up this security key so that the
protection scheme cannot be changed without this key. Once
the protection key has been configured, it cannot be modified.
4.
Run the protection command by writing 0x08 to the
ECON register.
5.
Reset the chip to activate the new protection.
Enabling Flash Protection by Code
To enable read and write/erase protection for the last page only,
use the following 8052 code. Writing the flash protection
command to the ECON register initiates programming of the
protection bits in the flash.
The protection bytes in the flash memory can be programmed
using the flash controller command and programming ECON to
0x08. In this case, the EADRH, EADRL, PROTB1, and PROTB0
bytes are used to store the data to be written to the 32 bits of
write protection. Note that the EADRH and EADRL registers
are not used as data pointers here but to store write protection
data.
; enable read protection on the last four
pages only
MOV PROTR,#07Fh
PROTR
PROTKY
PROTB0
PROTB1
EADRL
EADRH
RP
31:28
RP
27:24
RP
23:20
RP
19:16
RP
15:12
RP
11:8
RP
7:4
RP
3:0
WP
7
WP
6
WP
5
WP
4
WP
3
WP
2
WP
1
WP
0
WP
15
WP
14
WP
13
WP
12
WP
11
WP
10
WP
9
WP
8
WP
23
WP
22
WP
21
WP
20
WP
19
WP
18
WP
17
WP
16
WP
31
WP
30
WP
29
WP
28
WP
27
WP
26
WP
25
WP
24
PROTECTION KEY
0x3FFF
0x3FFE
0x3FFD
0x3FFC
0x3FFB
0x3FFA
0x3FF9
0x3E00
WDOG
LOCK
; set up a protection key of 0A3h. This
command can be
; omitted to use the default protection key
of 0xFF
MOV PROTKY,#0A3h
; write the flash key to the FLSHKY register
to enable flash
; access. The flash access key is not
configurable.
MOV FLSHKY,#3Bh
; write flash protection command to the ECON
register
Figure 94. Flash Protection in Page 31
MOV ECON,#08h



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com