English
Language : 

W742C813 Datasheet, PDF (8/56 Pages) Winbond – 4 BIT MICROCONTROLLER
W742E/C813
5. FUNCTIONAL DESCRIPTION
5.1 Program Counter (PC)
Organized as an 15-bit binary counter (PC0 to PC14), the program counter generates the addresses of
the 32768(32K) × 16 on-chip ROM containing the program instruction words. When the interrupt or
initial reset conditions are to be executed, the corresponding address will be loaded into the program
counter directly. From address 0000h to 0023h are reserved for reset and interrupt service routine. The
format used is shown below.
Table 1 Vector address and interrupt priority
ITEM
Initial Reset
INT 0 (Divider0)
INT 1 (Timer 0)
INT 2 (Port RC)
INT 3 (Port 1.2 (/INT0))
INT 4 (Divider1)
INT 5 (Serial I/O)
INT 6 (Port1.3 (/INT1))
INT 7 (Timer 1)
Code Start
ADDRESS
0000H
0004H
0008H
000CH
0010H
0014H
0018H
001CH
0020H
0024H
INTERRUPT PRIORITY
-
1st
2nd
3rd
4th
5th
6th
7th
8th
-
5.2 Stack Register (STACK)
The stack register is organized as 53 bits x 16 levels (first-in, last-out). When either a call subroutine or
an interrupt is executed, the program counter (PC), TAB0, TAB1, TAB2, TAB3, DBKRL, DBKRH WRP,
ROMPR, PAGE, ACC and CF will be pushed into the stack register automatically. At the end of a call
subroutine or an interrupt service subroutine, the RTN (only restore the program counter) and RTN #I
instruction could pop the contents of the stack register into the corresponding registers. It can restore
part of contents of stack buffer. When the stack register is pushed over the 16th level, the contents of
the first level will be overwritten. In the other words, the stack register is always 16 levels deep. The bit
definition of #I is listed below.
I = 0000 0000 Pop PC from stack only
bit0 = 1
Pop TAB0, TAB1, TAB2, TAB3 from stack
bit1 = 1
Pop DBKRL, DBKRH from stack
bit2 = 1
bit3 = 1
Pop WRP from stack
Pop ROMPR from stack
bit4 = 1
Pop PAGE from stack
bit5 = 1
bit6 = 1
Pop ACC from stack
Pop CF from stack
-8-