NEW DATABASE - 350 MILLION DATASHEETS FROM 8500 MANUFACTURERS
1005B GB2312 - Datasheet Archive
Handwriting Recognition Microcontroller Product Specification DOC. VERSION 2.1 ELAN MICROELECTRONICS CORP. February 2006
ePH1101 Handwriting Recognition Microcontroller Product Specification DOC. VERSION 2.1 ELAN MICROELECTRONICS CORP. February 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 The contents of this specification are subject to change without further 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 for 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 from 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 EXPRESSED 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. Elan Information Technology Group (U.S.A) Rm. 1005B 1005B, 10/F Empire Centre 68 Mody Road, Tsimshatsui Kowloon , HONG KONG Tel: +852 2723-3376 Fax: +852 2723-7780 elanhk@emc.com.hk 1821 Saratoga Ave., Suite 250 Saratoga, CA 95070 USA Tel: +1 408 366-8225 Fax: +1 408 366-8220 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 Contents Contents 1 Introduction . 1 2 Features . 1 3 Block Diagram . 1 4 Pin Assignment . 2 4.1 CSP (Chip Size Package) 24 Pins . 2 4.2 Ordering Information . 3 5 Pin Description. 3 6 Interface Control Timing Description . 4 6.1 SPI Interface Diagram . 4 7 Pin Option Description . 5 8 Electrical Characteristic . 5 8.1 Absolute Maximum Ratings. 5 8.2 Recommended Operating Conditions . 5 8.3 DC Electrical Characteristics. 5 8.4 A/D Conversion . 6 8.5 AC Electrical Characteristics . 7 9 Powerup and Reset Timing . 7 10 Application Circuit . 8 10.1 SPI Interface Application Circuit (with 32.768kHz Crystal) . 8 10.2 SPI Interface Application Circuit (with 32.768kHz External Clock) . 9 10.3 Touch Panel and YP, XP, YN and XN Layout Format . 10 11 HWRE Software Specification. 11 11.1 HWRE Software Description . 11 11.2 Communication Protocol and Command List . 11 11.2.1 11.2.2 11.2.3 11.2.4 Communication Interface: SPI . 11 Command Timing Request. 11 Commands from Host . 12 Responses from ePH1101 . 12 Product Specification (V2.1) 02.17.2006 · iii Contents 11.3 Commands from Host Specifications . 13 11.3.1 Wake-up function of the ePH1101 (8 Bytes) .13 11.3.2 Set Character Recognition Mode (0×10; 8 Bytes) . 13 11.3.3 Set Inking Transmit Switch (0×14; 8 Bytes) . 15 11.3.4 Set Pen-up (Lifting of Stylus) Waiting Time (0×1A; 8 Bytes) . 15 11.3.5 Perform Recognition Immediately, i.e., Before Time-out (0×1B; 8 Bytes). 16 11.3.6 Host Ready (0×1C; 8 Bytes). 16 11.3.7 Pen-up (Lifting of Stylus) Time-out Offset (0×1E; 8 Bytes) . 17 11.3.8 Access the HWRE Firmware Version (0×40; 8 Bytes) . 17 11.3.9 Output with Different Code Table (0×41; 8 Bytes). 18 11.3.10 Software Reset (0×42; 8 Bytes) . 19 11.3.11 Abort the Current Inking (0×43; 8 Bytes). 19 11.3.12 Calibration (0×44; 8 Bytes). 20 11.3.13 Set Writing Area Location (0×46; 8 Bytes) . 20 11.3.14 Set Recognition Mode/Graphic Mode (0×49; 8 Bytes). 21 11.3.15 Set Power Saving Mode (0×4A; 8 Bytes). 21 11.3.16 Set A/D Resolution (0×4B; 8 Bytes) . 22 11.3.17 Rotate Touch Panel (0×4C; 8 Bytes) . 22 11.3.18 Output PROM/DROM Checksum (0×F0; 8 Bytes) . 23 11.4 Responses from ePH1101 Specifications . 23 11.4.1 ACK_ERROR (0×00; 8 Bytes) . 23 11.4.2 Inking (Access to Written Input) Coordinates (0×16; 6 Bytes) . 24 11.4.3 Touch Panel Button Coordinates (0×17; 6 Bytes; 0×FF is Pen-up Signal) . 24 11.4.4 Recognized Characters Array (0×18; Maximum 26 Bytes; Minimum 6 Bytes). 25 11.4.5 Exit from Power Saving Mode (0×33; 8 Bytes) . 25 11.4.6 11.4.7 Initial Power-on (0×42; 8 Bytes) . 26 ACK_OK (Carry Out Host Command; 8 Bytes). 26 11.5 Checksum Program. 27 12 iv · Tape Reel Specification . 28 Product Specification (V2.1) 02.17.2006 Contents Specification Revision History Doc. Version Revision Description Date 2.0 ePH1101 Initial Specification 2005/06/10 2.1 Added accurate CSP size and modified the CSP tape reel spec. 2006/02/17 Product Specification (V2.1) 02.17.2006 ·v Contents vi · Product Specification (V2.1) 02.17.2006 ePH1101 Handwriting Recognition Microcontroller 1 Introduction The ePH1101 chip is an 8 bit RISC microcontroller embedded with a recognition core. When connected to an external resistance type touch panel, the IC becomes suitable for handwriting recognition application products, such as SMS, Stylus Remote Controller, mobile phones, handwriting input devices, etc. The ePH1101 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 development of new handwriting recognition related products or pressure-sensitive screen input devices. 2 Features Product No. Package Input Output Interface Remarks What you input (Traditional or 1. Traditional Chinese 2. Simplified Chinese ePH1101 CSP Simplified Chinese) is what you get as output. 3. ASCII Unicode SPI Can recognize 13,053 (Big 5) 4. Gesture Traditional Chinese characters, 5. Hiragana/Katakana and 6,763 (GB2312 GB2312) Simplified Chinese characters. 3 Block Diagram Touch Pad Driver Touch Panel-R Type Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) SPI Interface ePH 1101 Handwriting Recognition Module Input Area Candidates LCD Panel SCK SDI SDO Mobile Phone 2.45M baud rate ·1 ePH1101 Handwriting Recognition Microcontroller 4 Pin Assignment 4.1 CSP (Chip Size Package) 24 Pins Perspective view of the pin locations viewed from the top surface of the chip. Accurate package size: (4415±55) µm x (3815±55) µm. Pin A1 T o p V ie w (U n it: m m ) 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 .5 0 1 .7 0 0 .6 0 3 .9 0 .9 0 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 SCK NC STEST SMODE CE XP VREX VDD SDO COM (WKI) VSS RX YP XN SDI VDDA OSCO RESETB TX YN (WKO) OSCI PLLC HTEST 5 Pin location and assignment viewed from the actual pin (bottom) side of the chip. 4 3 2 1 OSCI VDDA VSS XP NC A PLLC OSCO RX VREX SCK B HTEST RESETB YP VDD NC C TX XN SDO STEST D YN (WKO) SDI SMODE E CE F COM (WKI) 2· Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) ePH1101 Handwriting Recognition Microcontroller 4.2 Ordering Information Orderable Part Number Package Type ePH1101SH ePH1101KSH 5 Tray of 72 CSP Tape reel of 2000 Pin Description CSP Name I/O/P Type Description C2 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 VSS P Negative power supply A4 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 RESETB I System reset input pin with built-in pull up resistor (typical value = 100K): · "L" : RESET asserted · "H" : RESET released C5 HTEST I Hardware testing. Normally connected to VSS A5 OSCI I Crystal or External Clock Source connector pin: · Crystal: Connect a 32.768kHz crystal and connect to VSS through a 20pF capacitor · External Clock Source: Connect a 32.768kHz (±20ppm) clock signal through a 0.1µF capacitor (Clock VPP>0.3VDD) B4 OSCO O Crystal or External Clock Source connector pin: · Crystal: Connect a 32.768kHz crystal and connect to VSS through a 20pF capacitor · External Clock Source: Keep the pin floating B5 PLLC I PLL capacitor connector pin. Should be connected to VSS through a 0.047µF capacitor. B2 VREX I/O Internal reference voltage for the A/D converter. Should be connected to VSS through a 0.1µF capacitor. F1 CE I "Floating or H" : Chip Enable "L" : Chip in power down. SPI interface pin will change to High-Z status. E1 SMODE I Interface selection (it is recommended to keep this pin low): "Floating or H" : UART interface "L" : SPI interface D1 STEST I Software testing. Normally floating or connected to VDD. D4 TX O UART Interface Tx pin B3 RX I UART Interface Rx pin C3 YP I Touch screen Y direction positive pin A2 XP I Touch screen X direction positive pin E4 YN (WKO) O 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. D3 XN O Touch screen X direction negative pin Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) ·3 ePH1101 Handwriting Recognition Microcontroller CSP Name I/O/P Type Description B1 SCK O Serial clock output D2 SDO O Serial data output E3 6 SDI I Serial data input F2 COM WKI I Host command pin Wake-up input pin (active low level 1.2 ms or more). Host wakes up the ePH1101 from power saving mode through this pin. Interface Control Timing Description 6.1 SPI Interface Diagram ePH1101 t r ans m s s i on i SCK( f al l i ng edge) f r om ePH1101 SDO( M SB f i r s t ) SDI ( M SB f i r s t ) H I GH -Z BIT7 BIT7 BIT6 BIT5 BIT6 BIT4 BIT5 BIT3 BIT4 BIT2 BIT3 BIT1 BIT2 H I GH -Z B IT0 BIT1 H I GH -Z BIT0 CE COM W ) ( KI Hos t t r ans m s s i on i SCK( f al l i ng edge) f r om ePH1101 SDO( M SB f i r s t ) SDI ( M SB f i r s t ) BIT7 BI T7 BIT6 BIT6 BIT5 BIT5 BIT4 BIT4 BIT3 BIT3 BIT2 BIT2 BIT1 BIT1 BIT0 BIT0 CE COM W ) ( KI 4· Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) ePH1101 Handwriting Recognition Microcontroller 7 Pin Option Description CE Pin Option CE Chip 8 CE(floating) disable Chip enable 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 Condition VDD VDDA VIH VIL Supply Voltage Input Voltage A/D Full-Scale Input Span ADRG Operating Temperature Limits Unit 2.8 to 3.6 2.8 to 3.6 VDD x 0.9 to VDD 0 to VDD x 0.1 Positive input Negative input TOPR 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 Symbol Condition Min Type Max Unit Fmain 9.83 MHz Fsub Sub-clock frequency Crystal OSC 32.768 kHz Idd2 IDLE mode VDD=3V, Crystal OSC. 5 8 Idd3 CLOCK Main-clock frequency 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 Supply Current Input Voltage Input Threshold Voltage (Schmitt) VIH1 VIL1 VT+ VT Input pin RESETB pin Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) µA V V ·5 ePH1101 Handwriting Recognition Microcontroller Parameter Output Current Symbol IOH1 IOL1 Input Leakage Current Touch Panel Pull Down Resistance Condition Output pin Min Type Max 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 ALL Input port (without pull up/down resistor) IIL Unit mA Vin=VDD or GND DET=1, Xn pin RPD3 Vin=VDD, VDD=3V Data Retention Voltage Vret 1.6 V Power on Reset Voltage Vpor 1.4 1.5 1.6 V 8.4 A/D Conversion (Condition: VDD=3.0V, VDDA=3.0V, Ta=25°C, Fclk=12*Fsample) Parameter Symbol Condition Min Type Max Unit On/off leakage current, Vin=0 or VDD 0.1 1 µA 10 - Bits Analog Input Mux Leakage Current Imux System Perfomance Resolution Integral Non-Linearity 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 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 µA Driver Current IOH Xp,Yp (VDD= 2.9 ± 0.3V) (Voh=VDD-0.2V) 20 30 45 mA Sink Current 6· INL IOL Xn,Yn (VDD= 2.9 ± 0.3V)(Vol=0.2V) +20 +30 +45 mA Bit Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) ePH1101 Handwriting Recognition Microcontroller 8.5 AC Electrical Characteristics (Condition: Ta=25°C, VDD= 3.0 ± 0.3V) Parameter Symbol Condition Min Type Max VDD=3.0V, VDDA=3.0V 80 VDD=2.4V, VDDA=2.4V 60 PSRR1+ Power noise: 1kHz, 100mV 37 40 PSRR1 Power noise: 1kHz, 100mV 43 46 51 54 Unit A/D Conversion (VDD=3.0V, VDDA=3.0V, Ta=-10~+60 oC) Throughput Rate Power Supply Rejection Ratio Signal to Noise Ratio 9 SNR ksps dB dB Powerup and Reset Timing VDD RSTB Tpwr OSC Twup1 Twup CPU work Symbol Characteristics Min. Type Max. Unit Tpwr Oscillator start up time 100 226 300 ms Twup CPU warm up time 260 340 550 ms Twup1 CPU reset time 18 22 44 ms Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) ·7 ePH1101 Handwriting Recognition Microcontroller 10 Application Circuit 10.1 SPI Interface Application Circuit (with 32.768kHz Crystal) VSS C1 DC 2.8 ~ 3.6V 104 VDD B1 D2 E3 VDD VDDA Q1 32.768kHz A5 B4 B5 C5 C4 COM(WKI) OSCI CE SMODE OSCO U2 PLLC STEST ePH1101 HTEST TX RX RESETB COM(WKI) 1. Host command pin 2. Host wake up ePH1101 pin SCK SPI interface SDO to Host SDI F2 F1 E1 D1 D4 B3 VREX VSS YP XP YN XN C6 20pF SCK SDO SDI C2 A4 C2 20pF B2 A3 C3 A2 E4 D3 C3 473 WKO Wake up Host XN C4 104 C5 YN Touch XP panel 104 YP 10.1.1 BOM Table Component Component P/N Pin Location Packaging Qty. MCU 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 8· ePH1101 0.047µF (473) C3 S 1 Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) ePH1101 Handwriting Recognition Microcontroller 10.2 SPI Interface Application Circuit (with 32.768kHz External Clock) 32.768kHz From Host VSS C1 DC 2.8 ~ 3.6V B1 D2 E3 VDD VDDA C2 104 COM(WKI) OSCI CE OSCO SMODE U2 PLLC STEST ePH1101 HTEST TX RESETB RX COM(WKI) 1. Host command pin 2. Host wake up ePH1101 pin SCK SPI interface SDO to Host SDI F2 F1 E1 D1 D4 B3 VREX VSS YP XP YN XN A5 B4 B5 C5 C4 VDD SCK SDO SDI C2 A4 104 B2 A3 C3 A2 E4 D3 C3 WKO Wake up Host XN C4 473 104 C5 YN Touch XP panel 104 YP 10.2.1 BOM Table Component Component P/N Pin Location Packaging Qty. CSP 1 MCU ePH1101 U2 Capacitor 0.1µF (104) C1, C2, C4, C5 S 4 Capacitor 0.047µF (473) C3 S 1 Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) ·9 ePH1101 Handwriting Recognition Microcontroller 10.3 Touch Panel and YP, XP, YN and XN Layout Format YU YP XL XR XN XP YD YN 1 2 3 4 Y U, X L , Y D, X R ePH1101 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 YP YU XR YN XL YN 1 YU XP 2 XL YN 3 YD XN 4 XR YP 10 · YD XN YP XR XL XP YU XP YU XN YD XP 4 XR YN 3 YD XP 2 XL YP 1 YU XN YP XL Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) ePH1101 Handwriting Recognition Microcontroller 11 HWRE Software Specification 11.1 HWRE Software Description The ePH1101 provides nine free-hand input recognition proficiencies; including Chinese Character Set I (for both Traditional & Simplified Chinese), Chinese Character Set II (for both Traditional & Simplified Chinese), 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). The ePH1101 transmits both hand-written characters and hand-drawn graphics. Graphics inking are transmitted without recognition. The ePH1101 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: SPI SPI parameter: bit rate 2.45MHz; MSB first; 16 bits data length; falling edge latch data; Master mode 11.2.2 Command Timing Request Before the Host sends command to the ePH1101, the COM (WKI) pin must be kept at a low level for at least 1.2 ms. When the Host transmits command to the ePH1101, the time between two consecutive commands must be longer than 150 µs. COM0 COM1 > 150 us Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) COM2 > 150 us COM3 > 150 us · 11 ePH1101 Handwriting Recognition Microcontroller 11.2.3 Commands from Host (See Section 11.3 for details) Command Brief Description Any command Wake-up ePH1101 0x10 Execute the set character recognition mode 0x14 Execute the set inking transmit switch 0x1A Execute the set pen-up (next tapping) waiting time 0x1B Recognition before timeout 0x1C Host Ready 0x1E Pen-up time-out offset (shorten timeout) 0x40 Get handwriting firmware version 0x41 Output with different code table 0x42 Software reset 0x43 Abort the current inking 0x44 Calibration 0x46 Set writing area location 0x49 Set Recognition/Graphic mode 0x4A Set power saving mode 0x4B Set A/D resolution 0x4C Rotate touch panel 0xF0 Output PROM/DROM checksum 11.2.4 Responses from ePH1101 (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 12 · Ack OK Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) ePH1101 Handwriting Recognition Microcontroller 11.3 Commands from Host Specifications 11.3.1 Wake-up Function of the ePH1101 (8 Bytes) Length Data Format Header 1 HEX 0x50 User defined 6 HEX Any command Checksum 1 HEX Bytes 0 1-6 7 Function Remarks - Description: Any command can wake up the ePH1101 when COM (WKI) pin low level is detected. After the ePH1101 wakes up, it executes the command immediately. Example: Command / Response Host ePH1101 50 10 04 FF 01 FF FF 19 - Command wake-up response - 50 10 04 FF FF FF FF 59 Command wake-up response - 50 33 04 FF FF FF FF 19 Command wake-up 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 defined 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 Set Chinese Character Set I 0x0100 1 Set Chinese Character Set II 0x0200 2 Set Capital Letter 0x0400 3 Set Numeral 0x0800 4 Set Symbol 0x1000 5 Set Default Gesture 0x2000 6 Set Hiragana 0x4000 7 Set Katakana 0x8000 Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) · 13 ePH1101 Handwriting Recognition Microcontroller Byte 4 Bit No. Recognition Type Description Recognition Type Setting 8 Set small letter 0x0001 9 "Pu-Fu-Mo-Fo" Traditional Chinese Phonetics 0x0002 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 ePH1101 COM (set recognition type) 50 10 04 FF 01 FF FF 19 - ACK (set recognition type) 14 · Host - 50 10 04 FF FF FF FF 59 Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) ePH1101 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 the inking (written input) or not. 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 ePH1101 COM (set inking transmit) 50 14 04 01 FF FF FF 3A - ACK (set inking transmit) - 50 14 04 FF FF FF FF FD Command / Response Host ePH1101 COM (do not transmit inking) 50 14 04 00 FF FF FF 2C - ACK (do not transmit inking) - 50 14 04 FF FF FF FF FD 2. Do not transmit inking coordinates (0x14) 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. The ePH1101 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, ePH1101 must initially receive the "Recognizing immediately (0x1B)" command before executing character recognition. Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) · 15 ePH1101 Handwriting Recognition Microcontroller Example: Command / Response Host ePH1101 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 Time-out (0x1B; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x1B 2 Parameter length HEX 0x04 4 HEX 0xFF; 0xFF; 0xFF; 0xFF Checksum 7 1 Stuff 3-6 1 HEX 0x6D Description: Proceed to character recognition immediately. Example: Command / Response Host 50 1B 04 FF FF FF FF 6D COM (recognize immediately) ePH1101 - ACK (cannot recognize immediately) - 50 1B 04 00 00 00 00 B3 ACK (can recognize immediately) - 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 3-6 7 Parameter length 1 HEX 0x04 Stuff 4 HEX 0xFF; 0xFF; 0xFF; 0xFF Checksum 1 HEX 0xB2 Description: With this command, the Host notifies the ePH1101 with "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. 16 · Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) ePH1101 Handwriting Recognition Microcontroller 11.3.7 Pen-up (Lifting of Stylus) Time-out 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 the original setup pen-up time. Examples: Original Pen-up Time = 200ms Command / Response Host ePH1101 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 time-out offset) 50 1E 04 01 FF FF FF 27 - - 50 1E 04 FF FF FF FF E0 Host ePH1101 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 time-out offset) 50 1E 04 01 FF FF FF 27 - - 50 1E 04 FF FF FF FF E0 ACK (Pen-up time-out offset) 200-100=100ms Original Pen-up Time = 400ms Command / Response ACK (Pen-up time-out offset) 400-100=300ms 11.3.8 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. Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) · 17 ePH1101 Handwriting Recognition Microcontroller Example: Command / Response Host ePH1101 COM (access firmware version) 50 40 04 FF FF FF FF B1 - ACK (access firmware version) - 50 40 04 02 23 51 11 D3 = = = = (V2.21 2005/1/11) 11.3.9 Output with Different Code Table (0x41; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0x41 2 Parameter length 1 HEX 0x04 0x00: Traditional/Simplified combo 3 User defined 1 HEX 0x01: Traditional only 0x02: Simplified only 4-6 7 Stuff 3 HEX 0xFF; 0xFF; 0xFF Checksum 1 HEX - Description: ePH1101 offers three code tables for selection. 0~2 are valid values. Any other invalid values are regarded as default value "0." The difference between the three code tables are as listed below. "0" : Default code table; Traditional/Simplified Chinese combo (Traditional in Traditional out; Simplified in Simplified out) write "" recognized as "" (0x534e) write "" recognized as "" (0x83ef) "1" : Traditional Chinese only (Traditional or Simplified in always Traditional out) write "" recognized as "" (0x83ef) write "" recognized as "" (0x83ef) "2" : Simplified Chinese only (Traditional or Simplified in always Simplified out) write "" recognized as "" (0x534e) write "" recognized as "" (0x534e) Example: Command / Response ePH1101 COM (output with different code table) 50 41 04 02 FF FF FF 65 - ACK (output with different code table) 18 · Host - 50 41 04 FF FF FF FF 98 Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) ePH1101 Handwriting Recognition Microcontroller 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 Checksum 1 HEX 0xE3 3-6 7 Description: Host can use this command to reset the ePH1101. The ePH1101 will then reset to initial power on when this command is executed and all settings will return to its default values. Example: Command / Response Host ePH1101 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 ePH1101 COM (clear current inking) 50 43 04 FF FF FF FF CA - ACK (clear current inking) - 50 43 04 FF FF FF FF CA Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) · 19 ePH1101 Handwriting Recognition Microcontroller 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 require for an ePH1101 calibration. The ePH1101 cannot determine whether the executed calibration command is successful or not. The Host should accommodate this function. Example: Command / Response Host ePH1101 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) - 50 44 04 FF FF D7 CE 84 11.3.13 Set Writing Area Location (0x46; 8 Bytes) Bytes Function Length Data Format 1 HEX Remarks 0 Header 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 0x00-0xFE 6 Bottom-right Y-coordinate 1 HEX 7 Checksum 1 0x50 HEX - Description: Set the desired location of the writing area. Example: Command / Response Host ePH1101 COM (set writing area location) 20 · 50 46 04 10 10 F0 F0 96 - ACK (set writing area location) - 50 46 04 FF FF FF FF 47 Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) ePH1101 Handwriting Recognition Microcontroller 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 4-6 7 User defined 1 HEX Recognition: 0x00 / Graphic: 0x01 Stuff 3 HEX 0xFF; 0xFF; 0xFF Checksum 1 HEX - Description: Default is Recognition mode. Graphic mode transmission coordinates are similar to Recognition mode except that recognition is not processed under Graphic mode. Example: 1. Recognition Mode: Host ePH1101 COM (set recognition mode) Command / Response 50 49 04 00 FF FF FF 06 - ACK (set recognition mode) - 50 49 04 FF FF FF FF D7 Host ePH1101 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 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 Checksum 1 HEX 5-6 7 - 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. The ePH1101 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. A "0" value (default) is used to prevent the ePH1101 from entering into power saving mode. Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) · 21 ePH1101 Handwriting Recognition Microcontroller 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 ePH1101 COM (set power saving mode) 50 4A 04 01 02 FF FF 96 - ACK (set power saving mode) - 50 4A 04 FF FF FF FF AC 11.3.16 Set A/D Resolution (0x4B; 8 Bytes) Bytes Function Length Data Format 0 1 2 Header Command Parameter length 1 1 1 HEX HEX HEX 3 User defined 1 HEX Stuff Checksum 3 1 HEX HEX 4~6 7 Remarks 0x50 0x4B 0x04 A/D 8 bit resolution : 0x01 A/D 10 bit resolution : 0x00 0xFF; 0xFF; 0xFF - Description: ePH1101 supports two A/D resolutions: 8 bit or 10 bit (default is 8-bit). Example: Command / Response Host ePH1101 COM (set A/D resolution:8 bit) 50 4B 04 01 FF FF FF 42 - COM (set A/D resolution:10 bit) 50 4B 04 00 FF FF FF 54 - - 50 4B 04 FF FF FF FF 85 ACK (set A/D resolution) 11.3.17 Rotate Touch Panel (0x4C; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 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 - 0xFF; 0xFF; 0xFF - Description: Exchange touch panel X/Y axis. 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 22 · Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) ePH1101 Handwriting Recognition Microcontroller Example: Command / Response Host ePH1101 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.3.18 Output PROM/DROM Checksum (0xF0; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0x50 1 Command 1 HEX 0XF0 2 Parameter length 1 HEX 0x04 Stuff 4 HEX 0xFF; 0xFF; 0xFF; 0xFF Checksum 1 HEX 0xF8 3~6 7 Description: ePH1101 can output PROM/DROM checksum through this command. Example: Host ePH1101 COM (output PROM/DROM checksum) Command / Response 50 F0 04 FF FF FF FF F8 - ACK (output PROM/DROM checksum) - 50 F0 04 FF FF FF FF F8 PROM checksum - 50 F0 04 07 3A 05 1A 25 = = = = DROM checksum - 50 F0 04 E5 3E 5E 40 DC = = = = 11.4 Responses From ePH1101 Specifications 11.4.1 ACK_ERROR (0x00; 8 Bytes) Bytes Length Data Format 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 Function Remark Description: If Host sends an invalid command, ePH1101 will respond "ACK ERROR" to Host. Example: Command / Response Host ePH1101 Response (ACK error) - 50 00 04 00 00 00 00 19 Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) · 23 ePH1101 Handwriting Recognition Microcontroller 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 - 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 ePH1101 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 ePH1101 will transmit coordinates through the touch panel button area (0x17) if the tapping occurs outside the writing area. 24 · Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) ePH1101 Handwriting Recognition Microcontroller Example: Command / Response Host ePH1101 Response (touch panel button) - 50 17 02 01 01 3B 11.4.4 Recognized Characters Array (0x18; Maximum 26 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 ePH1101 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: When ePH1101 enters power saving mode, ePH1101 will wake-up when one of the following conditions occurs: 1. Touch panel wake-up ("tap to wake-up"): Tap the touch panel & ePH1101 wakes-up and sends "50 1F 02 00 00 99" to Host. Host must respond "Host ready" within 7.5 sec, else ePH1101 will enter power saving mode again. Note that ePH1101 must have the tap-to-wakeup function enabled in order to perform this function. Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) · 25 ePH1101 Handwriting Recognition Microcontroller Example: Command / Response Host ePH1101 Touch panel wake-up response - 50 1F 02 00 00 99 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: Example: Host executes any command to wake up the ePH1101. Command / Response ACK OK ePH1101 Any command - Depends on the command Command wake-up Host - - 50 33 04 FF FF FF FF 19 Command wake-up response 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 ePH1101 is powered on, it will send "Initial power-on" response to Host. Example: Command / Response Host ePH1101 Response (initial power on) - 50 42 04 00 00 00 00 3D 11.4.7 ACK_OK (Carry Out Host Command; 8 Bytes) Bytes 0 Function Header Length Data Format 1 HEX Remark 0x50 - 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 Description: After executing Host command, ePH1101 response with an ACK OK format which corresponds to the given command. Example: Refer to each command sample provided in this specification. 26 · Product Specification (V2.1) 02.17.2006 (This specification is subject to change without further notice) ePH1101 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 GenerateCRC(unsigned char *Packet, int size) { int i; unsigned char value; value=0; for(i=0;i