English
Language : 

W742E Datasheet, PDF (11/60 Pages) Winbond – 4 BIT MICROCONTROLLER
W742E/C811
5. FUNCTIONAL DESCRIPTION
5.1 Program Counter (PC)
Organized as an 14-bit binary counter (PC0 to PC13), the program counter generates the addresses of
the 16384(16K) × 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)
ADDRESS
0000H
0004H
0008H
000CH
0010H
0014H
INTERRUPT PRIORITY
-
1st
2nd
3rd
4th
5th
INT 5 (Serial I/O)
0018H
6th
INT 6 (Port1.3(/INT1))
001CH
7th
INT 7 (Timer 1)
Code Start
0020H
8th
0024H
-
5.2 Stack Register (STACK)
The stack register is organized as 51 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
bit0 = 1
bit1 = 1
bit2 = 1
bit3 = 1
bit4 = 1
bit5 = 1
bit6 = 1
Pop PC from stack only
Pop TAB0, TAB1, TAB2, TAB3 from stack
Pop DBKRL, DBKRH from stack
Pop WRP from stack
Pop ROMPR from stack
Pop PAGE from stack
Pop ACC from stack
Pop CF from stack
- 11 -
Publication Release Date: December 2000
Revision A1