3850 Group (Spec.A)
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
REJ03B0093-0210
Rev.2.10
Nov 14, 2005
DESCRIPTION
The 3850 group (spec. A) is the 8-bit microcomputer based on the
740 family core technology.
The 3850 group (spec. A) is designed for the household products
and office automation equipment and includes serial interface
functions, 8-bit timer, and A/D converter.
FEATURES
qBasic
machine-language instructions ...................................... 71
qMinimum
instruction execution time ................................ 0.32
µs
(at 12.5 MHz oscillation frequency)
qMemory
size
ROM ................................................................... 8K to 32K bytes
RAM ..................................................................... 512 to 1K bytes
qProgrammable
input/output ports ............................................ 34
qOn-chip
software pull-up resistor
qInterrupts
................................................. 15 sources, 14 vectors
qTimers
............................................................................. 8-bit
✕
4
qSerial
interface
Serial I/O1 .................... 8-bit
✕
1(UART or Clock-synchronized)
Serial I/O2 ................................... 8-bit
✕
1(Clock-synchronized)
qPWM
............................................................................... 8-bit
✕
1
qA/D
converter ............................................... 10-bit
✕
9 channels
qWatchdog
timer ............................................................ 16-bit
✕
1
qClock
generating circuit ..................................... Built-in 2 circuits
(connect to external ceramic resonator or quartz-crystal oscillator)
qPower
source voltage
In high-speed mode .................................................. 4.0 to 5.5 V
(at 12.5 MHz oscillation frequency)
In high-speed mode .................................................. 2.7 to 5.5 V
(at 6 MHz oscillation frequency)
In middle-speed mode ............................................... 2.7 to 5.5 V
(at 12.5 MHz oscillation frequency)
In low-speed mode .................................................... 2.7 to 5.5 V
(at 32 kHz oscillation frequency)
qPower
dissipation
In high-speed mode
Except M38507F8AFP/SP ............................................. 32.5mW
M38507F8AFP/SP ......................................................... 37.5mW
(at 12.5 MHz oscillation frequency, at 5 V power source voltage)
In low-speed mode
Except M38507F8AFP/SP ................................................ 60
µW
M38507F8AFP/SP .......................................................... 450
µW
(at 32 kHz oscillation frequency, at 3 V power source voltage)
qOperating
temperature range .................................... –20 to 85°C
APPLICATION
Office automation equipment, FA equipment, Household products,
Consumer electronics, etc.
PIN CONFIGURATION (TOP VIEW)
V
CC
V
REF
AV
SS
P4
4
/INT
3
/PWM
P4
3
/INT
2
/S
CMP2
P4
2
/INT
1
P4
1
/INT
0
P4
0
/CNTR
1
P2
7
/CNTR
0
/S
RDY1
P2
6
/S
CLK1
P2
5
/TxD
P2
4
/RxD
P2
3
P2
2
CNV
SS
V
PP
P2
1
/X
CIN
P2
0
/X
COUT
RESET
X
IN
X
OUT
V
SS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
P3
0
/AN
0
P3
1
/AN
1
P3
2
/AN
2
P3
3
/AN
3
P3
4
/AN
4
P0
0
/S
IN2
P0
1
/S
OUT2
P0
2
/S
CLK2
P0
3
/S
RDY2
P0
4
/AN
5
P0
5
/AN
6
P0
6
/AN
7
P0
7
/AN
8
P1
0
(LED
0
)
P1
1
(LED
1
)
P1
2
(LED
2
)
P1
3
(LED
3
)
P1
4
(LED
4
)
P1
5
(LED
5
)
P1
6
(LED
6
)
P1
7
(LED
7
)
Package type : FP ........................... PRSP0042GA-B (42P2R-A/E) (42-pin plastic-molded SSOP)
Package type : SP ........................... PRDP0042BA-A (42P4B) (42-pin plastic-molded SDIP)
Fig. 1 M3850XMXA-XXXFP/SP pin configuration
M3850XMXA-XXXFP/SP
: Flash memory version
Rev.2.10 2005.11.14
REJ03B0093-0210
page 1 of 86
FUNCTIONAL BLOCK DIAGRAM
Reset input
V
SS
V
CC
RESET
18
15
1
21
Main-clock
input
X
IN
CNV
SS
Main-clock
output
X
OUT
Rev.2.10 2005.11.14
REJ03B0093-0210
C P U
3850 Group (Spec.A)
19
20
Fig. 2 Functional block diagram
Timer 1( 8 )
Prescaler 12(8)
Sub-clock Sub-clock
input
output
X
CIN
X
COUT
page 2 of 86
ROM
X
Y
Prescaler X(8)
Clock generating circuit
A
Timer 2( 8 )
Timer X( 8 )
Timer Y( 8 )
RAM
S
PC
H
PS
CNTR
1
PC
L
Prescaler Y(8)
CNTR
0
Watchdog
timer
Reset
A/D
converter
(10)
PWM
(8)
SI/O1(8)
SI/O2(8)
X
COUT
INT
0
–
INT
3
X
CIN
P4(5)
P3(5)
P2(8)
P1(8)
P0(8)
2 3
38 39 40 41 42
4 5 6 7 8
9 10 11 12 13 1416 17
22 23 24 25 26 27 28 29
30 31 32 33 34 35 36 37
I/O port P4
I/O port P3
I/O port P2
I/O port P1
I/O port P0
V
REF
AV
SS
3850 Group (Spec.A)
Table 1 Pin description
Pin
V
CC
, V
SS
CNV
SS
V
REF
AVss
RESET
X
IN
X
OUT
P0
0
/S
IN2
P0
1
/S
OUT2
P0
2
/S
CLK2
P0
3
/S
RDY2
P0
4
/AN
5
–P0
7
/AN
8
Name
Power source
CNV
SS
input
Reference voltage
Analog power
source
Reset input
Clock input
Clock output
I/O port P0
Functions
•Apply voltage of 2.7 V – 5.5 V to Vcc, and 0 V to Vss.
•This pin controls the operation mode of the chip.
•Normally connected to V
SS
.
•Reference voltage input pin for A/D converter.
•Analog power source input pin for A/D converter.
•Connect to Vss.
•Reset input pin for active “L”.
•Input and output pins for the clock generating circuit.
•Connect a ceramic resonator or quartz-crystal oscillator between the X
IN
and X
OUT
pins to set
the oscillation frequency.
•When an external clock is used, connect the clock source to the X
IN
pin and leave the X
OUT
pin open.
• Serial I/O2 function pin
•8-bit CMOS I/O port.
•I/O direction register allows each pin to be individually
programmed as either input or output.
•CMOS compatible input level.
•CMOS 3-state output structure.
•Pull-up control is enabled in a byte unit.
P1
0
–P1
7
P2
0
/X
COUT
P2
1
/X
CIN
P2
2
P2
3
P2
4
/RxD
P2
5
/TxD
P2
6
/S
CLK1
P2
7
/CNTR
0
/
S
RDY1
P3
0
/AN
0
–
P3
4
/AN
4
I/O port P3
I/O port P1
I/O port P2
•P1
0
to P1
7
(8 bits) are enabled to output large current
for LED drive.
•8-bit CMOS I/O port.
•I/O direction register allows each pin to be individually
programmed as either input or output.
•CMOS compatible input level.
•P2
0
, P2
1
, P2
4
to P2
7
: CMOS3-state output structure.
•P2
2
, P2
3
: N-channel open-drain structure.
•Pull-up control of P2
0
, P2
1
, P2
4
–P2
7
is enabled in a
byte unit.
• Serial I/O1 function pin/
Timer X function pin
• A/D converter input pin
• Serial I/O1 function pin
• A/D converter input pin
Function except a port function
• Sub-clock generating circuit I/O
pins (connect a resonator)
•5-bit CMOS I/O port with the same function as port P0.
•CMOS compatible input level.
•CMOS 3-state output structure.
•Pull-up control is enabled in a bit unit.
P4
0
/CNTR
1
P4
1
/INT
0
P4
2
/INT
1
P4
3
/INT
2
/S
CMP2
P4
4
/INT
3
/PWM
I/O port P4
•5-bit CMOS I/O port with the same function as port P0.
•CMOS compatible input level.
•CMOS 3-state output structure.
•Pull-up control is enabled in a bit unit.
• Timer Y function pin
• Interrupt input pins
• Interrupt input pin
• S
CMP2
output pin
• Interrupt input pin
• PWM output pin
Rev.2.10 2005.11.14
REJ03B0093-0210
page 3 of 86
3850 Group (Spec.A)
PART NUMBERING
Product name
M3850 3
M
4
A– XXX
SP
Package type
SP : PRDP0042BA-A
FP : PRSP0042GA-B
ROM number
Omitted in flash memory version.
– : standard
Omitted in flash memory version.
H–: Partial specification changed version
A–: High-speed version
ROM/Flash memory size
1 : 4096 bytes
9 : 36864 bytes
2 : 8192 bytes
A: 40960 bytes
3 : 12288 bytes
B: 45056 bytes
4 : 16384 bytes
C: 49152 bytes
5 : 20480 bytes
D: 53248 bytes
6 : 24576 bytes
E: 57344 bytes
7 : 28672 bytes
F : 61440 bytes
8 : 32768 bytes
The first 128 bytes and the last 2 bytes of ROM are reserved areas ; they
cannot be used as a user’s ROM area.
However, they can be programmed or erased in the flash memory version,
so that the users can use them.
Memory type
M : Mask ROM version
F : Flash memory version
RAM size
0 : 192 bytes
1 : 256 bytes
2 : 384 bytes
3 : 512 bytes
4 : 640 bytes
Fig. 3 Part numbering
5 : 768 bytes
6 : 896 bytes
7 : 1024 bytes
8 : 1536 bytes
9 : 2048 bytes
Rev.2.10 2005.11.14
REJ03B0093-0210
page 4 of 86
3850 Group (Spec.A)
GROUP EXPANSION
Renesas Technology expands the 3850 group (spec.A) as follows.
Packages
PRDP0042BA-A ......................... 42-pin shrink plastic-molded DIP
PRSP0042GA-B .................................. 42-pin plastic-molded SOP
Memory Type
Support for mask ROM and flash memory versions.
Memory Size
Flash memory size ......................................................... 32 K bytes
Mask ROM size ................................................... 8 K to 32 K bytes
RAM size ............................................................... 512 to 1 K bytes
Memory Expansion Plan
ROM size (bytes)
ROM
exteranal
32K
28K
Mass production
Mass production
M38507M8A/F8A
24K
20K
M38504M6A
Mass production
16K
12K
M38503M4A
Mass production
8K
M38503M2A
384
512
640
768
896
1024
1152
RAM size (bytes)
1280
1408
1536
2048
Fig. 4 Memory expansion plan
Rev.2.10 2005.11.14
REJ03B0093-0210
page 5 of 86