Syntek Semiconductor Co., Ltd STK55C641 STK55C641 Specification 1. FEATURES : * Operating voltage : 2.5V - 6V. * Maximum CPU operating frequency : 4MHz at 5V and 1.5MHz at 2.5V * Dual oscillators : - 32.768 KHz crystal oscillator for LCD display and watch timer. - RC oscillator for system clock. * 40 segments and 16 commons output for LCD driver. - 1/5 bias, 1/16 duty and 64Hz frame frequency. - 1/4 bias, 1/8 duty and 128Hz frame frequency. * I/O port. - 30 I/O pins. - Port 1 with selectable interrupt. * Built in 2K bytes RAM (including LCD storage area). * Built in 8K bytes ROM for program. * One 8-bit timer with 8 predefined input clock. * Five interrupt sources : NMI - 64 Hz interrupt IRQ1 - Stopwatch timer interrupt IRQ2 - Fix-time timer interrupt IRQ3 - Timer interrupt IRQ4 - External interrupt * Code option : - Built-in 150K OHM pull-up resistors for I/O port. - 1/8 duty or 1/16 duty. 2. APPLICATION : * Data bank * Calculator * Hand-held game * Small instrument * Toy LCD Controller 1/1 ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd STK55C641 3. BLOCK DIAGRAM: OSC1 32768Hz OSC2 RC oscillator Clock Generator 8-bit CPU ROM 8Kx8 RAM 2Kx8 LCD driver C1-C16 S1-S40 A0-A15 IRQ Address decoder 8-bit Timer SOUND D0-D7 Port 1 P10-P17 LCD Controller Port 2 P20-P27 Port 3 Port 4 P30-P37 P40-P45 2/2 ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd 4. PIN DESCRIPTION : Pin name COM1-COM16 SEG1...SEG40 VLCD VR CLK256 P10-P17 P20-P27 P30-P37 P40-P45 OSC1 OSC2 XOSC1 XOSC2 SOUND /RES /TEST VDD VSS1, VSS2 STK55C641 (Total 100 pads) I/O O O I I O I/O I/O I/O I/O I O I O O I I Function description LCD common output pins LCD segment output pins LCD voltage input LCD contrast control 256 Hz clock output 8-bit I/O pins for port 1 8-bit I/O pins for port 2 8-bit I/O pins for port 3 6-bit I/O pins for port 4 Main system oscillator input pin for chip Main system oscillator output pin for resistor 32.768K Hz crystal oscillator input 32.768K Hz crystal oscillator output Audio output System reset Test pin. Keep floating or connect to Vdd Power input Signal ground 5. ADDRESS ARRANGEMENT Please note that A14-A15 are not cared in hardware. So, following memory areas are mapping in the same location. 0000-3FFF, 4000-7FFF, 8000-BFFF, C000-FFFF. 1) RAM 0000-007F for LCD output data storage. Memory address Pin for 1/16 duty 0000-0004 0008-000C 0010-0014 0018-001C 0020-0024 LCD Controller COM1 COM2 COM3 COM4 COM5 Pin for 1/8 duty COM1 COM2 COM3 COM4 COM5 3/3 ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd Memory address Pin for 1/16 duty 0028-002C COM6 0030-0034 COM7 0038-003C COM8 0040-0044 COM9 0048-004C COM10 0050-0054 COM11 0058-005C COM12 0060-0064 COM13 0068-006C COM14 0070-0074 COM15 0078-007C COM16 The LSB of low byte - SEG1. The MSB of high byte - SEG40. The middle bits are in the order. STK55C641 Pin for 1/8 duty COM6 COM7 COM16 0080-00FF for zero page area. 0100-01FF for stack and data page area. 0200-07FF for data area. 2) ROM E000-FFFF for program area. FFFF, FFFE - IRQ vector. FFFD, FFFC - RES vector. FFFB, FFFA - NMI vector. 3) Others 1000 To enter stand-by mode. Write only. * Write this address, the CPU will be hold with LCD state no change. * When in stand-by mode, the NMI and IRQ will wake up the CPU. | 1001 To enter sleep mode. Write only. = 1 Sleep mode 1 = 2 Sleep mode 2 All other values are prohibited. Do not write any other value to this register. LCD Controller 4/4 ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd STK55C641 In sleep mode 1, both of the main system oscillator and 32.768KHz sub-system oscillator will be stopped. So, all function are stopped and only external interrupt can wake up this chip. The LCD display will be turn off while getting into sleep mode 1. In sleep mode 2, only main system oscillator will be stopped. So, the following functions will still keep working. * The LCD will be kept on. * The watch timer and fix-time timer will keep going. * The NMI, port 1, watch timer and fix-time timer interrupt will wake up this chip. * CPU will keep working if clock source is 32.768K Hz. 1002 Watch timer control register. Write only. Bit 0 : = 0 Set watch timer interrupt at 10 Hz = 1 Set watch timer interrupt at 100 Hz 1 : = 0 Set fix-time timer interrupt at 2 Hz = 1 Set fix-time timer interrupt at 1 Hz 2 : = 0 Normal operation. = 1 Reset and stop stopwatch timer. 3 : = 0 Stop stopwatch register without reset. = 1 Start stopwatch timer. 4 : = 0 CPU clock is system clock. = 1 CPU clock is 32.768K Hz. 7-5 : Reserved. The default value for each bit is zero. Bit 2 will be cleared to zero automatically after stopwatch timer reset. 1003 IRQ flag register. Read & write. Read function : Bit 0 : = 1 Stopwatch timer interrupt, IRQ1. 1 : = 1 Fix-time timer interrupt, IRQ2. 2 : = 1 Timer interrupt, IRQ3. 3 : = 1 External interrupt, IRQ4. Write function : Bit 0 : = 0 Clear stopwatch timer interrupt. 1 : = 0 Clear fix-time timer interrupt. 2 : = 0 Clear timer interrupt. 3 : = 0 Clear external interrupt. Note : Please do not use the STZ $1003 to clear all the interrupts at the same time. LCD Controller 5/5 ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd STK55C641 Also, please do not use the read-modify-write instruction to clear interrupt flag. For example, LDA #1 and TRB $1003 to clear the IRQ1. Because some other interrupts may be lost if clear interrupt with above method. Following procedures are suggested. LDA $1003 AND #1 BEQ CheckIRQ2 EOR #$0FF STA $1003 ;clear IRQ1 · · · 1004 Port 1 data. Read & write. 1005 Set port 1 bit function. Write only. * An '1' in this register will set the corresponding pin of port 1 as an output pin. * The default value for each bit is zero. A pull-up resistor can be added to the pin by code option. But the pull-up resistor will be disabled if the output state is low. 1006 Port 2 data. Read & write. 1007 Set port 2 bit function. Write only. * An '1' in this register will set the corresponding pin of port 2 as an output pin. * The default value for each bit is zero. A pull-up resistor can be added to the pin by code option. But the pull-up resistor will be disabled if the output state is low. 1008 Port 3 data. Read & write. 1009 Set port 3 bit function. Write only. * An '1' in this register will set the corresponding pin of port 3 as an output pin. * The default value for each bit is zero. A pull-up resistor can be added to the pin by code option. But the pull-up resistor will be disabled if the output state is low. 100A Port 4 data. Read & write. 100B Set port 4 bit function. Write only. LCD Controller 6/6 ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd STK55C641 * An '1' in this register will set the corresponding pin of port 4 as an output pin. * The default value for each bit is zero. A pull-up resistor can be added to the pin by code option. But the pull-up resistor will be disabled if the output state is low. 100C Set port 1 bit interrupt function. Write only. * An '1' in this register will set the interrupt function of the corresponding pin of port 1 to be enable. That is, an interrupt will be generated if a low level is detected in the pin. * The default value for each bit is zero. 100D Timer 1 data. Read & write. * Before writing $100D, the program should select timer clock ($100E) first. * After timer 1 been enabled, the timer will start to count down. When timer counts to zero, the timer will count from the initial value and IRQ3 will happen. * The time elapse = ($100D)/timer clock 100E Timer 1 clock select. Write only. Bit 2-0 : = 000 System clock/2 = 001 System clock/4 = 010 System clock/8 = 011 System clock/16 = 100 System clock/32 = 101 System clock/64 = 110 System clock/128 = 111 System clock/256 7-3 : Reserved The default value is unknown. 100F Control register. Write only. Bit 0 : = 0 Disable timer 1 output to SOUND pin. = 1 Enable timer 1 output to SOUND pin. 1 : = 0 Disable timer 1 interrupt. = 1 Enable timer 1 interrupt. 2 : = 0 Disable NMI. = 1 Enable NMI. 3 : = 0 Disable timer 1. = 1 Enable timer 1. LCD Controller 7/7 ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd STK55C641 4 : = 0 LCD off. = 1 LCD on. 5 : = 0 Disable watch timer interrupt. = 1 Enable watch timer interrupt. 6 : = 0 Disable fix-time timer interrupt. = 1 Enable fix-time timer interrupt. 7 : = 0 Disable sound output. = 1 Enable sound output. * The default value for each bit is zero. Timer 1 output 1/2 NAND Bit 0 of $100F AND SOUND Bit 7 of $100F 1010 Stopwatch timer value. Read only. Bit 3-0 : 1/100 sec data in BCD value. 7-4 : 1/10 sec data in BCD value. 4) The reset status of CPU If the /RES is keep low more than two system clocks, then the CPU will be reset. After reset, the interrupt mask flag is set, the decimal mode is cleared and the program counter will be loaded with the reset vector from address $FFFC and $FFFD. So, after initial procedure the firmware should do a ‘CLI’ instruction. Otherwise, the CPU will not acknowledge any interrupt. 5) Interrupt Sources * There are five interrupt sources : NMI - 64 Hz interrupt. IRQ1 - Stopwatch timer interrupt. IRQ2 - Fix-time timer interrupt. IRQ3 - Timer interrupt. IRQ4 - Port 1 interrupt. LCD Controller 8/8 ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd STK55C641 * The interrupt function of CPU is disabled after reset. A CLI instruction must be added after initialize this chip otherwise the CPU will not acknowledge any IRQ. * All interrupts will wake up CPU from standby mode. * NMI, IRQ1, IRQ2 and IRQ4 will wake up CPU from sleep mode 2. * Only IRQ4 will wake up CPU from sleep mode 1. * If want to accept IRQ in the middle of NMI loop, please reset the IRQ disable flag of the CPU before IRQ signal come. * When port 1 is in input mode and pin interrupt enable, a low signal from pin will generate IRQ4. 6. ABSOLUTE MAXIMUM RATINGS Operating temperature ........................................................................ 0 to 70 ℃ Storage temperature ...................................................................... -65 to 150 ℃ Supply voltage ............................................................................................... 7 V Input voltage ........................................................................... -0.6 to Vdd+0.6 V 7. ELECTRICAL CHARACTERISTIC : Parameter Symbol Supply Voltage Vdd Main system frequency ∅sys Crystal frequency ∅cry Operating current Idd Standby current Condition Min Typ. Max Unit 2.5 3.0 6 - 1 1.5 Mhz Vdd=2.7V 2 Mhz Vdd=3V 2.5 Mhz Vdd=3.5V 3 Mhz Vdd=4V 3.5 Mhz Vdd>=4.5V 4 Mhz Vdd=2.5V V 32768 Hz Vdd=5V,∅sys=1Mhz 1 mA Istdby Vdd=5V,∅sys=1Mhz .8 mA Sleep mode 1 current Islp1 Vdd=5V, LCD off Sleep mode2 current Islp2 Vdd=2.5V,Vlcd=4V 40 µA Vdd=3V, Vlcd=5V 60 µA Vdd=3.5V, Vlcd=6V 80 µA Vdd=Vlcd=2.5V 16 µA Vdd=Vlcd=3V 25 µA (LCD on) LCD Controller 9/9 1 µA ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd Parameter Symbol Sleep mode2 current (LCD off) Condition Min STK55C641 Typ. Max Unit Vdd=Vlcd=3.5V 35 µA Vdd=Vlcd=4V 45 µA Vdd=Vlcd=4.5V 70 µA Vdd=Vlcd=5V 75 µA Vdd=2.5V 2 µA Vdd=3V 3 µA Vdd=3.5V 5 µA Vdd=4V 6 µA Vdd=4.5V 7 µA Vdd=5V 9 µA Input high voltage Vih Vdd=5.0V 2.0 Input low voltage Vil Vdd=5.0V -0.6 Input high leakage current Iih Vih=Vdd -1 µA Input low leakage current Iil Vil=0 1 µA Output high voltage (For SEGx and COMx) Voh1 Ioh=-30µA Vlcd0.2 Vlcd V Output low voltage (for SEGx and COMx) Vol1 Iol=40µA 0 0.2 V Output high voltage (for other pins) Voh2 Ioh=-2mA Vdd0.4 Vdd V Output low voltage (for other pins) Vol2 Iol=2mA 0 0.4 V LCD Controller 10 / 10 V 0.8 V ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd STK55C641 8. LCD WAVEFORM : 8.1 1/16 duty 1/64 sec Vlcd 4/5 Vlcd 3/5 Vlcd 2/5 Vlcd 1/5 Vlcd Vss COM1 Vlcd 4/5 Vlcd 3/5 Vlcd 2/5 Vlcd 1/5 Vlcd Vss COM2 Vlcd 4/5 Vlcd 3/5 Vlcd 2/5 Vlcd 1/5 Vlcd Vss COM3 • • • Vlcd 4/5 Vlcd 3/5 Vlcd 2/5 Vlcd 1/5 Vlcd Vss COM16 Vlcd 4/5 Vlcd 3/5 Vlcd 2/5 Vlcd 1/5 Vlcd Vss SEGx There are two LCD matrix DOTs active at (SEGx,COM2) and (SEGx,COM16) LCD Controller 11 / 11 ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd STK55C641 8.2 1/8 duty 1/128 sec COM1 Vlcd 3/4 Vlcd 2/4 Vlcd 1/4 Vlcd Vss COM2 Vlcd 3/4 Vlcd 2/4 Vlcd 1/4 Vlcd Vss COM3 Vlcd 3/4 Vlcd 2/4 Vlcd 1/4 Vlcd Vss COM4 • • • COM8 Vlcd 3/4 Vlcd 2/4 Vlcd 1/4 Vlcd Vss SEGx Vlcd 3/4 Vlcd 2/4 Vlcd 1/4 Vlcd Vss There are two LCD matrix DOTs active at (SEGx,COM2) and (SEGx,COM8) LCD Controller 12 / 12 ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd STK55C641 9. PAD LOCATION : Unit : µM Chip size : 3090 x 3280 PAD-No Name X Y PAD-No Name X Y 1 VSS 69.94 459.36 51 S34 3020.06 2735.10 2 C1 69.94 344.68 52 S35 3020.06 2849.78 3 C2 69.94 230.00 53 S36 3020.06 2971.98 4 C3 133.12 70.94 54 S37 3020.06 3094.18 5 C4 247.80 70.94 55 S38 2864.38 3209.06 6 C5 362.48 70.94 56 S39 2723.57 3209.06 7 C6 477.16 70.94 57 S40 2601.37 3209.06 8 C7 591.84 70.94 58 VLCD 2481.05 3209.06 9 C8 706.52 70.94 59 VR 2363.55 3209.06 10 C9 821.20 70.94 60 CLKOUT 2246.05 3209.06 11 C10 935.88 70.94 61 TESTB 2131.37 3209.06 12 C11 1050.56 70.94 62 XOSC1 2016.69 3209.06 13 C12 1165.24 70.94 63 XOSC2 1902.01 3209.06 LCD Controller 13 / 13 ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd STK55C641 PAD-No Name X Y PAD-No Name X Y 14 C13 1279.92 70.94 64 VDD 1787.33 3209.06 15 C14 1394.60 70.94 65 OSC1 1672.65 3209.06 16 C15 1509.28 70.94 66 OSC2 1557.97 3209.06 17 C16 1623.96 70.94 67 VSS 1443.29 3209.06 18 S1 1738.64 70.94 68 VDD 1328.61 3209.06 19 S2 1853.32 70.94 69 RESB 1213.93 3209.06 20 S3 1968.00 70.94 70 SOUND 1099.25 3209.06 21 S4 2082.68 70.94 71 P10 984.57 3209.06 22 S5 2197.36 70.94 72 P11 869.89 3209.06 23 S6 2312.04 70.94 73 P12 755.21 3209.06 24 S7 2426.72 70.94 74 P13 640.53 3209.06 25 S8 2541.40 70.94 75 P14 525.85 3209.06 26 S9 2656.08 70.94 76 P15 387.67 3209.06 27 S10 2770.76 70.94 77 P16 249.49 3209.06 28 S11 2885.44 70.94 78 P17 69.94 3097.00 29 S12 3020.06 206.50 79 P20 69.94 2982.32 30 S13 3020.06 324.00 80 P21 69.94 2867.64 31 S14 3020.06 441.50 81 P22 69.94 2752.96 32 S15 3020.06 556.18 82 P23 69.94 2638.28 33 S16 3020.06 670.86 83 P24 69.94 2523.60 34 S17 3020.06 785.54 84 P25 69.94 2408.92 35 S18 3020.06 900.22 85 P26 69.94 2294.24 36 S19 3020.06 1014.90 86 P27 69.94 2179.56 37 S20 3020.06 1129.58 87 P30 69.94 2064.88 38 S21 3020.06 1244.26 88 P31 69.94 1950.20 39 S22 3020.06 1358.94 89 P32 69.94 1835.52 40 S23 3020.06 1473.62 90 P33 69.94 1720.84 41 S24 3020.06 1588.30 91 P34 69.94 1606.16 42 S25 3020.06 1702.98 92 P35 69.94 1491.48 43 S26 3020.06 1817.66 93 P36 69.94 1376.80 44 S27 3020.06 1932.34 94 P37 69.94 1262.12 45 S28 3020.06 2047.02 95 P40 69.94 1147.44 46 S29 3020.06 2161.70 96 P41 69.94 1032.76 47 S30 3020.06 2276.38 97 P42 69.94 918.08 LCD Controller 14 / 14 ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd STK55C641 PAD-No Name X Y PAD-No Name X Y 48 S31 3020.06 2391.06 98 P43 69.94 803.40 49 S32 3020.06 2505.74 99 P44 69.94 688.72 50 S33 3020.06 2620.42 100 P45 69.94 574.04 LCD Controller 15 / 15 ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd. STK55C641 10. APPLICATION CIRCUIT : 10.1 For 5V LCD panel : 10.2 For 3V LCD panel : LCD Controller 16 / 16 ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd. LCD Controller 17 / 17 STK55C641 ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd. STK55C641 Syntek Semiconductor Co., Ltd. Customer Information Sheet for STK55C641 000112 1. Customer's Name : ____________________ 2. Project title : _________________________ * 3. Syntek part number : ___________________ 4. Package --------------- ( ) Chip ( ) QFP Oscillator type ---- ( ) RC ( ) XTAL LCD duty----------- ( ) 1/8 duty, 1/4 bias ( 5. Options : ) 1/16 duty, 1/5 bias P o r t 1 P o r t 2 P o r t 3 Po r t 4 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 5 4 3 2 1 0 Pull-up 6. Customer code : Code form ----------------- ( ) EPROM Checksum ----------------- E000-EFFF ( ) file _______________ __________H F000-FFFF __________H E000-FFFF __________H 7. Operating conditions : All the operating conditions listed below are for Syntek reference. Syntek will not guaranty on these values. Please refer to data book or contact Syntek for the guaranty values. Operating voltage : _____-_____ V Voltage doubler : ( ) Yes Operating current : _____ mA Operating frequency : _____ Hz ( ) No Sleep current : Mode 1: _____ µA (LCD Off) Mode 2 : _____ µA (For LCD On) _____ µA (For LCD Off) Others : LCD Controller 18 / 18 ISSUE DATE : 3 March, 2000 Syntek Semiconductor Co., Ltd. STK55C641 Customer : __________________ Salesman : __________________Date : __/__/__ Note : The items marked with '*' will be filled by Syntek. LCD Controller 19 / 19 ISSUE DATE : 3 March, 2000