DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

UPSD3212A(2009) Просмотр технического описания (PDF) - STMicroelectronics

Номер в каталоге
Компоненты Описание
производитель
UPSD3212A Datasheet PDF : 181 Pages
First Prev 21 22 23 24 25 26 27 28 29 30 Next Last
Architecture overview
UPSD3212A, UPSD3212C, UPSD3212CV
2.11.3
Lookup tables
Table 11 shows the two instructions that are available for reading lookup tables in Program
Memory. Since these instructions access only Program Memory, the lookup tables can only
be read, not updated.
The mnemonic is MOVC for “move constant.” The first MOVC instruction in Table 11 can
accommodate a table of up to 256 entries numbered 0 through 255. The number of the
desired entry is loaded into the Accumulator, and the Data Pointer is set up to point to the
beginning of the table. Then:
MOVC A, @A+DPTR
copies the desired table entry into the Accumulator.
The other MOVC instruction works the same way, except the Program Counter (PC) is used
as the table base, and the table is accessed through a subroutine. First the number of the
desired en-try is loaded into the Accumulator, and the subroutine is called:
MOV A , ENTRY NUMBER
CALL TABLE
The subroutine “TABLE” would look like this:
TABLE: MOVC A , @A+PC
RET
The table itself immediately follows the RET (return) instruction is Program Memory. This
type of table can have up to 255 entries, numbered 1 through 255. Number 0 cannot be
used, because at the time the MOVC instruction is executed, the PC contains the address of
the RET instruction. An entry numbered 0 would be the RET opcode itself.
Table 10. Data transfer instruction that access external data memory space
Address Width
Mnemonic
Operation
8 bits
8 bits
MOVX A,@Ri
MOVX @Ri,A
READ external RAM @Ri
WRITE external RAM @Ri
16 bits
16 bits
MOVX A,@DPTR
MOVX @DPTR,a
READ external RAM @DPTR
WRITE external RAM @DPTR
Table 11. Lookup table READ instruction
Mnemonic
Operation
MOVC A,@A+DPTR
MOVC A,@A+PC
READ program memory at (A+DPTR)
READ program memory at (A+PC)
28/181

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]