Download Print this page

Uart1 Reads And Writes Eeprom - Read Using Movc - STC micro STC8A8K64D4 Series Reference Manual

Advertisement

STC8A8K64D4 Series Manual
IAP_ERASE:
MOV
MOV
MOV
MOV
MOV
MOV
MOV
NOP
LCALL
RET
MAIN:
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
LCALL
MOV
LCALL
MOV
LCALL
LCALL
MOV
MOV
LCALL
MOV
LCALL
LCALL
SJMP
END

16.4.4 UART1 reads and writes EEPROM - Read using MOVC

C language code (main.c)
//Operating frequency for test is 11.0592MHz
/*
This program is completely normal after testing, and does not provide telephone technical support. If you cannot understand it,
please supplement the relevant basis yourself. */
/************* Function description of this program
STC8G family MCUs EEPROM general test program.
IAP_CONTR,#80H
IAP_TPS,#12
IAP_CMD,#3
IAP_ADDRL,DPL
IAP_ADDRH,DPH
IAP_TRIG,#5AH
IAP_TRIG,#0A5H
IAP_IDLE
SP, #5FH
P0M0, #00H
P0M1, #00H
P1M0, #00H
P1M1, #00H
P2M0, #00H
P2M1, #00H
P3M0, #00H
P3M1, #00H
P4M0, #00H
P4M1, #00H
P5M0, #00H
P5M1, #00H
UART_INIT
DPTR,#0400H
IAP_ERASE
DPTR,#0400H
IAP_READ
UART_SEND
DPTR,#0400H
A,#12H
IAP_PROGRAM
DPTR,#0400H
IAP_READ
UART_SEND
$
**************
;Enable IAP
;Set the erasing wait parameter of 12MHz
;Set IAP erasing command
;Set IAP low address
;Set IAP high address
;Write trigger command (0x5a)
;Write trigger command (0xa5)
;Disable IAP function
- 464 -

Advertisement

loading
Need help?

Need help?

Do you have a question about the micro STC8A8K64D4 Series and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Micro stc8a8k64d4-64pinMicro stc8a8k64d4-48pin