NEW DATABASE - 350 MILLION DATASHEETS FROM 8500 MANUFACTURERS
LQFP44 JIS-X0208-1990 RS232 - Datasheet Archive
Handwriting Recognition Microcontroller Product Specification DOC. VERSION 2.1 ELAN MICROELECTRONICS CORP. October 2006 Trademark
ePH1300 Handwriting Recognition Microcontroller Product Specification DOC. VERSION 2.1 ELAN MICROELECTRONICS CORP. October 2006 Trademark Acknowledgments: IBM is a registered trademark and PS/2 is a trademark of IBM. Windows is a trademark of Microsoft Corporation. ELAN and ELAN logo are trademarks of ELAN Microelectronics Corporation. Copyright © 2006 by ELAN Microelectronics Corporation All Rights Reserved Printed in Taiwan, ROC The contents of in this specification are subject to change without notice. ELAN Microelectronics assumes no responsibility concerning the accuracy, adequacy, or completeness of this specification. ELAN Microelectronics makes no commitment to update, or to keep current the information and material contained in this specification. Such information and material may change to conform to each confirmed order. In no event shall ELAN Microelectronics be made responsible to any claims attributed to errors, omissions, or other inaccuracies in the information or material contained in this specification. ELAN Microelectronics shall not be liable for direct, indirect, special incidental, or consequential damages arising out of the use of such information or material. The software (if any) described in this specification is furnished under a license or nondisclosure agreement, and may be used or copied only in accordance with the terms of such agreement. ELAN Microelectronics products are not intended for use in life support appliances, devices, or systems. Use of ELAN Microelectronics product in such applications is not supported and is prohibited. NO PART OF THIS SPECIFICATION MAY BE REPRODUCED OR TRANSMITTED IN ANY FORM OR BY ANY MEANS WITHOUT THE EXPRESS WRITTEN PERMISSION OF ELAN MICROELECTRONICS. ELAN MICROELECTRONICS CORPORATION Headquarters: Hong Kong: USA: No. 12, Innovation Road 1 Hsinchu Science Park Hsinchu, Taiwan 30077 Tel: +886 3 563-9977 Fax: +886 3 563-9966 http://www.emc.com.tw Elan (HK) Microelectronics Corporation, Ltd. Flat A, 19F., World Tech Centre 95 How Ming Street, Kwun Tong Kowloon , Hong Kong Tel: +852 2723-3376 Fax: +852 2723-7780 elanhk@emc.com.hk Elan Information Technology Group (U.S.A.) Europe: Shenzhen: Shanghai: Elan Microelectronics Corp. (Europe) Elan Microelectronics Shenzhen, Ltd. Elan Microelectronics Shanghai, Ltd. Siewerdtstrasse 105 8050 Zurich, Switzerland Tel: +41 43 299-4060 Fax: +41 43 299-4079 http://www.elan-europe.com SSMEC Bldg., 3F, Gaoxin S. Ave. Shenzhen Hi-Tech Industrial Park Shenzhen, Guandong, China Tel: +86 755 2601-0565 Fax: +86 755 2601-0500 23/Bldg. #115 Lane 572, Bibo Road Zhangjiang Hi-Tech Park Shanghai, China Tel: +86 21 5080-3866 Fax: +86 21 5080-4600 1821 Saratoga Ave., Suite 250 Saratoga, CA 95070 U.S.A. Tel: +1 408 366-8225 Fax: +1 408 366-8220 Contents Contents 1 2 3 4 Introduction . 1 Features . 1 Block Diagram . 1 Pin Assignment . 2 4.1 LQFP 44 Pin . 2 4.2 CSP (Chip Size Package) 24 Pins . 3 5 6 4.3 Ordering Information . 4 Pin Description. 4 Interface Control Timing Description . 5 7 8 6.1 UART Interface Control (9600, N, 8, 1) . 5 Pin Option Description . 5 Electrical Characteristic . 6 8.1 8.2 Recommended Operating Conditions . 6 8.3 9 10 Absolute Maximum Ratings. 6 DC Electrical Characteristics. 6 8.4 A/D Conversion . 7 Powerup and Reset Timing . 8 Application Circuit . 9 10.1 UART Interface Application Circuit (with 32.768kHz Crystal) . 9 10.1.1 BOM Table.9 10.2 UART Interface Application Circuit (with 32.768kHz External Clock) . 10 10.2.1 BOM Table.10 11 10.3 Touch Panel and YP, XP, YN, & XN Layout Format. 11 HWRE Software Specification. 12 11.1 HWRE Software Description . 12 11.2 Communication Protocol and Command List . 12 11.2.1 11.2.2 11.2.3 11.2.4 Communication Interface: UART .12 Command Timing Request.12 Commands from Host .13 Responses from ePH1300 .13 11.3 Commands from Host Specifications . 14 11.3.1 11.3.2 11.3.3 11.3.4 11.3.5 11.3.6 Wake up ePH1300 (0x33; 8 Bytes) .14 Set Character Recognition Mode (0x10; 8 Bytes).14 Set Inking Transmit Switch (0x14; 8 Bytes) .16 Set Pen Up (Lifting of Stylus) Waiting Time (0x1A; 8 Bytes).16 Perform Recognition Immediately, Before Timeout (0x1B; 8 Bytes) .17 Host Ready (0x1C; 8 Bytes).17 Product Specification (V2.1) 10.24.2006 · iii Contents 11.3.7 Set Even Numbered Package for Recognizing Characters and to Trigger Wake-up by Tapping Touch Pad (0x1D; 8 Bytes) .18 11.3.8 Pen-up (Lifting of Stylus) Timeout Offset (0x1E; 8 Bytes).18 11.3.9 Access the HWRE Firmware Version (0x40; 8 Bytes) .19 11.3.10 Software Reset (0x42; 8 Bytes) .19 11.3.11 Abort the Current Inking (0x43; 8 Bytes).20 11.3.12 Calibration (0x44; 8 Bytes).20 11.3.13 Set Writing Area Location (0x46; 8 Bytes) .21 11.3.14 Set Recognition Mode / Graphic Mode (0x49; 8 Bytes).21 11.3.15 Set Power Saving Mode (0x4A; 8 Bytes) .22 11.3.16 Rotate Touch Panel (0x4C; 8 Bytes) .22 11.4 Responses from ePH1300 Specifications . 23 11.4.1 11.4.2 11.4.3 11.4.4 11.4.5 11.4.6 11.4.7 12 13 ACK_ERROR (0x00; 8 Bytes).23 Inking (Access to Written Input) Coordinates (0x16; 6 Bytes) .23 Touch Panel Button Coordinates ) .24 Recognized Characters Array .25 Exit from Power Saving Mode (0x33; 8 Bytes) .25 Initial Power On (0x42; 8 Bytes).27 ACK_OK (Carry Out Host Command; 8 Bytes) .27 11.5 Checksum Program. 28 Package LQFP44 LQFP44 . 29 Tape Reel Specification . 30 Specification Revision History Doc. Version 2.0 2.1 iv · Revision Description Date ePH1300 initial specification 2006/03/07 1. Modified the Application Circuit. 2. Removed A/D resolution (0x4B) command. 2006/10/24 Product Specification (V2.1) 10.24.2006 ePH1300 Handwriting Recognition Microcontroller 1 Introduction The ePH1300 chip is an 8-bit RISC architecture microcontroller embedded with a recognition core. When connected to an external resistance type touch panel, the chip becomes suitable for handwriting recognition application products, such as SMS, Stylus Remote Controller, mobile phones, handwriting input device, etc. The ePH1300 has low power consumption, low cost, and yet is capable of providing high performance rate of recognition. These quality features are vital for shorter lead-time in developing new handwriting recognition related products or pressure-sensitive screen input devices. 2 Features Product No. ePH1300 3 Package CSP/ LQFP44 LQFP44 Input Output Interface Remarks Database based on JIS-X0208-1990 JIS-X0208-1990. ePH1300 can recognize 6355 Kanji characters, 83 Hiragana and 86 Katakana characters. 1. Japanese SJIS Standard 2. ASCII Unicode UART 3. Gesture Block Diagram Touch Pad Driver UART Interface TX ePH series Input Area Candidates LCD Panel RX Handwriting Recognition Module Touch Panel-R Type Mobile Phone 9600 baud rate Figure 3-1 ePH1300 Block Diagram Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ·1 ePH1300 Handwriting Recognition Microcontroller 4 Pin Assignment 4.1 LQFP 44 Pin 42 43 44 ePH1300 123 No. Pin Name No. Pin Name No. Pin Name No. Pin Name 1 12 YP 23 CE 34 NC 2 NC 13 XP 24 NC 35 NC 3 HTEST 14 YN (WKO) 25 NC 36 NC 4 PLLC 15 XN 26 NC 37 NC 5 OSCI 16 VREX 27 NC 38 NC 6 OSCO 17 VDD 28 NC 39 NC 7 RESETB 18 STEST 29 NC 40 NC 8 VDDA 19 NC 30 NC 41 NC 9 VSS 20 NC 31 NC 42 NC 10 TX 21 WKI 32 NC 43 NC 11 2· NC RX 22 NC 33 NC 44 NC Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ePH1300 Handwriting Recognition Microcontroller 4.2 CSP (Chip Size Package) 24 Pins Perspective view of the pin location viewed from the top surface of the chip. Accurate package size: (4415±55) µm x (3815±55) µm. Pin A1 1 2 3 4 5 1.875 2.075 0.75 A B 4.5 C D D ia. 0.4 E F 0.3 1.50 1.70 0.60 3.9 0.90 T op V iew (U nit:m m ) Figure 4-1a ePH1300 Pin Location Perspective View from the Top Side Y Coordinate 1.875 1.125 0.375 0.375 1.125 1.875 X Coordinate 0.750 0.000 0.750 1.500 1 A B C D E F 1.500 2 3 4 5 NC NC NC STEST NC CE XP VREX VDD NC WKI VSS RX YP XN NC VDDA OSCO RESETB TX YN (WKO) OSCI PLLC HTEST 5 1 OSCI VDDA VSS XP NC A OSCO RX VREX NC B RESETB YP VDD NC C XN NC STEST D YN (WKO) (This specification is subject to change without further notice) 2 TX Product Specification (V2.1) 10.24.2006 3 HTEST Figure 4-1b ePH1300 Actual Pin Location & Assignment (Viewed from the Bottom) 4 PLLC Pin location and assignment viewed from actual pin (bottom) side of the chip. NC NC E CE F WKI ·3 ePH1300 Handwriting Recognition Microcontroller 4.3 Ordering Information Orderable Part Number ePH1300SHS Tray of 72 CSP ePH1300KSHS ePH1300AQS 5 Package Type Tape reel of 2000 LQFP44 LQFP44 10x10mm Pin Description CSP LQFP44 LQFP44 Name I/O/P Type Description C2 17 VDD P Digital power supply, the range is from 2.8V to 3.6V. Should be connected to VSS through a 0.1µF capacitor. A3 9 VSS P Negative power supply A4 8 VDDA P Analog power supply. The range is from 2.8V to 3.6V. Should be connected to VSS through a 0.1µF capacitor. C4 7 RESETB I System reset input pin with built-in pull up resistor (Typical value = 100K): · "L" : RESET asserted. · "H" : RESET released. C5 3 HTEST I Hardware testing. Normally connected to VSS I Crystal or External Clock Source connector pin: · Crystal: Connect a 32.768 kHz crystal and connect to VSS through a 20pF capacitor · External Clock Source: Connect a 32.768 kHz (±20ppm) clock signal through a 0.1µF capacitor (Clock VPP>0.3VDD) A5 5 OSCI B4 6 OSCO O Crystal or External Clock Source connector pin: · Crystal: Connect a 32.768 kHz crystal and connect to VSS through a 20pF capacitor. · External Clock Source: Keep the pin floating. B5 4 PLLC I PLL capacitor connector pin. Should be connected to VSS through a 0.047µF capacitor. B2 16 VREX I/O F1 23 CE D1 18 STEST I Software testing. Normally floating or connected to VDD. D4 10 TX O UART Interface Tx pin I Internal reference voltage for A/D converter. Should be connected to VSS through a 0.1µF capacitor. "Floating or H": Chip Enable "L": Chip in power down. SPI interface pin will change to High-Z status. B3 11 RX I UART Interface Rx pin C3 12 YP I Touch screen Y direction positive pin A2 13 XP I Touch screen X direction positive pin E4 YN (WKO) O D3 15 XN O Touch screen X direction negative pin F2 4· 14 Touch screen Y direction negative pin. This pin should be connected to input pin of the Host. Such Host input pin must be set as "non-pull-up" resistor type and provides wake-up function. 21 WKI I Wake-up input pin. Host wakes up the ePH1300 from power saving mode through this pin. Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ePH1300 Handwriting Recognition Microcontroller 6 Interface Control Timing Description 6.1 UART Interface Control (9600, N, 8, 1) start bit D0 D1 D2 D3 1 bit D4 D5 D6 8 bits D7 stop bit 1 bit One character frame 7 Pin Option Description CE Pin Option CE CE(floating) Chip Enabled Chip Disabled Chip disable Chip enable Figure 7-1 CE Pin Connection Option Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ·5 ePH1300 Handwriting Recognition Microcontroller 8 Electrical Characteristic 8.1 Absolute Maximum Ratings Items Symbol Supply Voltage Input Voltage (General Input Port) Operating Temperature Range Storage Temperature Range Condition - - - - VDD VIN TOPR TSTR Limits Unit 0.3 to +3.6 0.5 to VDD +0.5 20 to +80 55 to +125 V V o C o C 8.2 Recommended Operating Conditions Items Symbol VDD VDDA VIH VIL Supply Voltage Input Voltage A/D Full-Scale Input Span Operating Temperature Condition - - - Positive input negative input - ADRG TOPR Limits Unit 2.8 to 3.6 2.8 to 3.6 VDD x 0.9 to VDD 0 to VDD x 0.1 V V V 0 to VREX V o 20 to +80 C 8.3 DC Electrical Characteristics (Condition: Ta=25° C, VDD= 3.0 ± 0.3V) Parameter Min Type Max Unit Fmain Main-clock frequency 9.83 MHz Fsub Sub-clock frequency Crystal OSC 32.768 kHz Idd2 Idle mode VDD=3V, Crystal OSC. 5 8 Idd3 Clock Symbol Condition Fast mode VDD=3V, Fmain=9.83MHz, without touch panel load 2000 3000 VDD×0.7 VDD 0 VDD×0.3 0.5×VDD 0.75×VDD 0.2×VDD 0.4×VDD VDD=3V, VOH=2.4V 1.1 2.2 3.3 VDD=3V, VOL=0.2V +1.1 +2.2 +3.3 ±1 µA 25 50 100 K Supply Current Input Voltage Input Threshold Voltage (Schmitt) Output Current Input Leakage Current Touch Panel Pull Down Resistance VIH1 VIL1 VT+ Input pin RESETB pin VT IOH1 IOL1 IIL Output pin ALL Input port (without pull-up/down resistor) Vin=VDD or GND RPD3 DET=1, Xn pin Vin=VDD, VDD=3V µA V V mA Data Retention Voltage 1.6 V Power-on Reset Voltage 6· Vret Vpor 1.4 1.5 1.6 V Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ePH1300 Handwriting Recognition Microcontroller 8.4 A/D Conversion (VDD=3.0V, VDDA=3.0V, Ta=25° C, Fclk=12*Fsample) Parameter Symbol Condition Min Type Max Unit 0.1 1 µA 10 Bits Analog Input Mux Leakage Current Imux On/off leakage current, Vin=0 or VDD System Perfomance Resolution Integral Non-Linearity INL -2 +2 LSB Differential Non-linearity DNL -2 +2 LSB Offset Error OErr -4 +4 LSB Gain Error GErr -4 +4 LSB Missing Code MC Bit VDDA Supply Current Ivdd3 VDD=3.0V, VDDA=3.0V, Fsample=20kHz, ADEN=1, VRS=1 0.5 0.7 mA Ivdd4 ADEN=0, VRS=1 1 uA Driver Current IOH Xp, Yp (VDD= 2.9 ± 0.3V) (Voh=VDD-0.2V) -20 -30 -45 mA Sink Current IOL Xn, Yn (VDD= 2.9 ± 0.3V) (Vol=0.2V) +20 +30 +45 mA Min Type Max Unit VDD=3.0V, VDDA=3.0V 80 VDD=2.4V, VDDA=2.4V 60 8.5 AC Electrical Characteristics (Condition: Ta=25° C, VDD=3.0 ± 0.3V) Parameter Symbol Condition o A/D Conversion (VDD=3.0V, VDDA=3.0V, Ta=25 C) Throughput Rate Power Supply Rejection Ratio PSRR1+ Power noise: 1kHz, 100mV 37 40 PSRR1 Power noise: 1kHz, 100mV 43 46 Signal to Noise Ratio SNR 51 54 Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ksps dB dB ·7 ePH1300 Handwriting Recognition Microcontroller 9 Powerup and Reset Timing VDD RSTB Tpwr OSC Twup1 Twup CPU work Figure 9-1 Powerup and Reset Timing Diagram Symbol Characteristics Min. Type Max. Unit Tpwr 100 226 300 ms Twup CPU warm up time 260 340 550 ms Twup1 8· Oscillator start up time CPU reset time 18 22 44 ms Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ePH1300 Handwriting Recognition Microcontroller 10 Application Circuit 10.1 UART Interface Application Circuit (with 32.768kHz Crystal) VSS C1 DC 2.8 ~ 3.6V 104 20pF VDD C2 A4 C2 A5 B4 B5 C5 C4 20pF OSCI OSCO U2 PLLC ePH1300 HTEST RESETB WKI CE STEST TX RX F2 F1 D1 D4 B3 WKI RX to TX RS232 RS232 interface to host RX TX to RX B2 A3 C3 A2 E4 D3 VREX VSS YP XP YN XN C6 VDD VDDA Q1 32.768KHz RESETB to host GPIO WKO to host input (non-pull-up) XN C3 473 C5 YN XP 104 Touch panel YP Figure 10-1 UART Interface Application Circuit (with Crystal) 10.1.1 BOM Table Component Component P/N Pin Location Packaging Qty MCU ePH1300 U2 CSP 1 Oscillator 32768Hz Crystal Q1 D 1 Capacitor 20pF C2, C6 S 2 Capacitor 0.1µF (104) C1, C4, C5 S 3 Capacitor 0.047µF (473) C3 S 1 Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ·9 ePH1300 Handwriting Recognition Microcontroller 10.2 UART Interface Application Circuit (with 32.768kHz External Clock) 32.768kHz from host VSS C1 DC 2.8 ~ 3.6V 104 VDD VDDA C2 A4 C2 104 VDD OSCI OSCO U2 PLLC ePH1300 HTEST RESETB WKI CE STEST TX RX F2 F1 D1 D4 B3 WKI to TX RX RS232 RS232 interface to host RX TX to RX B2 A3 C3 A2 E4 D3 VREX VSS YP XP YN XN A5 B4 B5 C5 C4 RESETB to host GPIO WKO to host input (non-pull-up) XN C3 473 C5 YN XP 104 Touch panel YP Figure 10-2 UART Interface Application Circuit (with External Clock) 10.2.1 BOM Table Component Component P/N Pin Location Packaging Qty CSP 1 MCU U2 Capacitor 0.1µF (104) C1, C2, C4, C5 S 4 Capacitor 10 · ePH1300 0.047µF (473) C3 S 1 Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ePH1300 Handwriting Recognition Microcontroller 10.3 Touch Panel and YP, XP, YN, & XN Layout Format YU XL YN XR XN XP YD YP 1 2 3 4 Y U, X L , Y D, X R ePH1300 Pin Setting Touch Panel YU 4 3 2 1 XR, YD, XL, YU XN, YN, XP, YP YN XL XN XR XP YD YN YP YD XR XN 1 2 3 4 YU, XL, YD, XR YN, XN, YP, XP YD XN XL XP YP YU XR YN XL YN 1 YU XP 2 XL YN 3 YD XN 4 XR YP YU XP YP XR Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) YU XN YD XP 4 XR YN 3 YD XP 2 XL YP 1 YU XN YP XL · 11 ePH1300 Handwriting Recognition Microcontroller 11 HWRE Software Specification 11.1 HWRE Software Description ePH1300 provides nine free-hand input recognition proficiencies; including Chinese character Set I, Chinese character Set II, etc. You can choose to access the input as you write (inking) with recognized characters feedback, or to access the recognized characters only without accessing the inking (input). ePH1300 transmits both hand-written characters and hand-drawn graphics. Graphics inking are transmitted without recognition. ePH1300 can only transmit data to Host through a defined touch panel button area coordinates (located at a designated area of the touch panel). When you tap and drag on the panel, only the tapping is transmitted. Dragging is ignored. 11.2 Communication Protocol and Command List 11.2.1 Communication Interface: UART UART parameter: baud rate 9600; no parity check; 8 bits data length. 11.2.2 Command Timing Request When Host sends command to ePH1300, the time between two bytes must be less than 2.7ms. Otherwise, the ePH1300 will not accept the command and access the "ACK error" message. 0x50 < 2.7 ms Byte0 Byte1 Byte2 Byte3 Byte4 Byte5 Byte0 Byte7 When Host transmits command to ePH1300, the time between two consecutive commands must be longer than 10 ms. COM0 COM1 > 10 ms 12 · COM2 > 10 ms COM3 > 10 ms Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ePH1300 Handwriting Recognition Microcontroller 11.2.3 Commands from Host (see Section 11.3 for details) Command Command Response Brief Description Response at Tapping* 0x33 Not applicable Not applicable 0x10 Execute the set character recognition mode Instantaneous Instantaneous 0x14 Execute the set inking transmit switch Instantaneous Instantaneous 0x1A Execute the set pen up (next tapping) waiting time Instantaneous As soon as pen is up 0x1B Recognition before timeout Instantaneous As soon as pen is up 0x1C Host Ready Instantaneous Instantaneous 0x1D Convert recognition & "tap to wake-up" data into even numbered package Instantaneous Instantaneous 0x1E Pen up timeout offset (shorten timeout) Instantaneous As soon as pen is up 0x40 Get handwriting firmware version Instantaneous Instantaneous 0x42 Software reset Instantaneous Instantaneous 0x43 Abort the current inking Instantaneous Instantaneous 0x44 Calibration Instantaneous Instantaneous 0x46 Set writing area location Instantaneous Instantaneous 0x49 Set Recognition / Graphic mode Instantaneous Instantaneous 0x4A Set power saving mode Instantaneous Instantaneous 0x4C * Wake-up ePH1300 Rotate touch panel Instantaneous Instantaneous 1. Shows which command takes effect immediately when the host sends command to ePH1300 with the pen tapped and held on touch panel. 2. If there is inadequate time to receive the host command, ePH1300 will initially access the "ACK error" message and wait for the host to send the correct command within 1.5 sec. After receiving a valid command or 1.5 sec timeout, the ePH1300 continues to execute the original program. 11.2.4 Responses from ePH1300 (see Section 11.4 for details) Command Description 0x00 Ack error 0x16 Inking (written input) coordinates 0x17 Touch panel button area coordinates 0x18 Recognized characters array 0x33 Exit from power saving mode 0x42 Initial power ON Host command dependent Ack OK Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) · 13 ePH1300 Handwriting Recognition Microcontroller 11.3 Commands from Host Specifications 11.3.1 Wake up ePH1300 (0x33; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x33 2 Parameter length 1 HEX 0x04 Stuff 4 HEX 0x00; 0x00; 0x00; 0x00 Checksum 1 HEX 0xC7 3-6 7 Description: Host can use this command to wake up ePH1300. Example: Command / Response Command wakeup Host ePH1300 50 33 04 00 00 00 00 C7 - - 50 33 04 FF FF FF FF 19 Command wakeup response 11.3.2 Set Character Recognition Mode (0x10; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x10 2 Parameter length 1 HEX 0x04 3-4 Parameter 2 HEX User define 5-6 Stuff 2 HEX 0xFF; 0xFF Checksum 1 HEX 7 - Description: Set recognition type. Recognition Type Definition: Total 10 bits (Default value: 0x3F01) Byte 3 Bit No. Recognition Type Description Recognition Type Setting 0 0x0001 1 Set Chinese character Set II 0x0002 2 Set capital letter 0x0004 3 Set numeral 0x0008 4 Set symbol 0x0010 5 Set default gesture 0x0020 6 Set hiragana 0x0040 7 14 · Set Chinese character Set I Set katakana 0x0080 Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ePH1300 Handwriting Recognition Microcontroller Byte 4 Bit No. Recognition Type Description Recognition Type Setting 8 Set small letter 0x0100 9 Not defined - Stroke (Gesture) Definition: Default Stroke Description Default Stroke Setting BackSpace 0x0008 Return/Enter 0x000D Delete 0x0010 SPACE 0x0020 The following graphs show the default writing stroke. Dot on each stroke shows where to begin. Then lift the pen (stylus) at the end of the stroke. You only need to lightly tap and drag on the touch panel. Backspace (0x0008) Return/Enter (0x000D) Delete (0x0010) Space (0x0020) Example: Command / Response Host ePH1300 COM (set recognition type) 50 10 04 FF 01 FF FF 19 - ACK (set recognition type) - 50 10 04 FF FF FF FF 59 Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) · 15 ePH1300 Handwriting Recognition Microcontroller 11.3.3 Set Inking Transmit Switch (0x14; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x14 2 Parameter length 1 HEX 0x04 3 User defined 1 HEX On :0x01/Off: 0x00 Stuff 3 HEX 0xFF; 0xFF; 0xFF Checksum 1 HEX 4-6 7 - Description: Select whether to transmit or not the inking (written input). Default is to transmit (ON). During Graphic mode, inking transmit switch OFF command is ignored, but is carried out once you enter Recognition mode. Examples: 1. Transmit inking coordinates (0x14) Command / Response Host ePH1300 COM (Set inking transmit) 50 14 04 01 FF FF FF 3A - ACK (Set inking transmit) - 50 14 04 FF FF FF FF FD Host ePH1300 2. Do not transmit inking coordinates (0x14) Command / Response COM (Do not transmit inking) ACK (Do not transmit inking) 50 14 04 00 FF FF FF 2C - - 50 14 04 FF FF FF FF FD 11.3.4 Set Pen Up (Lifting of Stylus) Waiting Time (0x1A; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x1A 2 Parameter length 1 HEX 0x04 3 User defined 1 HEX Stuff 3 HEX Checksum 1 HEX 4-6 7 - 0xFF; 0xFF; 0xFF - Description: Set pen up (lifting of stylus) waiting time. Pen-up Waiting Time Setting: 1. ePH1300 divides the pen up time into 10 steps. 1~10 are valid values, other values represent infinite waiting. Default is 600 ms. 2. Every step increases by an increment of about 200ms. 1 represents 1x200 ms, and 10 represent 10x200 ms. If infinite pen up time is used, ePH1300 must initially receive the "Recognizing immediately (0x1B)" command before executing character recognition. 16 · Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ePH1300 Handwriting Recognition Microcontroller Example: Command / Response Host ePH1300 COM (set pen up waiting time) 50 1A 04 03 FF FF FF AF - ACK (set pen up waiting time) - 50 1A 04 FF FF FF FF 44 11.3.5 Perform Recognition Immediately, i.e., Before Timeout (0x1B; 8 Bytes)s Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x1B 2 Parameter length 1 HEX 0x04 Stuff 4 HEX 0xFF; 0xFF; 0xFF; 0xFF Checksum 1 HEX 0x6D 3-6 7 Description: Proceed to character recognition immediately. Example: Command / Response Host ePH1300 50 1B 04 FF FF FF FF 6D - ACK (can not recognize immediately) - COM (recognize emmediately) - ACK (can Recognize immediately) 50 1B 04 00 00 00 00 B3 50 1B 04 FF FF FF FF 6D 11.3.6 Host Ready (0x1C; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x1C 2 Parameter length 1 HEX 0x04 Stuff 4 HEX 0xFF; 0xFF; 0xFF; 0xFF Checksum 1 HEX 0xB2 3-6 7 Description: With this command, the Host notifies ePH1300, "I am ready." You can then start transmitting data after wake-up occurs (by tapping touch pad). Example: Same as Section 11.4.5, Exit from Power Saving Mode. Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) · 17 ePH1300 Handwriting Recognition Microcontroller 11.3.7 Set Even Numbered Package for Recognizing Characters and to Trigger Wake-up by Tapping Touch Pad (0x1D; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x1D 2 Parameter length 1 HEX 0x04 3 User defined 7 1 HEX OFF:0x00/ON:0x01 Stuff 3 HEX 0xFF; 0xFF; 0xFF Checksum 4-6 1 HEX - Description: This command defines the data format (even numbered) for recognizing characters and for responding to touch pad tapping to wake-up ePH1300 (Add 0x00). Example: Command / Response Host ePH1300 COM (even package) 50 1D 04 01 FF FF FF 5C - ACK (even package) - 50 1D 04 FF FF FF FF 9B 11.3.8 Pen-up (Lifting of Stylus) Timeout Offset (0x1E; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x1E 2 Parameter length 1 HEX 0x04 3 User defined 1 HEX ON:0x01/OFF:0x00 Stuff 3 HEX 0xFF; 0xFF; 0xFF Checksum 1 HEX 4-6 7 - Description: This command subtracts 100ms from original setup pen up time. Examples: Original pen-up time =200ms Command / Response Host ePH1300 COM(Pen-up time 200ms) 50 1A 04 01 FF FF FF 83 - ACK (Pen-up time 200ms) 50 1A 04 FF FF FF FF 44 - COM (Pen-up timeout offset) 50 1E 04 01 FF FF FF 27 - - 50 1E 04 FF FF FF FF E0 ACK (Pen-up timeout offset) 200-100=100ms 18 · Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ePH1300 Handwriting Recognition Microcontroller Original Pen-up time =400ms Command / Response Host ePH1300 COM (Pen-up time 400ms) 50 1A 04 02 FF FF FF B9 - ACK (Pen-up time 400ms) 50 1A 04 FF FF FF FF 44 - COM (Pen-up timeout offset) 50 1E 04 01 FF FF FF 27 - - 50 1E 04 FF FF FF FF E0 ACK (Pen-up timeout offset) 400-100=300ms 11.3.9 Access the HWRE Firmware Version (0x40; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x40 2 Parameter length 1 HEX 0x04 Stuff 4 HEX 0xFF; 0xFF; 0xFF; 0xFF Checksum 1 HEX 0xB1 3-6 7 Description: Access the Handwriting Recognition firmware version. Example: Command / Response Host ePH1300 COM (access firmware version) 50 40 04 FF FF FF FF B1 - 50 40 04 02 30 69 25 11 - ACK (access firmware version) = = = (V2.30 2006/9/25) 11.3.10 Software Reset (0x42; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x42 2 Parameter length 1 HEX 0x04 Stuff 4 HEX 0xFF; 0xFF; 0xFF; 0xFF 7 Checksum 1 HEX 0xE3 0 Header 1 HEX 0x50 3-6 Description: Host can use this command to reset the ePH1300. The ePH1300 will reset to initial power on when this command is executed and all settings will return to its default values. Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) · 19 ePH1300 Handwriting Recognition Microcontroller Example: Command / Response Host ePH1300 COM (software reset) 50 42 04 FF FF FF FF E3 - ACK (software reset) - 50 42 04 FF FF FF FF E3 COM (initial power on) - 50 42 04 00 00 00 00 3D 11.3.11 Abort the Current Inking (0x43; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x43 2 Parameter length 1 HEX 0x04 Stuff 4 HEX 0xFF; 0xFF; 0xFF; 0xFF Checksum 1 HEX 0xCA 3-6 7 Description: Clear the current inking. Example: Command / Response Host ePH1300 COM (clear current inking) 50 43 04 FF FF FF FF CA - ACK (clear current inking) - 50 43 04 FF FF FF FF CA 11.3.12 Calibration (0x44; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x44 2 Parameter length 1 HEX 0x04 Stuff 4 HEX 0xFF; 0xFF; 0xFF; 0xFF; Checksum 1 HEX 0x15 3-6 7 Description: Use this command to demand for ePH1300 calibration. ePH1300 cannot determine whether the executed calibration command is successful or not. The Host should accommodate this function. Example: Command / Response ePH1300 COM (calibration) 50 44 04 FF FF FF FF 15 - ACK (calibration) - 50 44 04 FF FF FF FF 15 COM (calibrate: top- left) - 50 44 04 25 36 FF FF F3 COM (calibrate: bottom- right) 20 · Host - 50 44 04 FF FF D7 CE 84 Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ePH1300 Handwriting Recognition Microcontroller 11.3.13 Set Writing Area Location (0x46; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x46 2 Parameter length 1 HEX 0x04 3 Top-left X coordinate 1 HEX 0x00-0xFE 4 Top-left Y coordinate 1 HEX 0x00-0xFE 5 Bottom-right X coordinate 1 HEX 0x00-0xFE 6 Bottom-right Y coordinate 1 HEX 0x00-0xFE 7 Checksum 1 HEX - Description: Set the desired location of the writing area. Example: Command / Response Host ePH1300 COM (set writing area location) 50 46 04 10 10 F0 F0 96 - ACK (set writing area location) - 50 46 04 FF FF FF FF 47 11.3.14 Set Recognition Mode / Graphic Mode (0x49; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x49 2 Parameter length 1 HEX 0x04 3 User defined 1 HEX Recognition: 0x00 / Graphic: 0x01 Stuff 3 HEX 0xFF; 0xFF; 0xFF Checksum 1 HEX 4-6 7 - Description: Default is Recognition mode. Graphic mode transmission coordinates are similar to Recognition mode except recognition is not processed under Graphic mode. Example: 1. Recognition Mode: Command / Response Host ePH1300 COM (set recognition mode) 50 49 04 00 FF FF FF 06 - ACK (set recognition mode) - 50 49 04 FF FF FF FF D7 Host ePH1300 COM (set Graphic Mode) 50 49 04 01 FF FF FF 10 - ACK (set Graphic Mode) - 50 49 04 FF FF FF FF D7 2. Graphic Mode (0x49): Command / Response Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) · 21 ePH1300 Handwriting Recognition Microcontroller 11.3.15 Set Power Saving Mode (0x4A; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x4A 2 Parameter length 1 HEX 0x04 3 User defined 1 HEX Enable "Tap to wake-up": 0x01 Disable "Tap to wake-up": 0x00 4 User defined 1 HEX Idle time for idle mode to take effect: 1~20 Stuff 2 HEX 0xFF; 0xFF 5-6 Description: 1. Byte 3 represents the tap to wake-up switch 0x01 Enable "Tap to wake-up" function 0x00 Disable "Tap to wake-up" function 2. Byte 4 represents the idle (no input) time before power saving mode takes effect. ePH1300 divides the time into 20 steps; i.e., 1~20 (valid values) Any other value above 20 is considered as "20." Every step increases by about 15 seconds. "1" represents 1x15 seconds and 20 represent 20x15 seconds. "0" value (default) is used to prevent ePH1300 from entering into power saving mode. 3. To instantly enter into power saving mode, add "0x80" to the defined idle time. Note that the instant power saving mode works only once and the defined idle time takes over. Example: Command / Response Host ePH1300 - COM (set power saving mode) 50 4A 04 01 02 FF FF 96 - ACK (set power saving mode) 11.3.16 50 4A 04 FF FF FF FF AC Rotate Touch Panel (0x4C; 8 Bytes) Bytes Function Length Data Format 1 HEX Remarks 0 Header 1 Command 1 HEX 0x4C 2 Parameter length 1 HEX 0x04 3 User defined 1 HEX Stuff 3 HEX Checksum 1 HEX 4~6 7 0x50 - 0xFF; 0xFF; 0xFF - Description: Exchange touch panel X/Y axis. 22 · Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ePH1300 Handwriting Recognition Microcontroller Byte 3 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 0 - - - 0 0 0 0 Bit 6=1 represents XN/YN exchange, XP/YP exchange Bit 5=1 represents XN/XP exchange, Y direction fixed Bit 4=1 represents YN/YP exchange, X direction fixed Bit 7, Bits 0~3 must be fixed to 0. Example: Command / Response Host ePH1300 COM (rotate touch panel) 50 4C 04 70 FF FF FF B9 - ACK (rotate touch panel) - 50 4C 04 FF FF FF FF 5A 11.4 Responses from ePH1300 Specifications 11.4.1 ACK_ERROR (0x00; 8 Bytes) Bytes Function Length Data format Remark 0 Header 1 HEX 0x50 1 Command 1 HEX 0x00 2 Parameter length 1 HEX 0x04 Stuff 4 HEX 0x00; 0x00; 0x00; 0x00; Checksum 1 HEX 0x19 3-6 7 Description: If Host sends an invalid command, ePH1300 will respond "ACK ERROR" to Host. Example: Command / Response Host ePH1300 Response (ACK error) - 50 00 04 00 00 00 00 19 11.4.2 Inking (Access to Written Input) Coordinates (0x16; 6 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x16 2 Parameter length 1 HEX 0x02 3 X coordinate 1 HEX 0x00-0xFE 4 Y coordinate 1 HEX 0x00-0xFE 5 Checksum 1 HEX Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) - · 23 ePH1300 Handwriting Recognition Microcontroller Description: Normal inking: when the stylus taps the touch panel, the coordinate is transmitted. Stroke over: when the stylus leaves the touch panel, "0xFF, 0xFF" is transmitted. Word over: when a word is completed, "0xFF, 0x00" is transmitted. Example: 50 50 16 50 50 16 02 62 8C 9F 50 16 50 50 50 4E 16 16 02 16 16 02 55 8D A4 50 16 02 16 16 18 3D ePH1300 Inking Response 02 60 60 ED 02 65 61 AB 50 16 02 6A 61 68 50 6F 60 2E 50 16 02 74 5F 53 02 FF FF 1B 02 40 8D CE 50 16 02 45 8F 81 50 4A 8F 42 50 16 02 4F 8F 03 50 16 8E D1 50 16 02 5C 8E 6C 50 16 02 4A 50 16 02 67 8D 0B 50 16 02 6F 50 16 02 74 8B 71 50 16 02 79 8A 16 02 7E 8A F4 50 16 02 83 89 00 02 89 89 82 50 16 02 8E 88 EE 50 93 87 7D 50 16 02 98 86 ED 02 FF FF 1B 02 FF 00 E8 15 0A 8C 4E A0 4E AB 51 35 6C 09 00 3A 00 3B 00 69 00 21 00 F9 Desciption =>Normal inking =>Stroke over =>Stroke over =>Word over 11.4.3 Touch Panel Button Coordinates (0x17; 6 Bytes; 0XFF is Pen-up Signal) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x17 2 Parameter length 1 HEX 0x02 3 X coordinate 1 HEX 0x00-0xFE; 0xFF 4 Y coordinate 1 HEX 0x00-0xFE; 0xFF 5 Checksum 1 HEX - Description: The default values of the touch panel writing area are (0x10, 0x10) and (0xF0, 0xF0). The ePH1300 will transmit the coordinates through the touch panel button area (0x17) if the tapping occurs outside the writing area. Example: Command / Response ePH1300 Response (touch panel button) 24 · Host - 50 17 02 01 01 3B Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ePH1300 Handwriting Recognition Microcontroller 11.4.4 Recognized Characters Array (0x18; Maximum 25 Bytes; Minimum 6 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x18 2 Parameter length 1 HEX - 3 Max. qty. of characters 1 HEX - 4 Characters (low byte) 1 HEX - 5 Characters (high byte) 1 HEX - . - - - - 1 HEX - N Checksum Description: Recognized characters array package. No character will utilize 6 bytes. Example: Command / Response Host ePH1300 Response (characters) - 50 18 03 01 08 00 3A 11.4.5 Exit from Power Saving Mode (0x33; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x33 2 Parameter length 1 HEX 0x04 Stuff 4 HEX 0xFF; 0xFF; 0xFF; 0xFF Checksum 1 HEX 0x19 3-6 7 Description: A. Wake-up Conditions When ePH1300 enters power saving mode, ePH1300 will wake-up when one of the following conditions occurs: 1. Touch panel wake-up ("tap to wakeup"): Tap the touch panel & ePH1300 wakes-up and sends 1 byte (0x00) to Host. Host must respond "Host ready" within 7.5 sec, else ePH1300 will enter power saving mode again. Note the ePH1300 must have the tap-to-wakeup function enabled in order to perform this function. Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) · 25 ePH1300 Handwriting Recognition Microcontroller Example: Command / Response Host ePH1300 Touch panel wakeup response - 00 Com (Host ready) 50 1C 04 FF FF FF FF B2 - ACK (Host ready) - 50 1C 04 FF FF FF FF B2 Response - 50 33 04 FF FF FF FF 19 2. Command wake-up: Host executes command "50 33 04 00 00 00 00 C7" to wakeup ePH1300. Example: Command / Response Command wakeup Command wakeup response Host ePH1300 50 33 04 00 00 00 00 C7 - - 50 33 04 FF FF FF FF 19 B. ePH1300 Wake-up Response Signal Details 380µs 6.4ms 420µs The above waveform illustrates the characteristics of the signal which ePH1300 sends to Host after it wakes up from Idle mode. This signal is compose of 8 clocks with total width of 6.4ms and is applicable only under "Tap to wakeup" condition. 26 · Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) ePH1300 Handwriting Recognition Microcontroller 11.4.6 Initial Power-on (0x42; 8 Bytes) Bytes Length Data Format 0 Header 1 HEX 0x50 1 Command 1 HEX 0x42 2 Parameter length 1 HEX 0x04 Stuff 4 HEX 0x00; 0x00; 0x00; 0x00; Checksum 1 HEX 0x3D 3-6 7 Function Remarks Description: When ePH1300 is powered on, it will send "Initial power on" response to Host. Example: Command / Response Host ePH1300 Response (initial power on) - 50 42 04 00 00 00 00 3D 11.4.7 ACK_OK (Carry Out Host Command; 8 Bytes) Bytes Function Length Data Format Remark 0 Header 1 HEX 1 Follow Host command 1 HEX 2 Parameter length 1 HEX 0x04 Stuff 4 HEX 0xFF, 0xFF, 0xFF, 0xFF Checksum 1 HEX - 3-6 7 0x50 - Description: After executing Host command, ePH1300 response with an ACK OK format which corresponds to the given command. Example: Refer to each command sample provided in this specification. Product Specification (V2.1) 10.24.2006 (This specification is subject to change without further notice) · 27 ePH1300 Handwriting Recognition Microcontroller 11.5 Checksum Program Reference : www.6502.org: Source: CRC Calculations CRC-8 8bits checksum table const BYTE CRCTable[256]={ , , , , , , , , , , , , , , , , , , , , , 0xFA,0xFD,0xF4,0xF3}; Code to produce and verify checksum : unsigned char Generate CRC(unsigned char *Packet, int size) { int i; unsigned char value; value=0; for(i=0;i