
Flash/EE Program Memory Security
The ADuC841/ADuC842/ADuC843 facilitate three modes of Flash/EE program memorysecurity. These modes can be independently activated, restricting access to the internal code
space. These security modes can be enabled as part of serial download protocol as described in Application Note uC004 or via parallel programming. The security modes available on the
parts are as follows:
Lock Mode
野芦 This mode locks the code memory, disabling parallel programming of the program memory. However, reading the memory in parallel mode and reading the memory via a MOVC command from external memory is still allowed. This mode is deactivated by initiating a code-erase command in serial download or parallel programming modes.
Secure Mode
This mode locks code in memory, disabling parallel programming (program and verify/read commands) as well as disabling the execution of a MOVC instruction from external memory,which is attempting to read the op codes from internal memory. Read/write of internal data Flash/EE from external memory is also disabled. This mode is deactivated by initiating a code-erase command in serial download or parallel programming modes.
Serial Safe Mode
This mode disables serial download capability on the device. If serial safe mode is activated and an attempt is made to reset the part into serial download mode, i.e., RESET asserted and deasserted with PSEN low, the part interprets the serial download reset as a normal reset only. It therefore cannot enter serial download mode but can only execute as a normal reset sequence. Serial safe mode can be disabled only by initiating a code-erase command in parallel programming mode.
可以先安装下面补丁(网上可下载,可区分、繁体版):
Windows6.1-KB958830-x64-RefreshPkg.msu
Windows6.1-KB958830-x86-RefreshPkg.msu
下面提供方法:
1. 根据环境选择所安装的补丁。
2. 安装补丁。
3. 完成向导中的所有安装步骤,安装完成时,单击“完成”退出向导。
4. 依次单击“开始”、“控制面板”和“程序”。
5. 在“程序和功能”区域,单击“打开或关闭 Windows 功能”。
6. 如果“用户帐户控制”提示您可以打开“Windows 功能”对话框,则单击“继续”。
7. 在“Windows 功能”对话框中,展开“远程服务器管理工具”。
8. 选择要安装的远程管理工具。
9. 单击“确定”。
10. 配置“开始”菜单以显示并咐蠢“管理工具”快捷方式(如果菜单上未显绝陪示此快捷方式)。
右键单击“开始”,然后单击“属性”。
在“‘开始’菜单”选项卡上,单击“自定义”。
在“自定义‘开始’菜简耐单”对话框中,向下滚动至“系统管理工具”,然后选择“在‘所有程序’菜单和‘开始’菜单上显示”。单击“确定”。由远程服务器管理工具安装的管理单元的快捷方式,现已添加到“开始”菜单中的“管理工具”列表中。
AD0809的采集程序//---A/D转换---
//-----头文件引用------
#include <Reg51.h>
#include <absacc.h>
#include <intrins.h>
typedef unsigned char BYTE/*自定义字节类型*/
#define Set_Bit(BIT) (BIT = 1) /*定义置1函数*/
#define Clear_Bit(BIT) (BIT = 0) /*定义清0函数*/
/************************************************************************************/
void Write_Hd7279(BYTE,BYTE)/*定义HD7279写函数*/
BYTE Read_Hd7279(BYTE)/*定义HD7279读函数*/
void Send_Byte(BYTE)/*定义HD7279发送字节函数*/
BYTE Receive_Byte(void)/清冲*定义HD7279接收字节函数*/
void Short_Delay(void)/*定义短延时函数*/
void Long_Delay(void)/*定义长延时函数*/
void Mcu_Init(void)/*定义MCU初始化函数*/
void Delay_200_mS(void)/*定义200ms延时函数*/
sbit Hd7279_Clk=P1^6/*定义HD7279时钟硬件连接*/
sbit Hd7279_Data=P1^5/*定义HD7279数据硬件连接携则*/
sbit cs=P1^7
void Short_Delay(void) /*短延时函数*/
{
BYTE i
for(i=0i<0x08i++)
}
/************************************************************************************/辩正棚
void Long_Delay(void) /*长延时函数*/
{
BYTE i
for(i=0i<0x30i++)
}
/************************************************************************************/
void Write_Hd7279(BYTE Command,BYTE Data) /*HD7279写函数*/
{
Send_Byte(Command)
Send_Byte(Data)
}
/************************************************************************************/
void Send_Byte(BYTE Data_Out) /*HD7279发送字节函数*/
{
BYTE i
cs=0
Long_Delay()
for(i=0i<8i++)
{
if(Data_Out&0x80) Set_Bit(Hd7279_Data)
else Clear_Bit(Hd7279_Data)
Set_Bit(Hd7279_Clk)
Short_Delay()
Clear_Bit(Hd7279_Clk)
Short_Delay()
Data_Out=Data_Out<<1
}
Clear_Bit(Hd7279_Data)
}
//-----宏声明-----
#define A_DPORT XBYTE[0xFef3]//0809通道0地址
#define uchar unsigned char
//-----变量定义-----
bit bdata bz=0//定义标志
uchar val
//-----初始化-----
void first(void)
{
P1=0xff
P2=0xff
P3=0xff
P0=0xff
Send_Byte(0xa4)
IT1=1
EX1=1
EA=1//INT0 允许
}
//-----中断-----
void int_0(void) interrupt 2
{
val=A_DPORT//读 A_D 数据
bz=1//置读数标志
}
//-----主程序-----
main()
{
first()//初始化
while(1)
{
A_DPORT=val//启动 A_D
while(bz==0)//等待 A_D 转换结束
// val=~A_DPORT
//P1=val//数据输出
Write_Hd7279(0xc8,val&0x0f)
Write_Hd7279(0xc9,val>>4)
Write_Hd7279(0x92,0x00)
Write_Hd7279(0x93,0x00)
Write_Hd7279(0x94,0x00)
Write_Hd7279(0x95,0x00)
Write_Hd7279(0xce,0x0d)
Write_Hd7279(0xcf,0x0a)
bz=0//清读数标志
}
}
这就是C的程序
http://hi.baidu.com/dzkfw/blog/item/4a188216fd986b12c83d6d05.html
不平凡的单片机学习资料,很好的单片机教程,超好用,一个不占内存的教程,有案例。
1、最新版单片机编程宝典下载地址,学习单片机编程必备手册
2、单片机c语言运用例子
3、十天学会单片机c语言和单片机制作,最好的单片机资料
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)