W541C20X Data Sheet 4-BIT MICROCONTROLLER Table of Contents1. GENERAL DESCRIPTION..........................................................................................................................2 2. FEATURES ....................................................................................................................................................2 3. BLOCK DIAGRAM ........................................................................................................................................4 4. PIN CONFIGURATIONS .............................................................................................................................5 5. PIN DESCRIPTION ......................................................................................................................................6 6. ELECTRICAL CHARACTERISTICS ..........................................................................................................7 6.1 Absolute Maximum Ratings.............................................................................................................7 6.2 DC Characteristics ............................................................................................................................7 6.3 AC Characteristics ............................................................................................................................8 7. APPLICATION CIRCUIT..............................................................................................................................9 8. PACKAGE DIMENSIONS..........................................................................................................................10 9. 8.1 18-Lead PDIP-300mil .....................................................................................................................10 8.2 20-Lead PDIP ..................................................................................................................................11 8.3 28-Lead P-DIP Skinny....................................................................................................................12 8.4 20-Lead SOP-300mil ......................................................................................................................13 8.5 28-Lead SOP-300mil ......................................................................................................................14 REVISION HISTORY .................................................................................................................................15 -1- Publication Release Date: May 29, 2003 Revision A4 W541C20X 1. GENERAL DESCRIPTION The W541C20X is fully compatible with W741C20X in the terms of pin assignment and IC functon. It is a high-performance 4-bit microcontroller (µC) that operates on very low current. The device contains a 4-bit ALU, two 8-bit timers, a divider, a serial port, and five 4-bit I/O ports (including 3 output ports for LED driving). There are also seven interrupt sources and 8-level subroutine nesting for interrupt applications. The W541C20X has two power reduction modes, hold mode and stop mode, which help to minimize power dissipation. The W541C20X is suitable for remote controllers, toy controllers, keyboard controllers, speech synthesis LSI controllers, and other products. 2. FEATURES • Operating voltage: 2.4V to 5.5V • Single system clock − Oscillation frequency up to 4 MHz , Crystal or RC oscillator is selected by mask code option − High-frequency (400 KHz to 4 MHz) or low-frequency (32.768 KHz) oscillation is delected by mask code option • Memory −2048 x 16 bit program ROM (including 2K x 4 bit look-up table) −128 x 4 bit data RAM (including 16 working registers) • 21 input/output pins −Input/output ports: 4 ports/16 pins − Serial input/output port: 1 port /4 pins (high sink current for LED driving) − MFP output pin: 1 pin (MFP) −Do not be floating when it is as input or output open-drain (NMOS type). • Power-down mode −Hold function: no operation (except for oscillator) −Stop function: no operation (including oscillator) • Seven types of interrupts −Five internal interrupts (Divider 0, Timer 0, Timer 1, and Serial I/O) −Two external interrupts (Port RC and INT pin) • MFP output pin −Output is software selectable as modulating or nonmodulating frequency −Works as frequency output specified by Timer 1 • Built-in 14-bit clock frequency divider circuit -2- W541C20X • 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: Offers auto-reload function, and one of two internal clock frequencies (FOSC or FOSC/64) can be selected, or falling edge of pin RC.0 can be selected (output through MFP pin) • Built-in 18/14-bit watchdog timer selectable for system reset • Powerful instruction set: 118 instructions • 8-level subroutine (include interrupt) nesting • One serial transmission/receiver port specified by software • Up to 1 µS instruction cycle (with 4 MHz operating frequency) • Packaged in 18-pin, 20-pin, 28-pin PDIP and 20-pin, 28-pin SOP -3- Publication Release Date: May 29, 2003 Revision A4 W541C20X 3. BLOCK DIAGRAM RAM (128*4) ROM (2048*16) (look_up table ALU 2K*4) +1(+2) PC STACK (8 Levels) Central Control Unit IEF HEF PEF HCF EVF SEF MR0 . Watchdog Timer (4-bit) RA0 to 3 PORT RB RB0 to 3 PORT RC RC0 to 3 PORT RD RD0 to 3 PORT RT PSR0 PSR1 PSR2 PR Timer 0 (8-bit) PORT RA ACC . PM0 SEL . Modulation Frequency Pulse Timer 1 (8-bit) Divider 0 (14-bit) MUX Serial I/O SEL MUX RE0 to 3 (RE0/DOUT, RE1/CLKO, RE2/DIN, RE3/CLKI) MFP VDD VSS Timing Generator INT RES XIN -4- XOUT W541C20X 4. PIN CONFIGURATIONS W541C202/C205 RA2 RA3 INT RES W541C201 RA2 RA3 INT RES VSS RB0 RB1 RB2 RB3 1 2 3 4 5 6 7 8 9 18 17 16 15 14 13 12 11 10 VSS RE0 RA1 RA0 XIN XOUT VDD RC3 RE1 RE2 RE3 RB0 RB1 RC2 RC1 RB2 RC0 NC RB3 18-PDIP(300 mil) RA3 INT RES VSS VSS RB0 RB1 RB2 RB3 1 2 3 4 5 6 7 8 9 10 RA1 19 RA0 XIN 14 13 12 11 11 12 13 14 18 17 16 15 RA1 RA0 XIN XOUT VDD RD3 RD2 RD1 RD0 RC3 RC2 RC1 RC0 MFP W541C204 20 18 17 16 15 28 27 26 25 24 23 22 21 20 19 28 SKINNY(300 mil), 28 SOP W541C203 RA2 1 2 3 4 5 6 7 8 9 10 INT RES VSS 1 2 3 4 5 VSS RB0 RB1 RB2 6 7 8 9 RB3 10 RA2 RA3 XOUT VDD VDD RC3 RC2 RC1 RC0 20-PDIP(300 mil) 20 RA1 19 RA0 XIN 18 17 16 15 14 13 12 11 XOUT VDD VDD RC3 RC2 RC1 RC0 20 SOP -5- Publication Release Date: May 29, 2003 Revision A4 W541C20X 5. PIN DESCRIPTION SYMBOL I/O FUNCTION Input pin for oscillator. Connected to crystal or resistor to generate system clock by code option. External 10~20pF capacitor uses to get accurate freq in crystal mode. Output pin for oscillator. Connected to crystal or resistor to generate system clock by code option. 20pF capacitor is built in internal for crystal mode. XIN I XOUT O RA0−RA3 I/O Input/Output port. Input/output mode specified by port mode 1 register (PM1). When used as output port, can provide high sink current for driving LED. RB0−RB3 I/O Input/Output port. Input/output mode specified by port mode 2 register (PM2). When used as output port, can provide high sink current for driving LED. RC0−RC3 I/O Input/Output port. Input/output mode specified by port mode 4 register (PM4). Each pin has an independent interrupt capability in input mode. And build-in schmitt trigger. RD0−RD3 I/O Input/Output port. Input/output mode specified by port mode 5 register (PM5). RE0/DOUT RE1/CLKO RE2/DIN RE3/CLKI I/O Special input/output port. This port can be configured by software to act as the output of internal port RT or the serial I/O port. When used as output port, can provide high sink current for driving LED. MFP O Output pin only. This pin can output modulating or nonmodulating frequency, or Timer 1 clock output specified by mode register 1 (MR1). INT I External interrupt pin with pull-high resistor. RES I System reset pin with pull-high resistor. VDD I Positive power supply (+). VSS I Negative power supply (-). -6- W541C20X 6. ELECTRICAL CHARACTERISTICS 6.1 Absolute Maximum Ratings PARAMETER RATING UNIT Supply Voltage to Ground Potential -0.3 to +7.0 V Applied Input/Output Voltage -0.3 to +7.0 V 120 mW 0 to +70 °C -55 to +150 °C Power Dissipation Ambient Operating Temperature Storage Temperature Note: Exposure to conditions beyond those listed under Absolute Maximum Ratings may adversely affect the life and reliability of the device. 6.2 DC Characteristics (VDD-VSS = 3.0V, Fosc. = 32.768 KHz, Ta = 25° C; unless otherwise specified) PARAMETER SYM. CONDITIONS - MIN. TYP. MAX. UNIT 2.4 - 5.5 V Op. Voltage VDD Op. Current (Crystal type) IOP1 No load (Ext-V) - 8 20 µA Op. Current (RC type) IOP2 No load (Ext-V) - 35 65 µA Hold Current (Crystal type) IHM1 Hold mode No load (Ext-V) - 4 6 µA Hold Current (RC type) IHM2 Hold mode No load (Ext-V) - 16 40 µA Stop Current (Crystal type) ISM1 Stop mode No load (Ext-V) - 0.1 2 µA Stop Current (RC type) ISM2 Stop mode No load (Ext-V) - 0.1 2 µA Input Low Voltage VIL - VSS - Input High Voltage VIH - 0.7 VDD - VDD V MFP Output Low Voltage VML IOL = 2.7 mA - - 0.4 V MFP Output High Voltage VMH IOH = -3.5 mA 2.4 - - V Port RA, RB Sink Current IABL VOL = 0.9V 7.5 - - mA Port RA, RB Source Current IABH VOH = 2.4V 0.4 1.2 - mA Port RC, RD Output Low Voltage VCDL IOL = 2.0 mA - - 0.4 V Port RC, RD Output High Voltage VCDH IOH = -2.0 mA 2.4 - - V -7- 0.3 VDD V Publication Release Date: May 29, 2003 Revision A4 W541C20X 6.2 DC Characteristics, continued PARAMETER SYM. CONDITIONS MIN. TYP. MAX. UNIT Port RE Sink Current IEL VOL = 0.9V 7.5 - - mA Port RE Source Current IEH VOH = 2.4V 0.4 1.2 - mA INT Pull-up Resistor RINT 50 250 1000 KΩ DIN Pin Pull-up Resistor RDIN 50 250 1000 KΩ RES Pull-up Resistor RRES 20 100 500 KΩ 6.3 RE.2 used as serial input pin - AC Characteristics (VDD-VSS = 3.0 V, Ta = 25° C; unless otherwise specified) PARAMETER SYM. CONDITIONS MIN. TYP. MAX. UNIT - 32.768 4000 - KHz 400 - 3580 - - 10 % Frequency Deviation by Voltage drop for RC Oscillator ∆f RC type Crystal type 1 (Option low speed type) Crystal type 2 (Option high speed type) f(3V) - f(2.4V) f f(3V) Instruction Cycle Time TI One machine cycle - 4/FOSC - mS Serial Port Data Ready Time TDR - 200 - - nS Serial Port Data Hold Time TDH - 200 - - nS Reset Active Width TRAW FOSC = 32.768 KHz 1 - - µS Interrupt Active Width TIAW FOSC = 32.768 KHz 1 - - µS Op. Frequency FOSC -8- W541C20X 7. APPLICATION CIRCUIT Vcc VDD RA0 Output Signal RA3 Vcc RB0 RB1 RB2 RB3 Vcc RD0 RD1 RD2 RD3 RC0 RC1 RC2 RC3 Vcc INT RE0 RE1 RE2 RE3 RES XOUT Vcc or MFP XIN *1(option) Note : VSS *1 is for accuracy -9- Publication Release Date: May 29, 2003 Revision A4 W541C20X 8. PACKAGE DIMENSIONS 8.1 18-Lead PDIP-300mil D 18 10 1 9 1 E E S c 1 2 A A A Base Plane L Seating Plane B e1 α B1 Dimension in inches Symbol A A1 A2 B B1 c D E E1 e1 L α eA S Min. Nom Max. Dimension in mm Min. Nom 0.010 Max. 4.45 0.175 0.25 0.125 0.130 0.135 3.18 3.30 3.43 0.016 0.018 0.022 0.41 0.46 0.56 0.058 0.060 0.064 1.47 1.52 1.63 0.008 0.010 0.014 0.20 0.25 0.36 0.900 0.910 22.86 23.11 7.87 0.290 0.300 0.310 7.37 7.62 0.245 0.250 0.255 6.22 6.35 6.48 0.090 0.100 0.110 2.29 2.54 2.79 0.120 0.130 0.140 3.05 3.30 3.56 15 0 0.375 8.51 9.02 9.53 0 0.335 0.355 0.055 - 10 - 15 1.40 eA W541C20X 8.2 20-Lead PDIP D 20 11 1 10 1 E E S c 1 2 A A A L Base Plane Seating Plane B e1 α B1 Symbol A A1 A2 B B1 c D E E1 e1 L Dimension in inches Min. Max. Dimension in mm Min. Nom 0.010 Max. 4.45 0.175 0.25 0.125 0.130 0.135 3.18 3.30 3.43 0.016 0.018 0.022 0.41 0.46 0.56 0.058 0.060 0.064 1.47 1.52 1.63 0.008 0.010 0.014 0.20 0.25 0.36 1.026 1.040 20.06 26.42 0.300 0.310 7.37 7.62 7.87 0.245 0.250 0.255 6.22 6.35 6.48 0.090 0.100 0.110 2.29 2.54 2.79 0.120 0.130 0.140 3.05 3.30 3.56 15 0 0.375 8.51 9.02 9.53 0.290 α 0 eA 0.335 S Nom eA 0.355 0.075 - 11 - 15 1.91 Publication Release Date: May 29, 2003 Revision A4 W541C20X 8.3 28-Lead P-DIP Skinny D 28 15 1 14 E1 E S c Base Plane A A2 A1 L Mounting Plane B e1 a B1 Symbol A A1 A2 B B1 c Dimension in Inches Min. Nom Max. Dimension in mm Min. Nom 0.010 Max. 4.45 0.175 0.25 0.125 0.130 0.135 3.18 3.30 3.43 0.016 0.018 0.022 0.41 0.46 0.56 0.058 0.060 0.064 1.47 1.52 1.63 0.008 0.010 0.014 0.20 0.25 0.36 1.388 1.400 35.26 35.56 7.87 8.13 D E E1 e1 0.300 0.283 0.288 0.293 7.19 7.32 7.44 0.090 0.100 0.110 2.29 2.54 2.79 L 0.120 0.130 0.140 3.05 3.30 3.56 a 0 15 0 0.370 8.38 eA S 0.330 0.310 0.350 0.320 0.055 - 12 - 7.62 15 8.89 9.40 1.40 eA W541C20X 8.4 20-Lead SOP-300mil 11 20 c E HE L 10 1 D 0.25 O A Y SEATING PLANE e GAUGE PLANE A1 b Control demensions are in milmeters . Symbol A A1 b c E D e HE Y L q Dimension in mm Min. 2.35 0.10 0.33 0.23 Dimension in inches Max. 2.65 0.30 0.51 Min. 0.093 0.004 0.013 0.32 7.40 7.60 13.00 12.60 1.27 BSC 10.65 10.00 0.10 1.27 0.40 0 8 Max. 0.104 0.012 0.020 0.009 0.291 0.496 0.013 0.299 0.512 0.050 BSC 0.419 0.394 0.004 0.016 0.050 0 8 - 13 - Publication Release Date: May 29, 2003 Revision A4 W541C20X 8.5 28-Lead SOP-300mil 15 28 c E HE L 14 1 D 0.25 O A Y SEATING PLANE e Control demensions are in milmeters . Symbol A A1 b c E D e HE Y L q Dimension in mm Min. 2.35 0.10 0.33 0.23 GAUGE PLANE A1 b Max. 2.65 0.30 0.51 0.32 7.40 7.60 17.70 18.10 1.27 BSC 10.65 10.00 0.10 1.27 0.40 0 8 Dimension in inches Min. Max. 0.093 0.104 0.012 0.004 0.013 0.020 0.009 0.013 0.291 0.299 0.697 0.713 0.050 BSC 0.394 0.419 0.004 0.016 0.050 0 8 - 14 - W541C20X 9. REVISION HISTORY VERSION DATE DESCRIPTION A2 - Note: Update Hi freq range from 4.19 3.58MHz (C200) A3 - Note: RC is built-in schmitt trigger A4 May 29, 2003 Note: Do not be floating when it is as input or output open-drain (NMOS type) Headquarters Winbond Electronics Corporation America Winbond Electronics (Shanghai) Ltd. No. 4, Creation Rd. III, Science-Based Industrial Park, Hsinchu, Taiwan TEL: 886-3-5770066 FAX: 886-3-5665577 http://www.winbond.com.tw/ 2727 North First Street, San Jose, CA 95134, U.S.A. TEL: 1-408-9436666 FAX: 1-408-5441798 27F, 2299 Yan An W. Rd. Shanghai, 200336 China TEL: 86-21-62365999 FAX: 86-21-62365998 Taipei Office Winbond Electronics Corporation Japan Winbond Electronics (H.K.) Ltd. 9F, No.480, Rueiguang Rd., Neihu District, Taipei, 114, Taiwan, R.O.C. TEL: 886-2-8177-7168 FAX: 886-2-8751-3579 7F Daini-ueno BLDG, 3-7-18 Shinyokohama Kohoku-ku, Yokohama, 222-0033 TEL: 81-45-4781881 FAX: 81-45-4781800 Unit 9-15, 22F, Millennium City, No. 378 Kwun Tong Rd., Kowloon, Hong Kong TEL: 852-27513100 FAX: 852-27552064 Please note that all data and specifications are subject to change without notice. All the trade marks of products and companies mentioned in this data sheet belong to their respective owners. - 15 - Publication Release Date: May 29, 2003 Revision A4