4.1 Pad List..................................................................................................................................................6
6.6 Arithmetic and Logic Unit (ALU)...........................................................................................................13
6.7 Main Oscillator......................................................................................................................................13
The W742C810 is a high-performance 4-bit microcontroller (µC) that provides an LCD driver. The
device contains a 4-bit ALU, two 8-bit timers, two dividers (for two oscillators) in dual-clock operation,
a 40 × 4 LCD driver, six 4-bit I/O ports (including 1 output port for LED driving), and one channel
DTMF generator. There are also five interrupt sources and 8-level subroutine nesting for interrupt
applications. The W742C810 operates on very low current and has one power reduction mode, that is
the dual-clock slow operation, which helps to minimize power dissipation.
2. FEATURES
• Operating voltage: 2.4V−3.6V
• Dual-clock operation
• Main oscillator
− Connect to 3.58 MHz crystal only
• Sub-oscillator
− Connect to 32768 Hz crystal only
• Memory
− 8192 x 16 bit program ROM (including 32K x 4 bit look-up table)
− 1024 x 4 bit data RAM (including 16 nibbles x 16 pages working registers)
− 40 x 4 LCD data RAM
• 24 input/output pins
− Port for input only: 1 ports/4 pins
− Input/output ports: 3 ports/12 pins
− High sink current output port for LED driving: 1 port /4 pins
− Port for output only: 1 port/ 4 pins
• Power-down mode
− Hold function: no operation (main oscillator and sub-oscillator still operate)
− Stop function: no operation (only main oscillator stops but sub-oscillator still operates)
− Dual-clock slow mode: system is operated by the sub-oscillator (FOSC = Fs and Fm is stopped)
• Five types of interrupts
− Four internal interrupts (Divider0, Divider1, Timer 0, Timer 1)
− One external interrupt (RC Port)
• LCD driver output
− 40 segments x 4 commons
− 1/4 duty 1/3 bias driving mode
− Clock source should be the sub-oscillator clock in the dual-clock operation mode
• MFP output pin
− Output is software selectable as modulating or nonmodulating frequency
− Works as frequency output specified by Timer 1
Publication Release Date: May 1999
- 3 -Revision A1
Preliminary W742C810
CNCNCNC
CNCNCNC
• DTMF output pin
− Output is one channel Dual Tone Multi-frequency signal for dialling
• Two built-in 14-bit frequency dividers
− Divider0: the clock source is the output of the main oscillator
− Divider1: the clock source is the output of the sub-oscillator
• Two built-in 8-bit programmable countdown timers
− Timer 0: one of two internal clock frequencies (FOSC/4 or FOSC/1024) can be selected
− Timer 1: with auto-reload function, and one of three internal clock frequencies (FOSC, FOSC/64 or
Fs) can be selected by MR1 register; the specified frequency can be delivered to MFP pin
• Built-in 18/15-bit watchdog timer selectable for system reset; enable the watch dog timer or not is
Organized as a 13-bit binary counter (PC0 to PC12), the program counter generates the addresses of
the 8192 × 16 on-chip ROM containing the program instruction words. Before the jump or subroutine
call instructions are to be executed, the destination ROM page must be determined first. The
confirmation of the ROM page can be done by executing the MOV ROMPR, #I or MOV ROMPR, R
instruction. When the interrupt or initial reset conditions are to be executed, the corresponding
address will be loaded into the program counter directly. The format used is shown below.
Table 1 Vector address and interrupt priority
ITEMADDRESSINTERRUPT PRIORITY
Initial Reset0000HINT 0 (Divider0)0004H1st
INT 1 (Timer 0)0008H2nd
INT 2 (Port RC)000CH3rd
INT 3 (Divider1)0014H4th
INT 4 (Timer 1)0020H5th
JP InstructionXXXXHSubroutine CallXXXXH-
6.2 Stack Register (STACK)
The stack register is organized as 13 bits x 8 levels (first-in, last-out). When either a call subroutine or
an interrupt is executed, the program counter will be pushed onto the stack register automatically. At
the end of a call subroutine or an interrupt service subroutine, the RTN instruction must be executed
to pop the contents of the stack register into the program counter. When the stack register is pushed
over the eighth level, the contents of the first level will be lost. In other words, the stack register is
always eight levels deep.
6.3 Program Memory (ROM)
The read-only memory (ROM) is used to store program codes; the look-up table is arranged as 32768
×4 bits. The program ROM is divided into four pages; the size of each page is 2048 × 16 bits. Total
ROM size is therefore 8192 × 16 bits. Before the jump or subroutine call instructions are to be
executed, the destination ROM page must be determined first. The ROM page can be selected by
executing the MOV ROMPR, #I or MOV ROMPR, R instruction. However, the branch decision
instructions (e.g. JB0, SKB0, JZ, JC, ...) must jump to the same ROM page which the branch decision
instructions are located in. The whole ROM range can store both instruction codes and the look-up
table. Each look-up table element is composed of 4 bits, so the look-up table can be addressed up to
32768 elements. Instruction MOVC R is used to read the look-up table content and transfer table data
to the RAM. But before reading the addressed look-up table content, the content of the look-up table
pointer (TAB) must be determined first. The address of the look-up table element is allocated by the
content of TAB. The MOV TAB0 (TAB1, TAB2, TAB3), R instructions are used to allocate the address
of the wanted look-up table element. The TAB0 register stores the LSB 4 bits of the look-up table
address. The organization of the program memory is shown in Figure 6-1.
Publication Release Date: May 1999
- 9 -Revision A1
:
:
:
:
:
:
1st page
:
:
:
:
2nd page
3rd page
4th page
0000H
03FFH
0400H
07FFH
0800H
0BFFH
0C00H
0FFFH
1000H
13FFH
1400H
17FFH
1800H
1BFFH
1C00H
1FFFH
16 bits
Look-up Table address:
0000H
:
0FFFH
Look-up Table address:
2000H
:
2FFFH
Look-up Table address:
3000H
:
3FFFH
Look-up Table address:
4000H
:
4FFFH
Look-up Table address:
5000H
:
5FFFH
Look-up Table address:
6000H
:
6FFFH
Look-up Table address:
7000H
:
7FFFH
8192 * 16 bits
Preliminary W742C810
Each element (4 bits) of the look-up table
Look-up Table address:
1000H
:
1FFFH
Figure 6-1 Program Memory Organization
6.3.1 ROM Page Register (ROMPR)
The ROM page register is organized as a 4-bit binary register. The bit descriptions are as follows:
0123
ROMPR
Note: R/W means read/write available.
R/W
R/W
Bit 3 & Bit 2 is reserved.
Bit 1, Bit 0 ROM page preselect bits:
00 = ROM page 0 (0000H - 07FFH)
01 = ROM page 1 (0800H - 0FFFH)
10 = ROM page 2 (1000H - 17FFH)
11 = ROM page 3 (1800H - 1FFFH)
6.4 Data Memory (RAM)
6.4.1 Architecture
The static data memory (RAM) used to store data is arranged as 1024 × 4 bits. The data RAM is
divided into eight banks; each bank has 128 × 4 bits. Executing the MOV DBKR,WR or MOV
DBKR,#I instruction can determine which data bank is used. The data memory can be addressed
- 10 -
Preliminary W742C810
:
:
:
(or Working Registers bank)
(or Working Registers bank)
directly or indirectly. However, the data bank must be confirmed first; the page in the data bank will
be done in the indirect addressing mode, too. In indirect addressing mode, each data bank will be
divided into eight pages. Before the data memory is addressed indirectly, the page which the data
memory is located in must be confirmed. The organization of the data memory is shown in Figure 6-
2.
4 bits
1st data bank
2nd data bank
:
:
:
8th data bank
1024 * 4 bits
Figure 6-2 Data Memory Organization
1st data RAM page
(or 1st WR page)
2nd data RAM page
(or 2nd WR page)
3rd data RAM page
(or 3rd WR page)
:
:
8th data RAM page
(or 8th WR page)
00H
0FH
10H
1FH
20H
2FH
70H
7FH
:
:
:
:
1024
address
000H
07FH
080H
0FFH
380H
3FFH
The 1st and 2nd data bank (00H to 7FH & 80H to FFH) in the data memory can also be used as the
working registers (WR). This is also divided into sixteen pages. Each page contains 16 working
registers. When one page is used as WR, the others can be used as the normal data memory. The
WR page can be switched by executing the MOV WRP,R or MOV WRP,#I instruction. The data
memory cannot operate directly with immediate data, but the WR can do so. The relationship
between data memory locations and the page register (PAGE) in indirect addressing mode is
described in the next sub-section.
6.4.2 Page Register (PAGE)
The page register is organized as a 4-bit binary register. The bit descriptions are as follows:
Note: R/W means read/write available.
Bit 3 is reserved.
Bit 2, Bit 1, Bit 0 Indirect addressing mode preselect bits in one data bank:
The data bank register is organized as a 4-bit binary register. The bit descriptions are as follows:
0123
DBKR
Note: R/W means read/write available.
Bit 3 is reserved.
Bit 2, Bit 1, Bit 0 Data memory bank preselect bits:
000 = Data bank 0 (000H - 07FH)
001 = Data bank 1 (080H - 0FFH)
010 = Data bank 2 (100H - 17FH)
011 = Data bank 3 (180H - 1FFH)
100 = Data bank 4 (200H - 27FH)
101 = Data bank 5 (280H - 2FFH)
110 = Data bank 6 (300H - 37FH)
111 = Data bank 7 (380H - 3FFH)
R/WR/WR/W
- 12 -
Preliminary W742C810
6.5 Accumulator (ACC)
The accumulator (ACC) is a 4-bit register used to hold results from the ALU and transfer data
between the memory, I/O ports, and registers.
6.6 Arithmetic and Logic Unit (ALU)
This is a circuit which performs arithmetic and logic operations. The ALU provides the following
functions:
After any of the above instructions are executed, the status of the carry flag (CF) and zero flag (ZF) is
stored in the internal registers. CF can be read out by executing MOV R, CF.
6.7 Main Oscillator
The W742C810 provides a crystal oscillation circuit to generate the system clock through external
connections. The 3.58 MHz crystal must be connected to XIN1 and XOUT1, and a capacitor must be
connected to XIN1 and VSS if an accurate frequency is needed.
XIN1
Crystal
3.58MHz
Figure 6-3 System clock oscillator Configuration
XOUT1
6.8 Sub-Oscillator
The sub-oscillator is used in dual-clock operation mode. In the sub-oscillator application, only the
32768 Hz crystal can be connected to XIN2 and XOUT2, and a capacitor must be connected to XIN2
and VSS if an accurate frequency is needed. The sub-oscillator will be oscillatory continuously in
STOP mode.
6.9 Dividers
Each divider is organized as a 14-bit binary up-counter designed to generate periodic interrupts.
When the main oscillator starts action, the Divider0 is incremented by each clock (FOSC). When an
overflow occurs, the Divider0 event flag is set to 1 (EVF.0 = 1). Then, if the Divider0 interrupt enable
flag has been set (IEF.0 = 1), the interrupt is executed, while if the hold release enable flag has been
set (HEF.0 = 1), the hold state is terminated. The last 4-stage of the Divider0 can be reset by
executing CLR DIVR0 instruction. If the main oscillator is connected to the 32768 Hz crystal, the
EVF.0 will be set to 1 periodically at the period of 500 mS.
If the sub-oscillator starts action, the Divider1 is incremented by each clock (Fs). When an overflow
occurs, the Divider1 event flag is set to 1 (EVF.4 = 1). Then, if the Divider1 interrupt enable flag has
been set (IEF.4 = 1), the interrupt is executed, while if the hold release enable flag has been set
(HEF.4 = 1), the hold state is terminated. The last 4-stage of the Divider1 can be reset by executing
CLR DIVR1 instruction. The same as with EVF.0, the EVF.4 is set to 1 periodically. However, there
Publication Release Date: May 1999
- 13 -Revision A1
Loading...
+ 29 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.