| Electronic Components Datasheet Search |
|
HMS91C8032 Datasheet(PDF) 15 Page - Hynix Semiconductor |
|
|
|||||||||||||||||||||||||||||
HMS91C8032 Datasheet(HTML) 15 Page - Hynix Semiconductor |
|
15 / 157 page ![]() HMS91C8032/97C8032 12 NOV., 2001 Ver 1.02 First, pointers R1 and R0 are set up to point to the two bytes con- taining the last four BCD digits. Then a loop is executed which leaves the last byte, location 2EH, holding the last two digits of the shifted number. The pointers are decremented, and the loop is repeated for location 2DH. The CJNE instruction (Compare and Jump if Not equal) is a loop control that will be described later. The loop executed from LOOP to CJNE for R1 = 2EH, 2DH, 2CH, and 2BH. At that point the digit that was originally shifted out on the right has propagated to location 2AH. Since that loca- tion should be left with 0s, the lost digit is moved to the Accumu- lator. External RAM HMC9XC8032 series do NOT support external RAM access mode. 3.6 Lookup Tables Table 3-4 shows the two instructions that are available for read- ing 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 3-1 can accommodate a table of up to 256 en- tries 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. Figure 3-2 Shifting a BCD Number Two Digits to the Right Figure 3-3 Shifting a BCD Number One Digits to the Right MOV A,2EH MOV 2EH,2DH MOV 2DH,2CH MOV 2CH,2BH MOV 2BH,#0 2A 2B 2C 2D 2E ACC 00 00 00 00 00 12 12 12 12 00 34 34 34 12 12 56 56 34 34 34 78 56 56 56 56 78 78 78 78 78 A. Using direct MOVs: 14 bytes, 9us CLR A XCH A,2BH XCH A,2CH XCH A,2DH XCH A,2EH 2A 2B 2C 2D 2E ACC 00 00 00 00 00 12 00 00 00 00 34 34 12 12 12 56 56 56 34 34 78 78 78 78 56 00 12 34 56 78 B. Using XCHs: 9 bytes, 5us MOV R1,#2EH MOV R0,#2DH 2A 2B 2C 2D 2E ACC 00 00 loop for R1 = 2EH MOV A,@R1 XCHD A,@R0 SWAP A MOV @R1,A DEC R1 DEC R0 CJNE R1,#2AH,LOOP 00 00 00 00 00 00 12 12 12 12 12 12 34 34 34 34 34 34 56 58 58 58 58 58 78 78 78 67 67 67 78 76 67 67 67 67 12 12 34 34 56 56 78 78 XX XX LOOP: loop for R1 = 2DH: loop for R1 = 2CH: loop for R1 = 2BH: 00 00 08 12 18 01 38 23 23 45 45 45 67 67 67 45 23 01 CLR A XCH A,2AH 00 08 01 01 23 23 45 45 67 67 00 08 MNEMONIC OPERATION MOVC A, @A+DPTR Read program memory at (A + DPTR) MOVC A, @A+PC Read program memory at (A + PC) Table 3-4 Table B-4 HMS9XC8032 Data Transfer Instruction that Access Internal Data Memory Spcace |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |