📄 isp.c
字号:
#include <reg51.h>
#include <stdio.h>
#include <string.h>
#include "78e65.h"
//---------------------------------------------------
static char ispcomd[8]="prog....";
static char usercode[8]="WB05D000";
void isp_prog();
//---------------------------------------------------
void isp_prog()
{
// gets(ispcomd,8);
if(strcmp(ispcomd,usercode)==0)
{
printf("Enter ISP mode ,updata prog.\n");
CHPENR=0x87;
CHPENR=0x59;
CHPCON=0x03;
CHPENR=0x00;
IP=0x02;
EA=1;
ET0= 1;
TH0=0x04;
TL0=0x04;
TMOD=0x02;
TR0=1;
PCON=1;
}
else
{
printf("Enter ISP mode bad.\n");
}
}
//-------------------------------------------------------------------------
void UART() interrupt 4 using 2
{
gets(ispcomd,8);
}
//-------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -