SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
DESCRIPTION
The M37274MA-XXXSP is a single-chip microcomputer designed with
CMOS silicon gate technology. It is housed in a 52-pin shrink plastic
molded DIP.
In addition to their simple instruction sets, the ROM, RAM and I/O
addresses are placed on the same memory map to enable easy programming.
The M37274MA-XXXSP has a OSD function and a data slicer function, so it is useful for a channel selection system for TV with a closed
caption decoder.
FEATURES
Number of basic instructions..................................................... 71
•
Memory size
•
Minimum instruction execution time
•
......................................... 0.5
Power source voltage...................................................5 V ± 10 %
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
PIN DESCRIPTION
PinNameFunctions
VCC,
AV
CC,
V
SS
CNVSS
_____
RESET
XIN
XOUT
P00/PWM4–
P0
2
/PWM6,
P0
3
/DA,
P0
4
/PWM0–
P0
7
/PWM3
Power source
CNV
SS
Reset input
Clock input
Clock output
I/O port P0
DA output
8-bit PWM output
P10/OUT2,
P1
1/SCL1,
P1
2/SCL2,
P1
3/SDA1,
P1
4/SDA2,
P1
5,
P1
6/INT3,
P1
7/SIN
I/O port P1
OSD output
Multi-master
2
I
C-BUS interface
External interrupt
input
Serial I/O data
input
P20–P23
I/O port P2
P24/AD3–
P2
6/AD1,
P27/AD5
0, P31
P3
P40/AD4,
P4
1/INT2,
P4
2/TIM2,
P4
3/TIM3,
P4
4/INT1,
P4
5/SOUT,
6/SCLK
P4
Analog input
I/O port P3
Input port P4
Analog input
External interrupt
input
External clock input
Serial I/O data
output
Serial I/O
synchronous clock
input/output
P52/R,P53/G,
P5
4
/B,
P5
5
/OUT1
Output port P5
OSD output
Input/
Output
Input
Input
Output
I/O
Output
Output
I/O
Output
Output
Input
Input
I/O
Input
I/O
Input
Input
Input
Input
Output
I/O
Output
Output
Apply voltage of 5 V ± 10 % (typical) to V
Connected to V
SS.
To enter the reset state, the reset input pin must be kept at a “L” for 2
CC conditions).
normal V
If more time is needed for the quartz-crystal oscillator to stabilize, this “L” condition should
be maintained for the required time.
This chip has an internal clock generating circuit. To control generating frequency, an
external ceramic resonator or a quartz-crystal oscillator is connected between pins X
X
OUT. If an external clock is used, the clock source should be connected to the XIN pin and
OUT pin should be left open.
the X
Port P0 is an 8-bit I/O port with direction register allowing each I/O bit to be individually
programmed as input or output. At reset, this port is set to input mode. The output structure
of P0
3 is CMOS output, that of P00–P02 and P04–P07 are N-channel open-drain output.
See notes at end of Table for full details of port P0 functions.
Pin P0
3 is also used as 14-bit PWM output pin DA. The output structure is CMOS output.
0–P02 and P04–P07 are also used as PWM output pins PWM4–PWM6 and PWM0–
Pins P0
PWM3 respectively. The output structure is N-channel open-drain output.
Port P1 is an 8-bit I/O port and has basically the same functions as port P0. The output
structure of P1
0 and P15–P17 is CMOS output, that of P11–P14 is N-channel open-drain
output.
Pin P1
0 is also used as OSD output pin OUT2. The output structure is CMOS output.
1 is used as SCL1, SCL2, SDA1 and SDA2 respectively, when multi-master I
Pin P1
BUS interface is used. The output structure is N-channel open-drain output.
Pin P1
6 is also used as external interrupt input pin INT3.
Pin P1
7 is also used as serial I/O data input pin SIN.
Port P2 is an 8-bit I/O port and has basically the same functions as port P0. The output
structure is CMOS output.
Pins P2
4–P26, P27 are also used as analog input pins AD3–AD1, AD5 respectively.
Ports P3
0 and P31 are 2-bit I/O ports and have basically the same functions as port P0.
The output structure is CMOS output.
Ports P4
0–P46 are a 7-bit input port.
Pin P4
0 is also used as analog input pin AD4.
1, P44 are also used as external interrupt input pins INT2, INT1.
Pins P4
Pins P4
2 and P43 are also used as external clock input pins TIM2, TIM3 respectively.
Pin P4
5 is used as serial I/O data output pin SOUT. The output structure is N-channel open-
drain output.
Pin P4
6 is used as serial I/O synchronous clock input/output pin SCLK. The output structure
is N-channel open-drain output.
Ports P5
2–P55 are 4-bit output ports. The output structure is CMOS output.
2–P55 are also used as OSD output pins R, G, B, OUT1 respectively.
Pins P5
and ON-SCREEN DISPLAY CONTROLLER
CC and AVCC, and 0 V to VSS.
µ
s or more (under
IN and
2
C-
6
MITSUBISHI MICROCOMPUTERS
M37274MA-XXXSP
PRELIMINARY
Notice: This is not a final specification.
Some paramentic limits are subject to change.
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
and ON-SCREEN DISPLAY CONTROLLER
PIN DESCRIPTION (continued)
PinNameFunctions
P63/OSC1/
X
CIN,
P6
4/OSC2/
X
COUT
Input port
Clock input for OSD
Clock output for OSD
Sub-clock output
Sub-clock input
P70/CVIN,
P71/VHOLD,
P7
2/RVCO
HLF/AD
Input port P7
Input for data slicer
Input/output for
data slicer
6
Analog input
HSYNC
VSYNC
H
SYNC input
SYNC input
V
Note : As shown in the memory map (Figure 5), port P0 is accessed as a memory at address 00C016 of zero page. Port P0 has the port P0
direction register (address 00C1
programmed as “1” in the direction register are output pins. When pins are programmed as “0,” they are input pins. When pins are
programmed as output pins, the output data are written into the port latch and then output. When data is read from the output pins, the
output pin level is not read but the data of the port latch is read. This allows a previously-output value to be read correctly even if the
output “L” voltage has risen, for example, because a light emitting diode was directly driven. The input pins float, so the values of the pins
can be read. When data is written into the input pin, it is written only into the port latch, while the pin remains in the floating state.
Input/
Output
Input
Input
Output
Output
Input
Input
Input
Ports P63 and P64 are 2-bit input port.
Pin P6
3 is also used as OSD clock input pin OSC1.
4 is also used as OSD clock output pin OSC2. The output structure is CMOS output.
Pin P6
Pin P6
4 is also used as sub-clock output pin XCOUT. The output structure is CMOS output.
3 is also used as sub-clock input pin XCIN.
Pin P6
0–P72 are 3-bit input port.
Ports P7
Pins P7
0, P71 are also used as data slicer input pins CVIN, VHOLD respectively. When
using data slicer, input composite video signal through a capacitor. Connect a capacitor
I/O
between V
Pins P7
connect a resistor between RVCO and V
HOLD and VSS.
2 pin is also used as input/output pin for data slicer RVCO. When using data slicer,
SS.
When using data slicer, connect a filter using of a capacitor and a resistor between HLF
and V
SS.
Input
Input
Input
16 of zero page) which can be used to program each bit as an input (“0”) or an output (“1”). The pins
This is an analog input pin AD6.
This is a horizontal synchronous signal input for OSD.
This is a vertical synchronous signal input for OSD.
7
MITSUBISHI MICROCOMPUTERS
M37274MA-XXXSP
PRELIMINARY
Notice: This is not a final specification.
Some paramentic limits are subject to change.
3
Ports P0
Ports P0
, P10, P15–P17, P2, P30, P3
Data bus
0
–P02, P04–P0
7
Data bus
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
and ON-SCREEN DISPLAY CONTROLLER
1
Direction register
Port latch
Direction register
Port latch
CMOS output
Ports P0
3, P10, P15–P17,
0, P31
P2, P3
Note : Each port is also used as follows :
3/DA
P0
0 : OUT2
P1
6 : INT3
P1
P1
7 : SIN
P24–P26 : AD3–AD1
7 : AD5
P2
N-channel open-drain output
Ports P0
0–P02, P04–P07
Note : Each port is also used as follows :
0–P02 : PWM4–PWM6
P0
4–P07 : PWM0–PWM3
P0
Ports P11–P1
4
Data bus
Fig. 1. I/O Pin Block Diagram (1)
Direction register
Port latch
N-channel open-drain output
Port P1
1-P14
Note : Each port is also used as follows :
1 : SCL1
P1
2 : SCL2
P1
3 : SDA1
P1
4 : SDA2
P1
8
MITSUBISHI MICROCOMPUTERS
M37274MA-XXXSP
PRELIMINARY
Notice: This is not a final specification.
Some paramentic limits are subject to change.
S
OUT
, S
CLK
Data bus
H
SYNC
, V
SYNC
Internal circuit
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
and ON-SCREEN DISPLAY CONTROLLER
N-channel open-drain output
Direction register
Schmidt input
SYNC, VSYNC
H
P52–P5
5
Ports P4
5, P46
Note : Each pin is also used
as follows :
5 : SOUT
P4
P46 : SCLK
CMOS output
0
–P4
Ports P4
4
Data bus
Fig. 2. I/O Pin Block Diagram (2)
Internal circuit
Input
Ports P40–P44Note : Each port is also used as below :
0 : AD4
P4
1 : INT2
P4
2 : TIM2
P4
3 : TIM3
P4
4 : INT1
P4
P52–P55
Note : Each port is also used
as follows :
2 : R P54 : B
P5
3 : G P55 : OUT1
P5
9
MITSUBISHI MICROCOMPUTERS
M37274MA-XXXSP
PRELIMINARY
Notice: This is not a final specification.
Some paramentic limits are subject to change.
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
FUNCTIONAL DESCRIPTION
Central Processing Unit (CPU)
The M37274MA-XXXSP uses the standard 740 Family instruction
set. Refer to the table of 740 Family addressing modes and machine
instructions or the SERIES 740 <Software> User’s Manual for details on the instruction set.
Machine-resident 740 Family instructions are as follows:
The FST, SLW instruction cannot be used.
The MUL, DIV, WIT and STP instructions can be used.
70
1100
CPU mode register
(CPUM (CM) : address 00FB
Processor mode bits
b1 b0
0 0 : Single-chip mode
0 1 :
1 0 :
1 1 :
Stack page selection bit (Note)
0 : Zero page
1 : 1 page
Fix these bits to “1.”
X
0 : LOW drive
1 : HIGH drive
Main colock (X
0 : Oscillating
1 : Stopped
Internal system clock selection bit
0 : X
1 : X
and ON-SCREEN DISPLAY CONTROLLER
CPU Mode Register
The CPU mode register contains the stack page selection bit and
internal system clock selection bit. The CPU mode register is allocated at address 00FB
Not available
COUT
drivability selection bit
IN–XOUT
IN–XOUT
selected (high-speed mode)
CIN–XCOUT
) stop bit
selected (low-speed mode)
16.
16
)
Fig. 3. CPU Mode Register
Note: This bit is set to “1” after the reset release.
10
MITSUBISHI MICROCOMPUTERS
M37274MA-XXXSP
PRELIMINARY
Notice: This is not a final specification.
Some paramentic limits are subject to change.
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
MEMORY
Special Function Register (SFR) Area
The special function register (SFR) area in the zero page contains
control registers such as I/O ports and timers.
RAM
RAM is used for data storage and for stack area of subroutine calls
and interrupts.
ROM
ROM is used for storing user programs as well as the interrupt vector
area.
RAM for OSD
RAM for display is used for specifying the character codes and colors to display.
ROM for OSD
ROM for display is used for storing character data.
0000
16
Zero page
ROM correction memory
Block 1 : addresses 02C0
Block 2 : addresses 02E016 to 02FF
RAM
(768 bytes)
00C0
00FF
0200
0248
02C0
02FF
0300
16
16
16
16
16
16
SFR1 area
SFR2 area
Not used
16
and ON-SCREEN DISPLAY CONTROLLER
Interrupt Vector Area
The interrupt vector area contains reset and interrupt vectors.
Zero Page
The 256 bytes from addresses 000016 to 00FF16 are called the zero
page area. The internal RAM and the special function registers (SFR)
are allocated to this area.
The zero page addressing mode can be used to specify memory and
register addresses in the zero page area. Access to this area with
only 2 bytes is possible in the zero page addressing mode.
Special Page
The 256 bytes from addresses FF0016 to FFFF16 are called the special page area. The special page addressing mode can be used to
specify memory addresses in the special page area. Access to this
area with only 2 bytes is possible in the special page addressing
mode.
ROM Correction Memory (RAM)
This is used as the program area for ROM correction.
10000
16
to 02DF
16
16
10800
155FF
16
16
16
18000
16
Not used
Not used
RAM for OSD (Note)
(1296 bytes)
ROM
(40 K bytes)
Fig. 4. Memory map
043F
0800
0DF3
6000
FF00
FFDE
FFFF
16
16
16
16
16
16
Interrupt vector area
16
Not used
Not used
Special page
ROM for OSD
(11072 bytes)
1E41F
16
1FFFF
16
Note : Refer to Table 15. Contents of OSD RAM.
Not used
11
MITSUBISHI MICROCOMPUTERS
M37274MA-XXXSP
PRELIMINARY
Notice: This is not a final specification.
Some paramentic limits are subject to change.
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
■SFR1 area (addresses C016 to DF16)
<
Bit allocation
Name
0
1
Address
C0
16
C1
16
C2
16
C3
16
C4
16
C5
16
C6
16
C7
16
C8
16
C9
16
CA
16
CB
16
CC
16
CD
16
CE
16
CF
16
D0
16
D1
16
D2
16
D3
16
D4
16
D5
16
D6
16
D7
16
D8
16
D9
16
DA
16
DB
16
DC
16
DD
16
DE
16
DF
16
Register
Port P0 (P0)
Port P0 direction register (D0)
Port P1 (P1)
Port P1 direction register (D1)
Port P2 (P2)
Port P2 direction register (D2)
Port P3 (P3)
Port P3 direction register (D3)
Port P4 (P4)
Port P4 direction register (D4)
Port P5 (P5)
OSD port control register (PF)
Port P6 (P6)
Port P7 (P7)
OSD control register (OC)
Horizontal position register (HP)
Block control register 1 (BC
Block control register 2 (BC
Block control register 3 (BC
Block control register 4 (BC
Block control register 5 (BC
Block control register 6 (BC
Block control register 7 (BC
Block control register 8 (BC
Block control register 9 (BC
Block control register 10 (BC
Block control register 11 (BC
Block control register 12 (BC
)
1
)
2
)
3
)
4
)
5
)
6
)
7
)
8
)
9
10
11
12
b7
0
)
)
)
and ON-SCREEN DISPLAY CONTROLLER
>
:
Function bit
:
:
No function bit
: Fix to this bit to “0”
<
State immediately after reset
: “0” immediately after reset
0
: “1” immediately after reset
1
: Indeterminate immediately
?
after reset
(do not write to “1”)
: Fix to this bit to “1”
Fig. 8. Memory Map of Special Function Register 2 (SFR2) (2)
15
MITSUBISHI MICROCOMPUTERS
M37274MA-XXXSP
PRELIMINARY
Notice: This is not a final specification.
Some paramentic limits are subject to change.
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
<
Bit allocation
>
:
Function bit
:
Name
:
No function bit
: Fix to this bit to “0”
0
(do not write to “1”)
: Fix to this bit to “1”
1
(do not write to “0”)
Register
b7
Processor status register (PS)
Program counter (PCH)
Program counter (PCL)
Fig. 9. Internal State of Processor Status Register and Program Counter at Reset
Bit allocationState immediately after reset
IZCDBTVN?????
and ON-SCREEN DISPLAY CONTROLLER
<
State immediately after reset
: “0” immediately after reset
0
: “1” immediately after reset
1
: Indeterminate immediately
?
>
after reset
b0
b7
?
1
Contents of address FFFF
Contents of address FFFE
b0
?
16
16
16
MITSUBISHI MICROCOMPUTERS
M37274MA-XXXSP
PRELIMINARY
Notice: This is not a final specification.
Some paramentic limits are subject to change.
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
INTERRUPTS
Interrupts can be caused by 18 different sources consisting of 4 external, 12 internal, 1 software, and reset. Interrupts are vectored interrupts with priorities as shown in Table 1. Reset is also included in
the table because its operation is similar to an interrupt.
When an interrupt is accepted,
(1) The contents of the program counter and processor status
register are automatically stored into the stack.
(2) The interrupt disable flag I is set to “1” and the corresponding
interrupt request bit is set to “0.”
(3) The jump destination address stored in the vector address enters
the program counter.
Other interrupts are disabled when the interrupt disable flag is set to
“1.”
All interrupts except the BRK instruction interrupt have an interrupt
request bit and an interrupt enable bit. The interrupt request bits are
in interrupt request registers 1 and 2 and the interrupt enable bits are
in interrupt control registers 1 and 2. Figure 11 shows the interruptrelated registers.
Interrupts other than the BRK instruction interrupt and reset are accepted when the interrupt enable bit is “1,” interrupt request bit is “1,”
and the interrupt disable flag is “0.” The interrupt request bit can be
set to “0” by a program, but not set to “1.” The interrupt enable bit can
be set to “0” and “1” by a program.
Reset is treated as a non-maskable interrupt with the highest priority.
Figure 10 shows interrupt control.
and ON-SCREEN DISPLAY CONTROLLER
Interrupt Causes
(1) VSYNC and OSD interrupts
SYNC interrupt is an interrupt request synchronized with
The V
the vertical sync signal.
The OSD interrupt occurs after character block display to the
CRT is completed.
(2) INT1, INT2, INT3 interrupts
With an external interrupt input, the system detects that the level
of a pin changes from “L” to “H” or from “H” to “L,” and generates
an interrupt request. The input active edge can be selected by
bits 3, 4 and 6 of the interrupt input polarity register (address
16) : when this bit is “0,” a change from “L” to “H” is detected;
0212
when it is “1,” a change from “H” to “L” is detected. Note that all
bits are cleared to “0” at reset.
(3) Timer 1, 2, 3 and 4 interrupts
An interrupt is generated by an overflow of timer 1, 2, 3 or 4.
(4) Serial I/O interrupt
This is an interrupt request from the clock synchronous serial
I/O function.
IN)/4096 interrupt
(5) f(X
This interrupt occurs regularly with a f(X
of the PWM mode register 1 to “0.”
(6) Data slicer interrupt
An interrupt occurs when slicing data is completed.
(7) Multi-master I
This is an interrupt request related to the multi-master I
interface.
(8) A-D conversion interrupt
An interrupt occurs at the completion of A-D conversion. Since
A-D conversion interrupt and the INT3 interrupt share the same
vector, an interrupt source is selected by bit 7 of the interrupt
interval determination control register (address 0212
2
C-BUS interface interrupt
IN)/4096 period. Set bit 0
16).
2
C-BUS
Table 1. Interrupt Vector Addresses and Priority
Interrupt Source
Reset
OSD interrupt
INT1 interrupt
Data slicer interrupt
Serial I/O interrupt
Timer 4 interrupt
Software switch by software (See note)/
When selecting INT3 interrupt, active edge selectable.
Active edge selectable
Software switch by software (See note)
Non-maskable (software interrupt)
17
MITSUBISHI MICROCOMPUTERS
M37274MA-XXXSP
PRELIMINARY
Notice: This is not a final specification.
Some paramentic limits are subject to change.
(9)Timer 5 · 6 interrupt
An interrupt is generated by an overflow of timer 5 or 6. Their
priorities are same, and can be switched by software.
(10)BRK instruction interrupt
This software interrupt has the least significant priority. It does
not have a corresponding interrupt enable bit, and it is not affected by the interrupt disable flag I (non-maskable).
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
and ON-SCREEN DISPLAY CONTROLLER
Interrupt request bit
Interrupt enable bit
Interrupt disable flag I
Fig. 10. Interrupt Control
BRK instruction
Reset
Interrupt
request
18
MITSUBISHI MICROCOMPUTERS
M37274MA-XXXSP
PRELIMINARY
Notice: This is not a final specification.
Some paramentic limits are subject to change.
7
7
0
0
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
and ON-SCREEN DISPLAY CONTROLLER
Interrupt request register 1
(IREQ1: address 00FC
Timer 1 interrupt request bit
Timer 2 interrupt request bit
Timer 3 interrupt request bit
Timer 4 interrupt request bit
OSD interrupt request bit
V
SYNC
interrupt request bit
A-D conversion
request bit
Interrupt control register 1
( ICON1: address 00FE
INT1 interrupt enable bit
Data slicer interrupt enable bit
Serial I/O interrupt enable bit
f(XIN)/4096 interrupt enable bit
INT2 interrupt enable bit
Multi-master I
interface enable bit
Timer 5
Timer 5
0 : Timer 5
1 : Timer 6
2
C-BUS
• 6 interrupt enable bit
• 6 interrupt switch bit
Fig. 11. Interrupt-related Registers
19
MITSUBISHI MICROCOMPUTERS
M37274MA-XXXSP
PRELIMINARY
Notice: This is not a final specification.
Some paramentic limits are subject to change.
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
TIMERS
The M37271MF-XXXSP has 6 timers: timer 1, timer 2, timer 3,
timer 4, timer 5, and timer 6. All timers are 8-bit timers with the 8-bit
timer latch. The timer block diagram is shown in Figure 13.
All of the timers count down and their divide ratio is 1/(n+1), where n
is the value of timer latch. By writing a count value to the corresponding timer latch (addresses 00F0
16 and 020D16 : timers 5 and 6), the value is also set to a timer,
020C
simultaneously.
The count value is decremented by 1. The timer interrupt request bit
is set to “1” by a timer overflow at the next count pulse, after the
count value reaches “00
16 to 00F316 : timers 1 to 4, addresses
16”.
(1) Timer 1
Timer 1 can select one of the following count sources:
f(XIN)/16 or f(XCIN)/16
•
f(XIN)/4096 or f(XCIN)/4096
•
External clock from the P42 TIM2 pin
•
The count source of timer 1 is selected by setting bits 5 and 0 of
timer mode register 1 (address 00F4
selected by bit 7 of the CPU mode register.
Timer 1 interrupt request occurs at timer 1 overflow.
16). Either f(XIN) or f(XCIN) is
(2) Timer 2
Timer 2 can select one of the following count sources:
f(XIN)/16 or f(XCIN)/16
•
Timer 1 overflow signal
•
External clock from the TIM2 pin
•
The count source of timer 2 is selected by setting bits 4 and 1 of
timer mode register 1 (address 00F4
selected by bit 7 of the CPU mode register. When timer 1 overflow
signal is a count source for the timer 2, the timer 1 functions as an 8bit prescaler.
Timer 2 interrupt request occurs at timer 2 overflow.
16). Either f(XIN) or f(XCIN) is
(3) Timer 3
Timer 3 can select one of the following count sources:
f(XIN)/16 or f(XCIN)/16
•
f(XCIN)
•
External clock from the TIM3 pin
•
The count source of timer 3 is selected by setting bit 0 of timer mode
register 2 (address 00F5
CIN) is selected by bit 7 of the CPU mode register.
or f(X
Timer 3 interrupt request occurs at timer 3 overflow.
16) and bit 6 at address 00C716. Either f(XIN)
and ON-SCREEN DISPLAY CONTROLLER
(5) Timer 5
Timer 5 can select one of the following count sources:
f(XIN)/16 or f(XCIN)/16
•
Timer 2 overflow signal
•
Timer 4 overflow signal
•
The count source of timer 3 is selected by setting bit 6 of timer mode
register 1 (address 00F4
dress 00F5
timer 5, either timer 2 or 4 functions as an 8-bit prescaler. Either
f(X
Timer 5 interrupt request occurs at timer 5 overflow.
16). When overflow of timer 2 or 4 is a count source for
IN) or f(XCIN) is selected by bit 7 of the CPU mode register.
16) and bit 7 of timer mode register 2 (ad-
(6) Timer 6
Timer 6 can select one of the following count sources:
f(XIN)/16 or f(XCIN)/16
•
Timer 5 overflow signal
•
The count source of timer 6 is selected by setting bit 7 of timer mode
register 1 (address 00F4
7 of the CPU mode register. When timer 5 overflow signal is a count
source for timer 6, timer 5 functions as an 8-bit prescaler.
Timer 6 interrupt request occurs at timer 6 overflow.
At reset, timers 3 and 4 are connected by hardware and “FF
automatically set in timer 3; “07
lected as the timer 3 count source. The internal reset is released by
timer 4 overflow in this state and the internal clock is connected.
At execution of the STP instruction, timers 3 and 4 are connected by
hardware and “FF
However, the f(X
So set both bit 0 of timer mode register 2 (address 00F5
at address 00C7
✽
IN)
/16 is selected as the timer 3 count source). The internal
(f(X
STP state is released by timer 4 overflow in this state and the internal clock is connected.
As a result of the above procedure, the program can start under a
stable clock.
✽ : When bit 7 of the CPU mode register (CM
comes f(X
The structure of timer-related registers is shown in Figure 12.
CIN).
16). Either f(XIN) or f(XCIN) is selected by bit
16” is
16” in timer 4. The f(XIN)
16” is automatically set in timer 3; “0716” in timer 4.
✽
IN)
/16 is not selected as the timer 3 count source.
16 to “0” before execution of the STP instruction
✽
/16 is se-
16) and bit 6
7) is “1,” f(XIN) be-
(4) Timer 4
Timer 4 can select one of the following count sources:
f(XIN)/16 or f(XCIN)/16
•
f(XIN)/2 or f(XCIN)/2
•
f(XCIN)
•
The count source of timer 3 is selected by setting bits 1 and 4 of
timer mode register 2 (address 00F5
selected by bit 7 of the CPU mode register. When timer 3 overflow
signal is a count source for the timer 4, the timer 3 functions as an 8bit prescaler.
Timer 4 interrupt request occurs at timer 4 overflow.
20
16). Either f(XIN) or f(XCIN) is
MITSUBISHI MICROCOMPUTERS
M37274MA-XXXSP
PRELIMINARY
Notice: This is not a final specification.
Some paramentic limits are subject to change.
70
Timer mode register 1
(TM1 : address 00F4
Timer 1 count source selection bit 1
0 : f(X
1 : Count source selected by bit 5
of TM1
Timer 2 count source selection bit 1
0 : Count source selected by bit 4 of
TM1
1 : External clock from TIM2 pin
Notes 1: HIGH pulse width of external clock inputs TIM2 and TIM3 needs 4 machine cycles or more.
2: When the external clock source is selected, timers 1, 2, and 3 are counted at a rising edge of input signal.
3: In the stop mode or the wait mode, external clock inputs TIM2 and TIM3 cannot be used.
Timer 4
interrupt request
Timer 5
interrupt request
Timer 6
interrupt request
Fig. 13. Timer Block Diagram
22
MITSUBISHI MICROCOMPUTERS
M37274MA-XXXSP
PRELIMINARY
Notice: This is not a final specification.
Some paramentic limits are subject to change.
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
SERIAL I/O
The M37274MA-XXXSP has a built-in serial I/O which can either transmit or receive 8-bit data serially in the clock synchronous mode.
The serial I/O block diagram is shown in Figure 14. The synchronous
clock I/O pin (S
P4, data input pin (S
Bit 2 of the serial I/O mode register (address 0213
the synchronous clock is supplied internally or externally (from the
P4
6/SCLK pin). When an internal clock is selected, bits 1 and 0 select
whether f(X
and P46/SCLK pins for serial I/O, set the corresponding bits of the
port P4 direction register (address 00C9
serial I/O, set the corresponding bit of the port P1 direction register
(address 00C3
CLK), and data output pin (SOUT) also function as port
IN) also functions as port P1.
16) selects whether
IN) or f(XCIN) is divided by 8, 16, 32, or 64. To use SOUT
16) to “0.” To use SIN pin for
16) to “0.”
X
CIN
1/2
X
IN
1/2
1/2
CM7
Synchronous
circuit
S
CLK
SM2
S
Serial I/O counter (8)
and ON-SCREEN DISPLAY CONTROLLER
The operation of the serial I/O is described below. The operation of
the serial I/O differs depending on the clock source; external clock or
internal clock.
Data bus
Frequency divider
1/2
1/81/41/16
SM1
SM0
Selection gate: Connect to
black side at
reset.
CM : CPU mode register
SM : Serial I/O mode register
Serial I/O
interrupt request
SM5
S
OUT
: LSB
MSB
(Note)
S
IN
Serial I/O shift register (8)
(Address 021416)
8
Note : When the data is set in the serial I/O register (address 021416), the register functions as the serial I/O shift register.
Fig. 14. Serial I/O Block Diagram
23
MITSUBISHI MICROCOMPUTERS
M37274MA-XXXSP
PRELIMINARY
Notice: This is not a final specification.
Some paramentic limits are subject to change.
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
Internal clock : The serial I/O counter is set to “7” during the write
cycle into the serial I/O register (address 0214
16), and the transfer
clock goes “H” forcibly. At each falling edge of the transfer clock after
the write cycle, serial data is output from the S
OUT pin. Transfer di-
rection can be selected by bit 5 of the serial I/O mode register. At
each rising edge of the transfer clock, data is input from the S
IN pin
and data in the serial I/O register is shifted 1 bit.
After the transfer clock has counted 8 times, the serial I/O counter
becomes “0” and the transfer clock stops at HIGH. At this time the
interrupt request bit is set to “1.”
External clock : The an external clock is selected as the clock source,
the interrupt request is set to “1” after the transfer clock has been
counted 8 counts. However, transfer operation does not stop, so the
clock should be controlled externally. Use the external clock of 500kHz
or less with a duty cycle of 50%.
The serial I/O timing is shown in Figure 15. When using an external
clock for transfer, the external clock must be held at HIGH for initializing the serial I/O counter. When switching between an internal clock
and an external clock, do not switch during transfer. Also, be sure to
initialize the serial I/O counter after switching.
Notes 1: On programming, note that the serial I/O counter is set by
writing to the serial I/O register with the bit managing instructions, such as SEB and CLB.
2: When an external clock is used as the synchronous clock,
write transmit data to the serial I/O register when the transfer clock input level is HIGH.
and ON-SCREEN DISPLAY CONTROLLER
7
0
0
0
Serial I/O mode register
(SM : address 0213
16
Internal synchronous clock
selection bits
b1 b0
IN
0 0 : f(X
0 1 : f(X
1 0 : f(X
1 1 : f(X
)/8 or f(X
IN
)/16 or f(X
IN
)/32 or f(X
IN
)/64 or f(X
Synchronous clock selection bit
0 : External clock
1 : Internal clock
Port function selection bit
0 : P1
1
, P13 functions as port
1 : SCL1, SDA1
Port function selection bit
0 : P1
2
, P14 functions as port
1 : SCL2, SDA2
Transfer direction selection bit
0 : LSB first
1 : MSB first
Fix these bits to “0”
CIN
)
)/8
CIN
)/16
CIN
)/32
CIN
)/64
Synchronous clock
Transfer clock
Serial I/O register
write signal
Serial I/O output
S
OUT
Serial I/O input
S
IN
Note : When an internal clock is selected, the S
Fig. 15. Serial I/O Timing (for LSB first)
Fig. 16. Serial I/O Mode Register
D
0
D
1
D
2
D
3
D
4
D
OUT
pin is at high-impedance after transfer is completed.
(Note)
5
D
6
D
7
Interrupt request bit is set to “1”
24
MITSUBISHI MICROCOMPUTERS
M37274MA-XXXSP
PRELIMINARY
Notice: This is not a final specification.
Some paramentic limits are subject to change.
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
PWM OUTPUT FUNCTION
The M37274MA-XXXSP is equipped with a 14-bit PWM (DA) seven
8-bit PWMs (PWM0–PWM6). DA has a 14-bit resolution with the
minimum resolution bit width of 0.25
4096 ms (for f(X
structure and an 8-bit resolution with minimum resolution bit width of
4
µ
s and repeat period of 1024 µs (for f(XIN) = 8 MHz) .
Figure 17 shows the PWM block diagram. The PWM timing generating circuit applies individual control signals to PWM0–PWM6 using
IN) divided by 2 as a reference signal.
f(X
IN) = 8 MHz). PWM0–PWM6 have the same circuit
µ
s and a repeat period of
(1) Data Setting
When outputting DA, first set the high-order 8 bits to the DA-H register (address 0240
(address 0241
data to the PWMi register (i means 0 to 6; addresses 0200
0206
16).
16), then the low-order 6 bits to the DA-L register
16). When outputting PWM0–PWM6, set 8-bit output
16 to
(2) Transmitting Data from Register to PWM circuit
Data transfer from the 8-bit PWM register to the 8-bit PWM circuit is
executed at writing data to the register.
The signal output from the 8-bit PWM output pin corresponds to the
contents of this register.
Also, data transfer from the DA register (addresses 0240
0241
16) to the 14-bit PWM circuit is executed at writing data to the
DA-L register (address 0241
dress 0240
possible to confirm the data being output from the D-A output pin by
reading the DA register.
16) means reading this transferred data. Accordingly, it is
16). Reading from the DA-H register (ad-
16 and
(3) Operating of 8-bit PWM
The following explains PWM operation.
First, set the bit 0 of PWM mode register 1 (address 020A
(at reset, bit 0 is already set to “0” automatically), so that the PWM
count source is supplied.
PWM0–PWM3 are also used as pins P0
also used as pins P0
of the port P0 direction register to “1” (output mode). And select each
output polarity by bit 3 of PWM mode register 1 (address 020A
Then, set bits 7 to 0 of PWM mode register 2 to “1” (PWM output).
The PWM waveform is output from the PWM output pins by setting
these registers.
Figure 18 shows the 8-bit PWM timing. One cycle (T) is composed
8
of 256 (2
each bit (bits 0 to 7), are output inside the circuit during 1 cycle.
Refer to Figure 20 (a). The 8-bit PWM outputs waveform which is
the logical sum (OR) of pulses corresponding to the contents of bits
0 to 7 of the 8-bit PWM register. Several examples are shown in
Figure 20 (b). 256 kinds of output (HIGH area: 0/256 to 255/256) are
selected by changing the contents of the PWM register. A length of
entirely HIGH cannot be output, i.e. 256/256.
) segments. The 8 kinds of pulses, relative to the weight of
0–P02, respectively. Set the corresponding bits
4–P07, PWM4–PWM6 are
16) to “0”
16).
and ON-SCREEN DISPLAY CONTROLLER
(4) Operating of 14-bit PWM
As with 8-bit PWM, set the bit 0 of the PWM mode register 1 (address 020A
cally), so that the PWM count source is supplied. Pin DA is also used
as port P0
tion register. Next, select the output polarity by bit 3 of the PWM
mode register 1. Then, the 14-bit PWM outputs from the D-A output
pin by setting bit 1 of the PWM mode register 1 to “0” (at reset, this bit
already set to “0” automatically) to select the DA output.
The output example of the 14-bit PWM is shown in Figure 19.
The 14-bit PWM divides the data of the DA latch into the low-order 6
bits and the high-order 8 bits.
The fundamental waveform is determined with the high-order 8-bit
data “D
fundamental waveform) is output every short area of “t” = 256τ =
64 ms (τ is the minimum resolution bit width of 0.25
area increase interval (t
“D
longer by τ than that of other smaller intervals in PWM repeat period
“T” = 64t. Thus, a rectangular waveform with the different “H” width is
output from the D-A pin. Accordingly, the PWM output changes by τ
unit pulse width by changing the contents of the DA-H and DA-L
registers. A length of entirely “H” output cannot be output, i. e. 256/
256.
16) to “0” (at reset, bit 0 is already set to “0” automati-
3. Select output mode by setting bit 3 of the port P0 direc-
H.” A “H” level area with a length τ ✕ DH(“H” level area of
µ
s). The “H” level
m) is determined with the low-order 6-bit data
L.” The “H” level are of smaller intervals “tm” shown in Table 6 is
(5) Output after Reset
At reset, the output of ports P00–P02 and P04–P07 is in the highimpedance state and the contents of the PWM register and the PWM
circuit are undefined. Note that after reset, the PWM output is undefined until setting the PWM register.
25
MITSUBISHI MICROCOMPUTERS
M37274MA-XXXSP
PRELIMINARY
Notice: This is not a final specification.
Some paramentic limits are subject to change.
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
Table 2. Relation Between Low-order 6-bit Data and High-level
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
A-D CONVERTER
(1)A-D Conversion Register (AD)
A-D conversion reigister is a read-only register that stores the result
of an A-D conversion. This register should not be read during A-D
conversion.
(2)A-D Control Register (ADCON)
The A-D control register controls A-D conversion. Bits 1 and 0 of this
register select analog input pins. When these pins are not used as
anlog input pins, they are used as ordinary I/O pins. Bit 3 is the A-D
conversion completion bit, A-D conversion is started by writing “0” to
this bit. The value of this bit remains at “0” during an A-D conversion,
then changes to “1” when the A-D conversion is completed.
Bit 4 controls connection between the resistor ladder and V
CC. When
not using the A-D converter, the resistor ladder can be cut off from
the internal V
CC by setting this bit to “0,” accordingly providing low-
power dissipation.
(3)Comparison Voltage Generator (Resistor
Ladder)
The voltage generator divides the voltage between VSS and VCC by
256, and outputs the divided voltages to the comparator as the reference voltage V
ref.
(4)Channel Selector
The channel selector connects an analog input pin, selected by bits
1 and 0 of the A-D control register, to the comparator.
and ON-SCREEN DISPLAY CONTROLLER
(5)Comparator and Control Circuit
The conversion result of the analog input voltage and the reference
voltage “V
version completion bit and A-D conversion interrupt request bit are
set to “1” at the completion of A-D conversion.
Fig. 21. A-D Control Register
ref” is stored in the A-D conversion register. The A-D con-
7
0
0
A-D control register
(ADCON: address 00EF
Analog input pin selection bits
b2 b1 b0
0 : AD1
0 0
0 0 1 : AD2
0 1 0 : AD3
0 1 1 : AD4
0 : AD5
1 0
1 0 1 : AD6
1 1 0 :
1 1 1 :
A-D conversion completion bit
0 : Conversion in purogress
1 : Conversion completed
VCC connection selection bit
0 : OFF
1 : ON
Fix this bit to “0.”
Do not set.
16
)
A-D control register
(address 00EF
AD1
AD2
AD3
AD4
AD5
AD6
Channel selector
Fig. 22. A-D Comparator Block Diagram
30
Data bus
b7b0
16
)
2
A-D control circuit
Comparator
A-D conversion register
8
(address 00EE16)
Switch tree
Resistor ladder
VSSV
CC
A-D conversion
interrupt request
Loading...
+ 101 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.