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

X  

ADE5166 数据表(PDF) 103 Page - Analog Devices

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

ADE5166 数据表(HTML) 103 Page - Analog Devices

Back Button ADE5166 Datasheet HTML 99Page - Analog Devices ADE5166 Datasheet HTML 100Page - Analog Devices ADE5166 Datasheet HTML 101Page - Analog Devices ADE5166 Datasheet HTML 102Page - Analog Devices ADE5166 Datasheet HTML 103Page - Analog Devices ADE5166 Datasheet HTML 104Page - Analog Devices ADE5166 Datasheet HTML 105Page - Analog Devices ADE5166 Datasheet HTML 106Page - Analog Devices ADE5166 Datasheet HTML 107Page - Analog Devices Next Button
Zoom Inzoom in Zoom Outzoom out
 103 / 148 page
background image
ADE5166/ADE5169
Rev. 0 | Page 103 of 148
Flash Functions
The following sample 8051 code is provided to demonstrate how to
use the the flash functions. For these examples, Flash Memory
Byte 0x3C00 is accessed.
Write Byte
Write 0xF3 into Flash Memory Byte 0x3C00.
MOV EDATA, #F3h
; Data to be written
MOV EADRH, #3Ch
; Set up byte address
MOV EADRL, #00h
MOV FLSHKY, #3Bh
; Write Flash security
key.
MOV ECON, #01H
; Write Byte
Erase Page
Erase the page containing Flash Memory Byte 0x3C00.
MOV EADRH, #3Ch
; Select page through
byte address
MOV EADRL, #00h
MOV FLSHKY, #3Bh
; Write Flash security
key.
MOV ECON, #02H
; Erase Page
Erase All
Erase all of the 62 kB flash memory.
MOV FLSHKY, #3Bh
; Write Flash security
key.
MOV ECON, #03H
; Erase All
Read Byte
Read Flash Memory Byte 0x3C00.
MOV EADRH, #3Ch
; Setup byte address
MOV EADRL, #00h
MOV FLSHKY, #3Bh
; Write Flash security
key.
MOV ECON, #04H
; Read Byte
; Data is ready in EDATA register
Note that the read byte command can be used to view the status
of the protection bytes located in the upper 21 bytes, Page 123.
The write byte command is not valid for this area.
PROTECTING THE FLASH MEMORY
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 cannot be read by the end
user. The write protection ensures that the flash memory cannot
be erased or written over. This protects the final product from
tampering and can prevent the code from being overwritten in
the event of a runaway program.
Write/erase protection is individually selectable for all 124 pages.
Read protection is selected in groups of four pages (see Figure 90
for the groupings). The protection bits are stored in the last flash
memory locations, Address 0xF7EB through Address 0xF7FF
(see Figure 91). Sixteen bytes are reserved for write/erase pro-
tection, four bytes for read protection, and another byte to set
the flash protection key (PROTKY, Address 0xBB). The user
must enable write/erase protection for the last page, at a minimum,
for the entire protection scheme to work.
Note that the read protection does not prevent MOVC commands
from being executed within the code.
There is an additional layer of protection offered by a protection
security key (PROTKY). The user can set up a protection security
key so that the protection scheme cannot be changed without
this key. When the protection key has been configured, it cannot
be modified.
Enabling Flash Protection by Code
The protection bytes in the flash can be programmed by using
the flash controller command and programming ECON to 0x08.
Issuing the ECON protection command initiates the program-
ming of one byte of protection data. The EADRL (Address 0xC6)
and EDATA (Address 0xBC) data pointers are used to store the
least significant address and data bytes, respectively. Note that
the EADRH data pointer is not used in this command.
The following sequence should be followed to enable the flash
protection:
1.
Set the EDATA data pointer with the write/erase or read
protection data. 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 pro-
tected. Note that when setting the read protection, each
protection bit protects four pages.
2.
Set the EADRL data pointer with the least significant byte of
the protection address. For example, to access the protection
on Page 112 through Page 119 (Address 0xF7FE), EADRL
should be written to 0xFE.
3.
Enable access to the flash by writing 3Bh to the FLSHKY
SFR (Address 0xBA).
4.
Issue the protection command by writing 08H to the
ECON SFR (Address 0xB9).
Step 1 to Step 3 should be repeated for each byte that requires
protection. While configuring the final byte of write/read pro-
tection, the PROTKY SFR can be enabled for a further level of
code security. If enabled, the flash protection key is required to
modify the protection scheme. To enable the flash protection
key, the Flash Location 0xF7EB where the PROTKY is located
should be written to using the flash control SFR (ECON,
Address 0xB9). The PROTKY can be written to any 8-bit value;
but once configured, it cannot be modified. To enable the PROTKY
and activate the flash protection, the part must be reset.



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