PRELIMINARY W541E20X 4-BIT FLASH EPROM MICROCONTROLLER GENERAL DESCRIPTION The W541E20X is fully compatible with W741E20X in terms of pin assignment and IC function. It is a high-performance 4-bit microcontroller (C) that provides an flash EEPROM for the program memory. 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 port for LED driving). There are also seven interrupt sources and 8-level subroutine nesting for interrupt applications. The W541E20X has two power reduction modes, hold mode and stop mode, which help to minimize power dissipation. The W541E20X is suitable for end product manufacturer engineering testing and earlier samples before mass production. FEATURES * * Operating voltage: 2.4V-5.5V Crystal or RC oscillation circuit can be selected by the code option - Crystal/Ceramic oscillator: up to 4 MHz * * - RC oscillator: up to 4 MHz Both in crystal or RC oscillator operation mode, high-frequency (400 KHz to 4 MHz) or low-frequency (32.768 KHz) oscillation must be determined by the code option Memory -2048 x 16 bit program flash EEPROM (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 Two built-in 8-bit programmable countdown timers - Timer 0: One of two internal clock frequencies (FOSC/4 or FOSC/1024) can be selected -1- Publication Release Date: June 2003 Revision A2 Preliminary W541E20X * * * * * * - 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 -2- Preliminary W541E20X BLOCK DIAGRAM RAM (128*4) Flash EEPROM (2048*16) ACC (look_up table 2K*4) ALU VPP (RES) DATA (RA3) MODE (INT) +1(+2) PC STACK (8 Levels) Timer 0 (8-bit) Watchdog Timer (4-bit) Central Control Unit IEF HEF PEF HCF EVF SEF MR0 PM0 . . . RA0 to 3 PORT RB RB0 to 3 PORT RC RC0 to 3 PORT RD RD0 to 3 PORT RT PSR0 PSR1 PSR2 PR PORT RA SEL Serial I/O Modulation Frequency Pulse Timer 1 (8-bit) Divider 0 (14-bit) MUX SEL MUX RE0 to 3 (RE0/DOUT, RE1/CLKO, RE2/DIN, RE3/CLKI) MFP VDD VSS Timing Generator RES INT XIN -3- XOUT Publication Release Date: June 2003 Revision A2 Preliminary W541E20X PIN CONFIGURATIONS W541E202/W541E205 RB0 1 2 3 4 5 6 7 8 9 10 28 27 26 25 24 23 22 21 20 19 RA1 RA0 XIN XOUT VDD RD3 RD2 RD1 RD0 RC3 RB1 RB2 RB3 NC 11 12 13 14 18 17 16 15 RC2 RC1 RC0 MFP RA2 (DATA) RA3 (MODE) /INT (Vpp) /RES VSS W541E201 RA2 (DATA) RA3 (MODE) /INT (Vpp) /RES VSS RB0 RB1 RB2 RB3 1 2 3 4 5 6 7 8 9 18 17 16 15 14 13 12 11 10 RE0 RE1 RE2 RE3 RA1 RA0 XIN XOUT VDD RC3 RC2 RC1 RC0 28 SKINNY (300 mil), 28 SOP 18-PDIP (300 mil) W541E204 W541E203 RA2 (DATA) RA3 (MODE) /INT (Vpp) /RES VSS VSS RB0 RB1 RB2 RB3 1 2 3 4 5 6 7 8 9 10 20 19 18 17 16 15 14 13 12 11 RA2 (DATA) RA3 RA1 RA0 XIN XOUT VDD (MODE) /INT (Vpp) /RES VSS VDD VSS RB0 RB1 RC3 RC2 RC1 RC0 RB2 RB3 20 1 2 3 4 5 19 18 17 16 15 6 7 8 9 14 13 12 11 10 20 SOP 20-PDIP (300 mil) -4- RA1 RA0 XIN XOUT VDD VDD RC3 RC2 RC1 RC0 Preliminary W541E20X PIN DESCRIPTION SYMBOL I/O FUNCTION XIN I 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. XOUT O 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. RA0-RA2, 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. RA3 (DATA) I/O RB0-RB3 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. I/O RC0-RC3 Input/Output port. Input/output mode specified by port mode 4 register (PM4). Each pin has an independent interrupt capability in input mode. I/O RD0-RD3 Input/Output port. Input/output mode specified by port mode 5 register (PM5). RE0/DOUT, RE1/CLKO, RE2/DIN, RE3/CLKI I/O MFP 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. Output pin only. This pin can output modulating or nonmodulating frequency, or Timer 1 clock output specified by mode register 1 (MR1). 1 INT (MODE) I External interrupt pin. This pin must be tied to VDD through an external resistor. It is a low active and floating input pin. RES (VPP) 1 I System reset pin. This pin must be tied to VDD through an external resistor when it is not used to reset this chip. It is a low active and floating input pin. VDD I Positive power supply (+). VSS I Negative power supply (-). Note: There are internal pull-high resistors in these pins of W741C20X. -5- Publication Release Date: June 2003 Revision A2 Preliminary W541E20X 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. DC CHARACTERISTICS (VDD-VSS = 3.0 V, Fosc. = 32.768 KHz, Ta = 25 C; unless otherwise specified) PARAMETER SYM. CONDITIONS MIN. TYP. MAX. UNIT Op. Voltage VDD - 2.4 - 5.5 V Op. Current (Crystal type) IOP1 No load (Ext-V) - 8.5 20 A Op. Current (RC type) IOP2 No load (Ext-V) - 36 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 - 0.3 VDD V Input High Voltage VIH - 0.7 VDD - VDD V MFP Output Low Voltage VML IOL = 3.5mA - - 0.4 V MFP Output High Voltage VMH IOH = -3.5mA 2.4 - - V Port RA, RB Sink Current IABL VOL = 0.9V 9 - - 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 Port RE Sink Current IEL VOL = 0.9V 9 - - mA Port RE Source Current IEH VOH = 2.4V 0.4 1.2 - mA DIN Pin Pull-up Resistor RDIN RE.2 used as serial input pin 50 250 1000 K -6- Preliminary W541E20X AC CHARACTERISTICS (VDD-VSS = 3.0 V, Ta = 25 C; unless otherwise specified) PARAMETER Op. Frequency SYM. Fosc CONDITIONS MIN. TYP. MAX. UNIT RC type - - 4000 Crystal type 1 (Option low speed type) - 32.768 - Crystal type 2 (Option high speed type) 400 - 3580 - - 10 % KHz Frequency Deviation by Voltage Drop for low freq. RC Oscillator f f(3V) - f(2.4V) f f(3V) Instruction Cycle Time TI One machine cycle - 4/Fosc - S 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 -7- Publication Release Date: June 2003 Revision A2 Preliminary W541E20X TYPICAL APPLICATION CIRCUIT Vcc VDD RA0 Output Signal RA3 Vcc RB0 RB1 RB2 RB3 Vcc RD0 RD1 RD2 RD3 RC0 RC1 RC2 RC3 Vcc Vcc INT RE0 RE1 RE2 RE3 RES XOUT or MFP XIN VSS -8- Vcc Preliminary W541E20X PACKAGE DIAMENSIONS 18-Lead PDIP (300 mil) D 18 10 1 9 E1 E S c 2 1 A A A Base Plane Seating Plane L B e1 \ B1 Dimension in inch Symbol A A1 A2 B B1 c D E E1 e1 L \ eA S Min. Nom. Max Dimension in mm Min Nom. Max. 4.45 0.175 0.010 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 eA 0.355 0.055 -9- 15 1.40 Publication Release Date: June 2003 Revision A2 Preliminary W541E20X Package Dimensions, continued 20-Lead PDIP D 20 11 1 10 1 E E S c 1 2 A A A Base Plane Seating Plane L B e1 \ B1 Symbol A A1 A2 B B1 c D E E1 e1 L Dimension in inch Dimension in mm Min. Nom. 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 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 eA 0.335 S Max. 0.355 0.075 - 10 - 15 1.91 eA Preliminary W541E20X Package Dimensions, continued 28-Lead PDIP Skinny D 28 15 1 14 E1 E S c Base Plane A A2 A1 L Mounting Plane B B e1 a Dimension in Inches Symbol A A1 A2 B B1 c D E E1 e1 L a eA S eA 1 Min. Nom. Dimension in mm Max. 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 0.300 0.310 0.320 7.62 0.283 0.288 0.293 7.19 7.32 7.44 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 8.89 9.40 0 0.330 0.350 0.370 8.38 0.055 - 11 - 15 1.40 Publication Release Date: June 2003 Revision A2 Preliminary W541E20X Package Dimensions, continued 20-Lead SOP (300mil) 11 20 c E HE L 10 1 0.25 D A Y SEATING PLANE GAUGE PLANE e A1 b Control demensions are in milmeters. Symbol A A1 b c E D e HE Y L Dimension in mm Min. 2.35 0.10 0.33 0.23 Max. 2.65 0.30 0.51 0.32 7.60 13.00 7.40 12.60 1.27 BSC 10.65 10.00 0.10 0.40 0 1.27 8 Dimension in Inches Min. 0.093 0.004 0.013 Max. 0.104 0.012 0.020 0.013 0.009 0.299 0.291 0.496 0.512 0.050 BSC 0.419 0.394 0.004 0.050 0.016 0 8 - 12 - Preliminary W541E20X Package Dimensions, continued 28-Lead SOP (300 mil) 28 15 c E HE L 14 1 D 0.25 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 Dimension in mm Min. Max. 2.35 2.65 0.10 0.30 0.33 0.51 0.23 0.32 7.40 17.70 7.60 18.10 1.27 BSC 10.00 10.65 0.10 0.40 1.27 8 0 Dimension in Inches Min. Max. 0.093 0.104 0.012 0.004 0.013 0.020 0.009 0.291 0.697 0.013 0.299 0.713 0.050 BSC 0.394 0.419 0.004 0.016 0.050 0 - 13 - 8 Publication Release Date: June 2003 Revision A2 Preliminary W541E20X Notes: Headquarters Winbond Electronics (H.K.) Ltd. Rm. 803, World Trade Square, Tower II, No. 4, Creation Rd. III, 123 Hoi Bun Rd., Kwun Tong, Science-Based Industrial Park, Kowloon, Hong Kong Hsinchu, Taiwan TEL: 852-27513100 TEL: 886-3-5770066 FAX: 852-27552064 FAX: 886-3-5792766 http://www.winbond.com.tw/ Voice & Fax-on-demand: 886-2-27197006 Taipei Office 11F, No. 115, Sec. 3, Min-Sheng East Rd., Taipei, Taiwan TEL: 886-2-27190505 FAX: 886-2-27197502 Note: All data and specifications are subject to change without notice. - 14 - Winbond Electronics North America Corp. Winbond Memory Lab. Winbond Microelectronics Corp. Winbond Systems Lab. 2727 N. First Street, San Jose, CA 95134, U.S.A. TEL: 408-9436666 FAX: 408-5441798