Download SN8P1929
Transcript
SN8P1929 8-Bit Micro-Controller with Charge pump Regulator, PGIA, 16-bit ADC 2.1.7.1 X REGISTERS X register is an 8-bit buffer. There are two major functions of the register. z z can be used as general working registers can be used as ROM data pointer with the MOVC instruction for look-up table 085H X Read/Write After reset Bit 7 XBIT7 R/W 0 Bit 6 XBIT6 R/W 0 Bit 5 XBIT5 R/W 0 Bit 4 XBIT4 R/W 0 Bit 3 XBIT3 R/W 0 Bit 2 XBIT2 R/W 0 Bit 1 XBIT1 R/W 0 Bit 0 XBIT0 R/W 0 Note: Please refer to the “LOOK-UP TABLE DESCRIPTION” about X register look-up table application. 2.1.7.2 Y, Z REGISTERS The Y and Z registers are the 8-bit buffers. There are three major functions of these registers. z can be used as general working registers z can be used as RAM data pointers with @YZ register z can be used as ROM data pointer with the MOVC instruction for look-up table 084H Y Read/Write After reset 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 - 083H Z Read/Write After reset 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 - Example: Uses Y, Z register as the data pointer to access data in the RAM address 025H of bank0. B0MOV B0MOV B0MOV Y, #00H Z, #25H A, @YZ ; To set RAM bank 0 for Y register ; To set location 25H for Z register ; To read a data into ACC Example: Uses the Y, Z register as data pointer to clear the RAM data. B0MOV B0MOV Y, #0 Z, #07FH ; Y = 0, bank 0 ; Z = 7FH, the last address of the data memory area CLR @YZ ; Clear @YZ to be zero DECMS JMP Z CLR_YZ_BUF ; Z – 1, if Z= 0, finish the routine ; Not zero CLR @YZ CLR_YZ_BUF: END_CLR: ; End of clear general purpose data memory area of bank 0 … SONiX TECHNOLOGY CO., LTD Page 31 Preliminary Version 0.4