STC TECHNOLOGY Co.,Ltd.
STC12C5A08/16/32/60
8-bit micro-controller
This document contains information on a new product under development by STC.STC reserves the right to change or discontinue this
product without notice. 2007/12 version A1
In-Application Program (IAP)
The In-Application Program feature is designed for user to Read/Write nonvolatile
data flash
.
It may bring great help to store parameters those should be independent of power-up and
power-done action. In other words, the user can store data in
data flash
memory, and after he
shutting down the MCU and rebooting the MCU, he can get the original value, which he had
stored in.
The user can program the
data flash
according to the same way as ISP program, so he should
get deeper understanding related to SFR
IAP_DATA, IAP_ADDRL, IAP_ADDRH, IAPCMD,
IAP_TRIG, and IAP_CONTR
.
The
data flash
can be programmed by the AP program as well as the ISP program.
The ISP program may program the AP memory and
data flash
, while the AP program may
program the
data flash
but not the ISP memory. If the AP program desires to change the ISP
memory associated with specific address space, the hardware will ignore it.
Instructions Set
DATA TRASFER
MNEMONIC
DESCRIPTION
BYT CYC
MOV A, Rn
Move register to Acc
1
1
MOV A, direct
Move direct byte o Acc
2
2
MOV A, @Ri
Move indirect RAM to Acc
1
2
MOV A, #data
Move immediate data to Acc
2
2
MOV Rn, A
Move Acc to register
1
2
MOV Rn, direct
Move direct byte to register
2
4
MOV Rn, #data
Move immediate data to register
2
2
MOV direct, A
Move Acc to direct byte
2
3
MOV direct, Rn
Move register to direct byte
2
3
MOV direct, direct
Move direct byte to direct byte
3
4
MOV direct, @Ri
Move indirect RAM to direct byte
2
4
MOV direct, #data
Move immediate data to direct byte
3
3
MOV @Ri, A
Move Acc to indirect RAM
1
3
MOV @Ri, direct
Move direct byte to indirect RAM
2
3
MOV @Ri, #data
Move immediate data to indirect RAM
2
3
MOV DPTR,#data16
Load DPTR with a 16-bit constant
3
3
MOVC A,@A+DPTR
Move code byte relative to DPTR to Acc
1
4
MOVC A,@A+PC
Move code byte relative to PC to Acc
1
4
PUSH direct
PUSH DIRECT BYTE ONTO STACK
2
4
POP direct
POP DIRECT BYTE FROM STACK
2
3
XCH A, Rn
EXCHANGE REGISTER WITH ACC
1
3
XCH A, direct
EXCHANGE DIRECT BYTE WITH ACC
2
4
XCH A, @Ri
EXCHANGE INDIRECT RAM WITH ACC
1
4
XCHD A, @Ri
EXCHANGE LOW-ORDER DIGIT INDIRECT RAM WITH ACC
1
4
http://www.DataSheet4U.net/
datasheet pdf - http://www.DataSheet4U.net/