Preliminary
SN8P1702A/SN8P1703A
8-bit micro-controller build-in 12-bit ADC
WORKING REGISTERS
The locations 82H to 84H of RAM bank 0 in data memory stores the specially defined registers such as register R, Z, Y,
respectively shown in the following table. These registers can use as the general purpose of working buffer and be
used to access ROM’s and RAM’s data. For instance, all of the ROM’s table can be looked-up with R, Y and Z
registers. The data of RAM memory can be indirectly accessed with Y and Z registers.
82H
R
83H
Z
84H
Y
RAM
R/W
R/W
R/W
Y, Z REGISTERS
The Y and Z registers are the 8-bit buffers. There are three major functions of these registers. First, Y and Z registers
can be used as working registers. Second, these two registers can be used as data pointers for @YZ register. Third,
the registers can be address ROM location in order to look-up ROM data.
Y initial value = 0000 0000
084H
Y
Bit 7
YBIT7
R/W
Bit 6
YBIT6
R/W
Bit 5
YBIT5
R/W
Bit 4
YBIT4
R/W
Bit 3
YBIT3
R/W
Bit 2
YBIT2
R/W
Bit 1
YBIT1
R/W
Bit 0
YBIT0
R/W
Z initial value = 0000 0000
083H
Z
Bit 7
ZBIT7
R/W
Bit 6
ZBIT6
R/W
Bit 5
ZBIT5
R/W
Bit 4
ZBIT4
R/W
Bit 3
ZBIT3
R/W
Bit 2
ZBIT2
R/W
Bit 1
ZBIT1
R/W
Bit 0
ZBIT0
R/W
The @YZ that is data point_1 index buffer located at address E7H in RAM bank 0. It employs Y and Z registers to
addressing RAM location in order to read/write data through ACC. The Lower 4-bit of Y register is pointed to RAM bank
number and Z register is pointed to RAM address number, respectively. The higher 4-bit data of Y register is truncated
in RAM indirectly access mode.
ꢁExample: If want to read a data from RAM address 25H of bank 1, it can use indirectly addressing mode to
access data as following.
B0MOV
B0MOV
B0MOV
Y, #01H
Z, #25H
A, @YZ
; To set RAM bank 1 for Y register
; To set location 25H for Z register
; To read a data into ACC
ꢁExample: Clear general-purpose data memory area of bank 1 using @YZ register.
MOV
A, #1
B0MOV
MOV
B0MOV
Y, A
A, #07FH
Z, A
; Y = 1, bank 1
; Y = 7FH, the last address of the data memory area
; Clear @YZ to be zero
CLR_YZ_BUF:
CLR
@YZ
DECMS
JMP
Z
; Y – 1, if Y= 0, finish the routine
; Not zero
CLR_YZ_BUF
CLR
@YZ
END_CLR:
; End of clear general purpose data memory area of bank 0
ꢀ
Note: Please consult the “LOOK-UP TABLE DESCRIPTION” about Y, Z register look-up table application.
SONiX TECHNOLOGY CO., LTD
Page 26
Revision 0.5