M38503E4SP MITSUBISHI, M38503E4SP Datasheet
![no-image](/images/manufacturer_photos/0/4/451/mitsubishi_sml.jpg)
M38503E4SP
Available stocks
Related parts for M38503E4SP
M38503E4SP Summary of contents
Page 1
... MITSUBISHI MICROCOMPUTERS 3850 Group ...
Page 2
... FUNCTIONAL BLOCK Fig. 2 Functional block diagram 2 MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER ...
Page 3
... CMOS I/O port with the same function as port P0. •CMOS compatible input level. •CMOS 3-state output structure. •8-bit CMOS I/O port with the same function as port P0. •CMOS compatible input level. •CMOS 3-state output structure. MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER Function except a port function and X IN ...
Page 4
PART NUMBERING M3850 Product Fig. 3 Part numbering 4 SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER XXX FP Package type : 42P2R-A package 42P4B package SS : 42S1B-A package ROM number Omitted in some types. ROM/PROM size ...
Page 5
... Fig. 4 Memory expansion plan Currently planning products are listed below. Table 2 Support products (P) ROM size (bytes) Product name ROM size for User in ( M38503M2-XXXSP 8192 (8062) M38503M2-XXXFP M38503M4-XXXSP M38503E4-XXXSP M38503E4SP 16384 M38503E4SS (16254) M38503M4-XXXFP M38503E4-XXXFP M38503E4FP M38504M6-XXXSP M38504E6-XXXSP M38504E6SP 32768 M38504E6SS (32638) ...
Page 6
... X –X CIN COUT Main clock ( Oscillating 1 : Stopped Main clock division ratio selection bits Not available MITSUBISHI MICROCOMPUTERS 3850 Group ) 16 oscillating function –X ) stop bit OUT )/2 (high-speed mode) IN )/8 (middle-speed mode) IN )/2 (low-speed mode) CIN ...
Page 7
MEMORY Special Function Register (SFR) Area The Special Function Register area in the zero page contains con- trol registers such as I/O ports and timers. RAM RAM is used for data storage and for stack area of subroutine calls and ...
Page 8
... PWM prescaler (PREPWM) 001E 16 PWM register (PWM) 001F 16 Reserved : Do not write “1” to this address. Fig. 7 Memory map of special function register (SFR) 8 MITSUBISHI MICROCOMPUTERS SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER Prescaler 12 (PRE12) 0020 16 Timer 1 (T1) 0021 16 Timer 2 (T2) 0022 16 Timer XY mode register (TM) ...
Page 9
... Serial I/O function I/O Serial I/O function I/O Serial I/O function I/O CMOS compatible Timer X function I/O input level CMOS 3-state output A-D conversion input Timer Y function I/O External interrupt input External interrupt input PWM output MITSUBISHI MICROCOMPUTERS 3850 Group Related SFRs Ref.No. (1) (2) CPU mode register (3) (4) (5) Serial I/O control (6) ...
Page 10
Port P0, P1 Direction register Data bus Port latch (3) Port P2 1 Port X switch bit C Direction register Data bus Port latch Sub-clock generating circuit input (5) Port P2 4 Serial I/O enable bit Receive enable bit ...
Page 11
Port P3 – Direction register Data bus Port latch A-D converter input Analog input pin selection bit (11) Port P4 – Direction register Data bus Port latch Interrupt input Fig. 9 Port block diagram (2) ...
Page 12
... The interrupt disable flag is set and the corresponding interrupt request bit is cleared. 3. The interrupt jump destination address is read from the vector table into the program counter. 12 MITSUBISHI MICROCOMPUTERS SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER Notes When the active edge of an external interrupt (INT CNTR ...
Page 13
... At detection of either rising or FFE0 16 16 falling edge of CNTR FFDE At completion of A-D conversion BRK instruction execution FFDC 16 16 MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER Remarks Non-maskable External interrupt input (active edge selectable) 0 External interrupt input (active edge selectable) 1 External interrupt ...
Page 14
... Rising edge active Interrupt control register 2 (ICON2 : address 003F ) 16 MITSUBISHI MICROCOMPUTERS 3850 Group Interrupt request Interrupt request register 2 (IREQ2 : address 003D ) 16 Timer 1 interrupt request bit Timer 2 interrupt request bit Serial I/O reception interrupt request bit Serial I/O transmit interrupt request bit ...
Page 15
... CIN ) amount owing to generating of a thin pulses in the count input signals. Therefore, select the timer count source before set the value to the prescaler and the timer. MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER (or CNTR ) pin is inverted. If the active edge selection bit is “ ...
Page 16
... T Toggle flip-flop Q R “0” Data bus Prescaler 12 latch (8) Timer 1 latch (8) Prescaler 12 (8) Timer 1 (8) MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER Timer X latch (8) To timer X interrupt Timer X (8) request bit To CNTR interrupt 0 request bit Timer X latch write pulse ...
Page 17
... TBE = 1 TSC = 0 MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER ) to “1”. 16 Serial I/O control register Address 001A 16 Receive buffer full flag (RBF) Receive interrupt request (RI) 1/4 Transmit shift completion flag (TSC) Transmit interrupt source selection bit Transmit interrupt request (TI) ...
Page 18
... Baud rate generator Address 001C 16 ST/SP/PA generator 1/16 Transmit shift register Transmit buffer register Address 0018 16 Data bus MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER Address 001A 16 1/16 UART control register Address 001B 16 Transmit shift completion flag (TSC) Transmit interrupt source selection bit ...
Page 19
... The baud rate generator determines the baud rate for serial trans- fer. The baud rate generator divides the frequency of the count source by 1/(n + 1), where n is the value written to the baud rate genera- tor. MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER TSC=1 SP ...
Page 20
... CMOS output (in output mode) 1: N-channel open drain output (in output mode) Not used (return “1” when read) Fig. 19 Structure of serial I/O control registers MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER b0 Serial I/O control register (SIOCON : address 001A ) 16 BRG count source selection bit (CSS) ...
Page 21
... Set the PWM pe- 4 PWM output Fig. 20 Timing of PWM period PWM PWM register pre-latch Transfer control circuit PWM PWM register latch PWM register MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER 31.875 m (n+1) s 255 T = [31.875 (n+1 Contents of PWM register n : Contents of PWM prescaler ...
Page 22
... IN 22 SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER ) (Changes “H” term from “A” to “B”.) (Changes PWM period from “T” to “T2”.) MITSUBISHI MICROCOMPUTERS 3850 Group ...
Page 23
... Data bus A-D control circuit A-D conversion high-order register Comparator A-D conversion low-order register 10 Resistor ladder V AV REF SS MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER b0 AD control register (ADCON : address 0034 Analog input pin selection bits / /AN ...
Page 24
... STP instruction disable bit 0: STP instruction enabled 1: STP instruction disabled Watchdog timer H count source selection bit 0: Watchdog timer L underflow 1: f(X )/16 or f(X )/16 IN CIN MITSUBISHI MICROCOMPUTERS 3850 Group ) per kHz frequency. CIN ) (or f(X )). The detection time in this case IN CIN ) = 8 MHz frequency and 128 ms at f(X ...
Page 25
... AD Notes 1: The frequency relation of f(X ) and f The question marks (?) indicate an undefined state that depends on the previous state. 3: All signals except X and RESET IN MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER Poweron (Note) Power source voltage Reset input voltage ...
Page 26
Note : X indicates Not fixed ...
Page 27
... CIN ). is IN Fig. 32 Ceramic resonator circuit stops at an .” When the 16 Fig. 33 External clock input circuit is supplied for MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER CIN COUT IN OUT ...
Page 28
... Middle-speed mode High-speed or low-speed mode Main clock stop bit STP instruction WIT instruction MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER oscillation automati- IN pin. The middle-speed automatic switch wait time set oscillator. IN oscillation start and switch to the IN ...
Page 29
Reset Middle-speed mode (f( )=1 MHz “1” =0(8 MHz oscillating =0(32 kHz stopped) 4 Middle-speed mode CM 6 (f( )=1 MHz) “1” ...
Page 30
... The frequency of the internal clock high-speed mode. signal, set the transmit output enable bit RDY D pin after X MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER ) is at least on 500 kHz during the number of cycles needed to is half of the X IN ...
Page 31
... Writing Confirmation Form 2.Mark Specification Form 3.Data to be written to ROM, in EPROM form (three identical cop- ies) MITSUBISHI MICROCOMPUTERS SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER ROM PROGRAMMING METHOD The built-in PROM of the blank One Time PROM version and built- in EPROM version can be read or programmed with a general-purpose PROM programmer using a special programming adapter ...
Page 32
... P3 –P3 (Note –P1 (Note –P2 ,P4 –P4 (Note MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER Ratings –0.3 to 7.0 –0 +0.3 CC –0 –0 +0.3 CC –0 –0 +0.3 CC –0.3 to 5.8 300 – –40 to 125 Limits Min ...
Page 33
... P3 – –P1 (Note 4.0 to 5.5V) (Note 2.7 to 5.5V) (Note 3) CC (avg) are average value measured over 100 ms. OH MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER Limits Min. Typ. Max – – – (Note – ...
Page 34
... – RESET,CNV When clock stopped MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER Limits Min. Typ. Max. V –2 –1.0 CC 2.0 1.0 2.0 1.0 0.4 0.5 0.5 5.0 5.0 4 –5.0 –5.0 –4 5.5 2 “0”. 16 Unit V ...
Page 35
... MHz (in WIT state stopped CIN Output transistors “off” Increment when A-D conversion is executed f MHz IN All oscillation stopped °C (in STP state) Output transistors “off” °C MITSUBISHI MICROCOMPUTERS 3850 Group Limits Unit Typ. Max. Min 200 20 40 ...
Page 36
... R Ladder resistor LADDER I Reference power source input current VREF I A-D port input current I(AD – °C, f MHz, unless otherwise noted) IN Test conditions V = 5.0 V REF MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER Limits Min. Typ. Max. 10 ± 150 200 0.5 5.0 Unit bit ...
Page 37
... Parameter –INT input “H” pulse width 0 3 –INT input “L” pulse width “1” (clock synchronous “0” (UART). 16 MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER Limits Min. Typ. Max. 2 125 50 50 200 80 80 800 ...
Page 38
... Parameter /T D P-channel output disable bit of the UART control register (bit 4 of address 001B 1 X Parameter /T D P-channel output disable bit of the UART control register (bit 4 of address 001B 1 X MITSUBISHI MICROCOMPUTERS 3850 Group Limits Unit Min. Typ. Max )/2–30 ...
Page 39
... Measurement output pin CMOS output Fig. 38 Circuit for measuring output switching characteris- tics (1) SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER Measurement output pin 100pF Fig. 39 Circuit for measuring output switching characteris- tics (2) MITSUBISHI MICROCOMPUTERS 3850 Group 1k 100pF N-channel open-drain output 39 ...
Page 40
... Fig. 40 Timing diagram 40 SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER t C(CNTR) t WH(CNTR) 0.8V CC 0.2V t WH(INT) 0.8V CC 0.2V t W(RESET WH(X IN) 0.8V CC 0.2V t C(S ) CLK WL(S ) CLK 0. CLK h(S CLK- 0. CLK X MITSUBISHI MICROCOMPUTERS 3850 Group t WL(CNTR WL(INT WH(S ) CLK v(S CLK - ...
Page 41
... And 16 16 0003 to 000F . 16 16 0004 0005 0006 0007 (1/2) MITSUBISHI MICROCOMPUTERS 3850 Group Mask ROM number Date: Section head Supervisor signature signature Note : Please fill in all items marked Submitted by Supervisor ) (hexadecimal notation) to FFFD . The reset 16 16 and FFFD ...
Page 42
... Quartz crystal Other ( ) f MHz IN /X and and P2 1 CIN 0 COUT 1 X and X function (external resonator) CIN COUT (2/2) MITSUBISHI MICROCOMPUTERS 3850 Group Mask ROM number of EPROM. 16 27512 *= $0000 ‘M38503M2–’ and CIN COUT ...
Page 43
... And 16 16 0003 to 000F . 16 16 0004 0005 0006 0007 (1/2) MITSUBISHI MICROCOMPUTERS 3850 Group Mask ROM number Date: Section head Supervisor signature signature Note : Please fill in all items marked Submitted by Supervisor ) (hexadecimal notation) to FFFD . The reset 16 16 and FFFD ...
Page 44
... Quartz crystal Other ( ) f MHz IN /X and and P2 1 CIN 0 COUT 1 X and X function (external resonator) CIN COUT (2/2) MITSUBISHI MICROCOMPUTERS 3850 Group Mask ROM number of EPROM. 16 27512 *= $0000 ‘M38503M4–’ and CIN COUT ...
Page 45
... And 16 16 0003 to 000F . 16 16 0004 0005 0006 0007 (1/2) MITSUBISHI MICROCOMPUTERS 3850 Group ROM number Date: Section head Supervisor signature signature Note : Please fill in all items marked Submitted by Supervisor ) (hexadecimal notation) to FFFD . The reset 16 16 and FFFD ...
Page 46
... Quartz crystal Other ( ) f MHz IN /X and and P2 1 CIN 0 COUT 1 X and X function (external resonator) CIN COUT (2/2) MITSUBISHI MICROCOMPUTERS 3850 Group ROM number of EPROM. 16 27512 *= $0000 ‘M38503E4–’ and CIN COUT ...
Page 47
... MARK SPECIFICATION FORM MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER 47 ...
Page 48
... MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER ...
Page 49
... XXX is the ROM code number. B. Special Mark Required If you desire anything other than the standard Mitsubishi mark, it will be treated as a special mark. Special marks will take longer to produce and should be avoided if possible special mark printed, indicate the desired layout of the mark in the figure below. The layout will be duplicated as closely as possible. Note1 : If the customer’ ...
Page 50
... Lead Material 0.63 Alloy 42/Cu Alloy Detail F Weight(g) Lead Material 4.1 Alloy 42/Cu Alloy MITSUBISHI MICROCOMPUTERS 3850 Group SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER Plastic 42pin 450mil SSOP Recommended Mount Pad F Dimension in Millimeters Symbol Min Nom A – – .05 – – ...
Page 51
... Notes regarding these materials These materials are intended as a reference to assist our customers in the selection of the Mitsubishi semiconductor product best suited to the customer’s application; they do not convey any license under any intellectual property rights, or any other rights, belonging to Mitsubishi Electric Corporation or a third party. ...
Page 52
REVISION DESCRIPTION LIST Rev. No. 1.0 First Edition 3850 GROUP DATA SHEET Revision Description (1/1) Rev. date 980817 ...