area to realize the ISP function without power failure.
The following assumes that the user download command is the string "STCISP$", the serial port is set to 115200
baud rate, no parity bit and 1 stop bit. The settings in the ISP download software are as follows:
User sample code is as follows:
C Language Code
// Operating frequency for test is 11.0592MHz
#include "reg51.h"
#include "intrins.h"
#define FOSC 11059200UL
#define BR115200 (65536 - FOSC / 4 / 115200)
sfr IAP_CONTR = 0xc7;
sfr AUXR = 0x8e;
sfr P3M0 = 0xb2;
sfr P3M1 = 0xb1;
char stage;
void UartIsr() interrupt 4 // UART Interrupt Service Routine
{
char dat;
if (TI)
{
TI = 0;