STC8A8K64D4 Series Manual
RET
ISP_PROGRAMIAP:
MOV
MOV
MOV
MOV
MOV
NOP
NOP
NOP
NOP
MOV
ADD
MOV
MOV
ADDC
MOV
RET
ORG
LJMP
END
The ISP code includes the following external interface modules:
ISP_DOWNLOAD: program download entry address, absolute address
ISP_ENTRY: Power-on system self-check program (automatically called by the system)
For the user program, the user only needs to jump the PC value to ISPPROGRAM (ie FA00H, Absolute address), you
can update the code.
User codes (C language code)
// Operating frequency for test is 11.0592MHz
#include "reg51.h"
#define
FOSC
#define
BAUD
#define
ISPPROGRAM
sfr
AUXR
=
sfr
P1M0
=
sfr
P1M1
=
void (*IspProgram)() = ISPPROGRAM;
char cnt7f;
void uart() interrupt 4
{
if (TI) TI = 0;
if (RI)
{
if (SBUF == 0x7f)
{
cnt7f++;
WDT_CONTR,#17H
IAP_CMD,#2
IAP_DATA,A
IAP_TRIG,#5AH
IAP_TRIG,#0A5H
A,IAP_ADDRL
A,#01H
IAP_ADDRL,A
A,IAP_ADDRH
A,#00H
IAP_ADDRH,A
APENTRY
RESET
11059200L
(65536 - FOSC/4/115200)
0xfa00
0x8e;
0x92;
0x91;
;clear watchdog
; programming command
; send the current data to IAP data register
; Trigger ISP command
;IAP address +1
FA00H
// system clock frequency
//Define the serial port baud rate
//ISP download program entry address
// Baud Rate Generator Control Register
// define pointer function
//Isp_Check Internally used variables
// UART Interrupt Service Routine
// send complete interrupt
// Receive complete interrupt
- 835 -
Need help?
Do you have a question about the micro STC8A8K64D4 Series and is the answer not in the manual?