English
Language : 

UPSD3354DV-40U6 Datasheet, PDF (47/272 Pages) STMicroelectronics – fast 8032 MCU with programmable logic
UPSD33xx
8032 addressing modes
MOV A, @R0
; Move into the accumulator the
; contents of IDATA SRAM that is
; pointed to by the address
; contained in R0.
9.4
Immediate addressing
This mode uses 8-bits of data (a constant) contained in the second byte of the instruction,
and stores it into the memory location or register indicated by the first byte of the instruction.
Thus, the data is immediately available within the instruction. This mode is commonly used
to initialize registers and SFRs or to perform mask operations.
There is also a 16-bit version of this mode for loading the DPTR register. In this case, the
two bytes following the instruction byte contain the 16-bit value. For example:
roduct(s) 9.5
roduct(s) - Obsolete P Note:
Obsolete P 9.6
MOV A, 40#
MOV DPTR, 1234#
; Move the constant, 40h, into
; the accumulator
; Move the constant, 1234h, into
; DPTR
External direct addressing
This mode will access external memory (XDATA) by using the 16-bit address stored in the
DPTR register. There are only two instructions using this mode and both use the
accumulator to either receive a byte from external memory addressed by DPTR or to send a
byte from the accumulator to the address in DPTR. The UPSD33xx has a special feature to
alternate the contents (source and destination) of DPTR rapidly to implement very efficient
memory-to-memory transfers. For example:
MOVX A, @DPTR
MOVX @DPTR, A
; Move contents of accumulator to
; XDATA at address contained in
; DPTR
; Move XDATA to accumulator
See details in Section 11: Dual data pointers on page 56.
External indirect addressing
This mode will access external memory (XDATA) by using the 8-bit address stored in either
register R0 or R1. This is the fastest way to access XDATA (least bus cycles), but because
only 8-bits are available for address, this mode limits XDATA to a size of only 256 bytes (the
traditional Port 2 of the 8032 MCU is not available in the UPSD33xx, so it is not possible to
write the upper address byte).
This mode is not supported by UPSD33xx.
For example:
Doc ID 9685 Rev 7
47/272