ePH1100 Handwriting Recognition Microcontroller Product Specification DOC. VERSION 2.4 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, 10/F Empire Centre 68 Mody Road, Tsimshatsui Kowloon , HONG KONG Tel: +852 2723-3376 Fax: +852 2723-7780 [email protected] 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 LQFP 44 Pin ....................................................................................................... 2 4.2 CSP (Chip Size Package) 24 Pin ....................................................................... 3 4.3 Ordering Information .......................................................................................... 4 5 Pin Description.......................................................................................................... 4 6 Interface Control Timing Description ...................................................................... 5 6.1 UART Interface Control (9600, N, 8, 1) .............................................................. 5 7 Pin Option Description ............................................................................................. 5 8 Electrical Characteristic ........................................................................................... 6 8.1 Absolute Maximum Ratings................................................................................ 6 8.2 Recommended Operating Conditions ................................................................ 6 8.3 DC Electrical Characteristics (Condition: Ta=25°C, VDD= 3.0 ± 0.3V) ............. 6 8.4 A/D Conversion (VDD=3.0V, VDDA=3.0V, Ta=25°C, Fclk=12*Fsample) .......... 7 8.5 AC Electrical Characteristics (Condition: Ta=25°C, VDD=3.0 ± 0.3V)............... 7 9 Power–up and Reset Timing .................................................................................... 8 10 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 10.3 Touch Panel and YP, XP, YN, and XN Layout Format...................................... 11 11 HWRE Software Specification................................................................................ 12 11.1 HWRE Software Description ............................................................................ 12 11.2 Communication Protocol and Command List ................................................... 12 11.2.1 Communication Interface: UART ......................................................................12 11.2.2 Command Timing Request................................................................................12 11.2.3 Command s from Host ......................................................................................13 11.2.4 Responses from ePH1100 ................................................................................13 Product Specification (V2.4) 02.16.2006 • iii Contents 11.3 Commands from Host Specifications................................................................ 14 11.3.1 Wake-up ePH1100 (0×33; 8 Bytes)...................................................................14 11.3.2 Set Character Recognition Mode (0×10; 8 Bytes) ............................................14 11.3.3 Set Inking Transmit Switch (0×14; 8 Bytes) ......................................................16 11.3.4 11.3.5 Set Pen-up (Lifting of Stylus) Waiting Time (0×1A; 8 Bytes) .............................16 Perform Recognition Immediately, i.e., Before Timeout (0x1B; 8 Bytes) ..........17 11.3.6 11.3.7 Host Ready (0×1C; 8 Bytes) .............................................................................17 Set Even Numbered Package for Recognizing Characters and to Trigger Wake-up by Tapping the Touch Pad (0×1D; 8 Bytes) .......................18 11.3.8 Pen-up (Lifting of Stylus) Time-out Offset (0×1E; 8 Bytes) ...............................18 11.3.9 Access the HWRE Firmware Version (0×40; 8 Bytes) ......................................19 11.3.10 Output with Different Code Table (0×41; 8 Bytes).............................................19 11.3.11 Software Reset (0×42; 8 Bytes) ........................................................................20 11.3.12 Abort the Current Inking (0×43; 8 Bytes)...........................................................21 11.3.13 Calibration (0×44; 8 Bytes)................................................................................21 11.3.14 Set Writing Area Location (0×46; 8 Bytes) ........................................................22 11.3.15 Set Recognition Mode/Graphic Mode (0×49; 8 Bytes)......................................22 11.3.16 Set Power Saving Mode (0×4A; 8 Bytes)..........................................................23 11.3.17 Set A/D Resolution (0×4B; 8 Bytes) ..................................................................23 11.3.18 Rotate Touch Panel (0×4C; 8 Bytes) .................................................................24 11.4 Responses from ePH1100 Specifications......................................................... 24 11.4.1 ACK_ERROR (0×00; 8 Bytes) ..........................................................................24 11.4.2 Inking (Access to Written Input) Coordinates (0×16; 6 Bytes) .........................25 11.4.3 Touch Panel Button Coordinates (0×17; 6 Bytes; 0×FF is Pen-up Signal) ......26 11.4.4 Recognized Characters Array (0×18; Maximum 25 Bytes; Minimum 6 Bytes) 26 11.4.5 Exit from Power Saving Mode (0×33; 8 Bytes) .................................................27 11.4.6 11.4.7 Initial Power On (0×42; 8 Bytes) .......................................................................29 ACK_OK (Carry Out Host Command; 8 Bytes) ................................................29 11.5 Checksum Program.......................................................................................... 30 12 Package LQFP44 ..................................................................................................... 31 13 Tape Reel Specification .......................................................................................... 32 iv • Product Specification (V2.4) 02.16.2006 Contents Specification Revision History Doc. Version Revision Description Date 2.0 ePH1100 initial specification 2005/03/11 2.1 Added new info and waveform diagram on ePH1100 response signal 2005/03/21 2.2 Added new commands on the “A/D Resolution” & Touch Panel Rotation” 2005/06/07 2.3 Modifed the Application Circuits 2005/10/14 2.4 Added accurate CSP size and modifed the CSP tape reel spec. 2006/02/16 Product Specification (V2.4) 02.16.2006 •v Contents vi • Product Specification (V2.4) 02.16.2006 ePH1100 Handwriting Recognition Microcontroller 1 Introduction The ePH1100 chip is an 8 bit RISC microcontroller embedded with 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 ePH1100 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. Package Input Output Interface Remarks What you input (Traditional or ePH1100 CSP/ LQFP44 1. Traditional Chinese Simplified Chinese) is what you 2. Simplified Chinese get as output. 3. ASCII Unicode UART Can recognize 13,053 (Big 5) 4. Gesture Traditional Chinese characters, 5. Hiragana / Katakana and 6,763 (GB2312) Simplified Chinese characters. 3 Block Diagram 義 義必又入火 義 Touch Pad Driver Touch Panel-R Type Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) UART Interface ePH series TX Input Area Candidates LCD Panel RX Handwriting Recognition Module Mobile Phone 9600 baud rate •1 ePH1100 Handwriting Recognition Microcontroller 4 Pin Assignment 4.1 LQFP 44 Pin 42 43 44 ePH1100 123 No. 2• Pin Name No. Pin Name No. Pin Name No. Pin Name 1 NC 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 RX 22 NC 33 NC 44 NC Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) ePH1100 Handwriting Recognition Microcontroller 4.2 CSP (Chip Size Package) 24 Pin Perspective view of the pin locations viewed from the top surface of the chip. Accurate package size: (4415 ± 55) µm × (3815 ± 55) µm. Pin A1 Top View (U nit: 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.50 1.70 0.60 3.9 0.90 Perspective View from the Top Side X Coordinate –1.500 –0.750 0.000 0.750 1.500 1 2 3 4 5 A NC XP VSS VDDA OSCI 1.125 B NC VREX RX OSCO PLLC 0.375 C NC VDD YP RESETB HTEST –0.375 D STEST NC XN TX – –1.125 E NC – NC YN (WKO) – –1.875 F CE WKI – – – Y Coordinate 1.875 Pin location and assignment viewed from the actual pin (bottom) side of the chip. 5 4 3 2 1 OSCI VDDA VSS XP NC A PLLC OSCO RX VREX NC B HTEST RESETB YP VDD NC C TX XN NC STEST D YN (WKO) NC NC E CE F WKI Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) •3 ePH1100 Handwriting Recognition Microcontroller 4.3 Ordering Information Orderable Part Number Package Type ePH1100SH ePH1100KSH ePH1100AQ 5 Tray of 72 CSP Tape reel of 2000 LQFP44 10x10mm Pin Description CSP LQFP44 Name I/O/P Type Description C2 17 VDD P Digital power supply, ranging 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, ranging 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Ω). Should be connected to one GPIO pin. C5 3 HTEST I Hardware testing. Normally connected to VSS A5 5 OSCI 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) 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 I “Floating”: Chip Enable. “L”: Chip power down. UART interface pin will change to High-Z status. D1 18 STEST I Software testing. Normally floating or connected to VDD. D4 10 TX O UART Interface Tx pin B3 11 RX I UART Interface Rx pin C3 12 YP I Touch screen Y direction positive pin Internal reference voltage for A/D converter. Should be connected to VSS through a 0.1µF capacitor. A2 13 XP I Touch screen X direction positive pin E4 14 YN (WKO) O Touch screen Y direction negative pin. This pin should be connected to an input pin of the Host. Such Host input pin must be set as “non-pull-up” resistor type and provides a wake-up function. D3 15 XN O Touch screen X direction negative pin F2 21 WKI I Wake-up input pin. Host wakes up the ePH1100 from power saving mode through this pin. 4• Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) ePH1100 Handwriting Recognition Microcontroller 6 Interface Control Timing Description 6.1 UART Interface Control (9600, N, 8, 1) start bit D0 D1 D2 1 bit D3 D4 D5 D6 D7 8 bits stop bit 1 bit One character frame 7 Pin Option Description z CE Pin Option CE Chip Disabled Chip disable CE(floating) Chip Enabled Chip enable z RESETB Pin Timing Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) •5 ePH1100 Handwriting Recognition Microcontroller Electrical Characteristic 8 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 Limits VDD VDDA VIH VIL Supply Voltage Input Voltage A/D Full-Scale Input Span 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 ADRG Operating Temperature Unit 0 to VREX TOPR V V V V o –20 to +80 C 8.3 DC Electrical Characteristics (Condition: Ta=25° C, VDD= 3.0 ± 0.3V) Parameter CLOCK Symbol Condition Output Current Input Leakage Current Touch Panel Pull Down Resistance Max Unit Main-clock frequency – 9.83 – MHz Fsub Sub-clock frequency X'tal OSC – 32.768 – KHz Idd2 IDLE mode VDD=3V, X'tal OSC. – 5 8 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Ω Idd3 Input Threshold Voltage (Schmitt) Type Fmain Supply Current Input Voltage Min VIH1 VIL1 VT+ VT– IOH1 IOL1 IIL RPD3 Input pin RESETB pin Output pin ALL Input port (without pull up/down resistor) Vin=VDD or GND DET=1, Xn pin Vin=VDD, VDD=3V µA V V mA Data Retention Voltage Vret 1.6 – – V Power on Reset Voltage Vpor 1.4 1.5 1.6 V 6• Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) ePH1100 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 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 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 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 Unit Bit 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 o A/D Conversion (VDD=3.0V, VDDA=3.0V, Ta=-10~+60 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.4) 02.16.2006 (This specification is subject to change without further notice) ksps dB dB •7 ePH1100 Handwriting Recognition Microcontroller 9 Power–up and Reset Timing VDD RSTB Tpwr OSC Twup1 Twup CPU work Symbol 8• 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.4) 02.16.2006 (This specification is subject to change without further notice) ePH1100 Handwriting Recognition Microcontroller 10 Application Circuit 10.1 UART Interface Application Circuit (with 32.768kHz Crystal) VSS C1 DC 2.8 ~ 3.6V 104 VDD C2 A4 C2 20pF VDD VDDA Q1 32.768KHz A5 B4 B5 C5 C4 OSCI OSCO U2 PLLC ePH1100 HTEST RESETB STEST TX RX F2 F1 D1 D4 B3 WKI RX to TX RS232 interface to host RX TX to RX B2 A3 C3 A2 E4 D3 VREX VSS YP XP YN XN C6 20pF WKI CE RESETB to host GPIO WKO to host input (non-pull-up) XN C3 473 C5 YN Touch XP panel 104 YP 10.1.1 BOM Table Component Component P/N Pin Location Packaging Qty MCU ePH1100 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.4) 02.16.2006 (This specification is subject to change without further notice) •9 ePH1100 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 ePH1100 HTEST RESETB WKI CE STEST TX RX F2 F1 D1 D4 B3 WKI RX to TX 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 Touch XP panel 104 YP 10.2.1 BOM Table Component 10 • Component P/N Pin Location Packaging Qty CSP 1 MCU ePH1100 U2 Capacitor 0.1µF (104) C1, C2, C4, C5 S 4 Capacitor 0.047µF (473) C3 S 1 Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) ePH1100 Handwriting Recognition Microcontroller 10.3 Touch Panel and YP, XP, YN, & XN Layout Format YU YP XL 義 XR XN XP YD YN 1 2 3 4 Y U, X L , Y D, X R ePH1100 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 YD XN 義 XL XP YU XP YP XR Product Specification (V2.4) 02.16.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 ePH1100 Handwriting Recognition Microcontroller 11 HWRE Software Specification 11.1 HWRE Software Description The ePH1100 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 access the recognized characters only without accessing the inking (input). The ePH1100 transmits both hand-written characters and hand-drawn graphics. Graphics inking are transmitted without recognition. The ePH1100 can only transmit data to the 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 the Host sends command to the ePH1100, the time between two bytes must be less than 2.7ms. Otherwise, the ePH1100 will not accept the command and accesses the “ACK error” message. 0x50 < 2.7 ms Byte0 Byte1 Byte2 Byte3 Byte4 Byte5 Byte0 Byte7 When the Host transmits command to the ePH1100, 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.4) 02.16.2006 (This specification is subject to change without further notice) ePH1100 Handwriting Recognition Microcontroller 11.2.3 Commands from Host (see Section 11.3 for details) Command * Brief Description Command Response Response at Tapping* 0x33 Wake-up ePH1100 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 0x41 Output with different code table 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 0x4B Set A/D resolution Instantaneous Instantaneous 0x4C Rotate touch panel Instantaneous Instantaneous 1. Shows which command takes effect immediately when Host sends command to ePH1100 with the pen tapped and held on touch panel. 2. If there is inadequate time to receive the Host command, ePH1100 will initially access the “ACK error” message and wait for the Host to send the correct command within 1.5 sec. After receiving valid command or 1.5 sec timeout, ePH1100 continues to execute the original program. 11.2.4 Responses from ePH1100 (see Section 11.4 for details) Command 0×00 0×16 0×17 0×18 0×33 0×42 Host command dependent Description Ack error Inking (written input) coordinates Touch panel button area coordinates Recognized characters array Exit from power saving mode Initial power ON Ack OK Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) • 13 ePH1100 Handwriting Recognition Microcontroller 11.3 Commands from Host Specifications 11.3.1 Wake-up ePH1100 (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 0×00; 0×00; 0×00; 0×00 Checksum 1 HEX 0xC7 3-6 7 Description: Host can use this command to wake up ePH1100. Note that this command is applicable only when ePH1100 is in idle mode and it cannot ACK any response when in FAST mode. Example: Command / Response Command wake-up Host ePH1100 50 33 04 00 00 00 00 C7 Command wake-up response 50 33 04 FF FF FF FF 19 11.3.2 Set Character Recognition Mode (0x10; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0×50 1 Command 1 HEX 0×10 2 Parameter length 1 HEX 0×04 3-4 Parameter 2 HEX User define 5-6 Stuff 2 HEX 0×FF; 0×FF Checksum 1 HEX 7 Description: Set recognition type Recognition Type Definition: Total 10 bits (Default value: 0×3F01) Byte 3 Bit No. 14 • Recognition Type Description Recognition Type Setting 0 Set Chinese character Set I 0×0100 1 Set Chinese character Set II 0×0200 2 Set capital letter 0×0400 3 Set numeral 0×0800 4 Set symbol 0×1000 5 Set default gesture 0×2000 6 Set hiragana 0×4000 7 Set katakana 0×8000 Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) ePH1100 Handwriting Recognition Microcontroller Byte 4 Bit No. Recognition Type Description Recognition Type Setting 8 Set small letter 0×0001 9 “Pu-Fu-Mo-Fo” Traditional Chinese phonetics 0×0002 Stroke (Gesture) Definition: Default Stroke Description Default Stroke Setting BackSpace 0×0008 Return/Enter 0×000D Delete 0×0010 SPACE 0×0020 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 (0×0008) Return/Enter (0×000D) Delete (0×0010) Space (0×0020) Example: Command / Response Host COM (set recognition type) 50 10 04 FF 01 FF FF 19 ACK (set recognition type) Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) ePH1100 50 10 04 FF FF FF FF 59 • 15 ePH1100 Handwriting Recognition Microcontroller 11.3.3 Set Inking Transmit Switch (0x14; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0×50 1 Command 1 HEX 0×14 2 Parameter length 1 HEX 0×04 3 User defined 1 HEX On :0×01/Off: 0×00 Stuff 3 HEX 0×FF; 0×FF; 0×FF 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 (0×14) Command / Response Host COM (Set inking transmit) 50 14 04 01 FF FF FF 3A ePH1100 ACK (Set inking transmit) 50 14 04 FF FF FF FF FD 2. Do not transmit inking coordinates (0×14) Command / Response Host ePH1100 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 11.3.4 Set Pen Up (Lifting of Stylus) Waiting Time (0x1A; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0×50 1 Command 1 HEX 0×1A 2 Parameter length 1 HEX 0×04 3 User defined 1 HEX Stuff 3 HEX Checksum 1 HEX 4-6 7 0×FF; 0×FF; 0×FF Description: Set pen up (lifting of stylus) waiting time. Pen Up Waiting Time Setting: 1. The ePH1100 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 200ms. 1 represents 1x200 ms, and 10 represent 10x200 ms. If infinite pen up time is used, ePH1100 must initially receive the “Recognizing immediately (0x1B)” command before executing character recognition. 16 • Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) ePH1100 Handwriting Recognition Microcontroller Example: Command / Response Host ePH1100 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 0×50 1 Command 1 HEX 0×1B 2 3-6 7 Parameter length 1 HEX 0×04 Stuff 4 HEX 0×FF; 0×FF; 0×FF; 0×FF Checksum 1 HEX 0×6D Description: Proceed to character recognition immediately. Example: Command / Response Host COM (recognize emmediately) ePH1100 50 1B 04 FF FF FF FF 6D ACK (can not 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 0×50 1 Command 1 HEX 0×1C 2 Parameter length 1 HEX 0×04 Stuff 4 HEX 0×FF; 0×FF; 0×FF; 0×FF Checksum 1 HEX 0×B2 3-6 7 Description: With this command, the Host notifies the ePH1100, “I am ready.” You can then start transmitting data after wake-up occurs (by tapping the touch pad). Example: The same as in Section 11.4.5, Exit from Power Saving Mode. Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) • 17 ePH1100 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 0×50 1 Command 1 HEX 0×1D 2 Parameter length 1 HEX 0×04 3 4-6 7 User defined 1 HEX Off: 0×00 / On: 0×01 Stuff 3 HEX 0×FF; 0×FF; 0×FF Checksum 1 HEX Description: This command defines the data format (even numbered) for recognizing characters and for responding to touch pad tapping to wake-up ePH1100 (Add 0×00). Example: Command / Response Host ePH1100 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) Time-out Offset (0x1E; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0×50 1 Command 1 HEX 0×1E 2 Parameter length 1 HEX 0×04 3 User defined 1 HEX On: 0×01 / Off: 0×00 Stuff 3 HEX 0×FF; 0×FF; 0×FF 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 ePH1100 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.4) 02.16.2006 (This specification is subject to change without further notice) ePH1100 Handwriting Recognition Microcontroller Original Pen-up Time = 400ms Command / Response Host ePH1100 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) 400-100=300ms 11.3.9 Access the HWRE Firmware Version (0x40; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0×50 1 Command 1 HEX 0×40 2 Parameter length 1 HEX 0×04 Stuff 4 HEX 0×FF; 0×FF; 0×FF; 0×FF Checksum 1 HEX 0×B1 3-6 7 Description: Access the Handwriting Recognition firmware version. Example: Command / Response Host ePH1100 COM (access firmware version) 50 40 04 FF FF FF FF B1 50 40 04 02 23 51 11 D3 == == == == ACK (access firmware version) (V2.21 : 2005/1/11) 11.3.10 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 3 User defined 1 HEX 0×00:Traditional / Simplified combo 0×01:Traditional only 0×02:Simplified only 4-6 7 Stuff 3 HEX Checksum 1 HEX Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) 0×FF; 0×FF; 0×FF • 19 ePH1100 Handwriting Recognition Microcontroller Description: ePH1100 offers three code tables for your 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 ”华” (0×534e) write ”華” → recognized as ”華” (0×83ef) “1” : Traditional Chinese only (Traditional or Simplified in – always Traditional out) write ”华” → recognized as ”華” (0×83ef) write ”華” → recognized as ”華” (0×83ef) “2” : Simplified Chinese only (Traditional or Simplified in – always Simplified out) write ”华” → recognized as ”华” (0×534e) write ”華” → recognized as ”华” (0×534e) Example: Command / Response Host ePH1100 COM (output with different code table) 50 41 04 02 FF FF FF 65 − ACK (output with different code table) − 50 41 04 FF FF FF FF 98 11.3.11 Software Reset (0x42; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0×50 1 Command 1 HEX 0×42 2 Parameter length 1 HEX 0×04 Stuff 4 HEX 0×FF; 0xFF; 0×FF; 0×FF Checksum 1 HEX 0×E3 3-6 7 Description: Host can use this command to reset the ePH1100. The ePH1100 will reset to initial power on when this command is executed and all settings will return to its default values. Example: Command / Response COM (software reset) 20 • Host ePH1100 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 Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) ePH1100 Handwriting Recognition Microcontroller 11.3.12 Abort the Current Inking (0x43; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0×50 1 Command 1 HEX 0×43 2 Parameter length 1 HEX 0×04 Stuff 4 HEX 0×FF; 0×FF; 0×FF; 0×FF Checksum 1 HEX 0×CA 3-6 7 Description: Clear the current inking. Example: Command / Response Host ePH1100 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.13 Calibration (0x44; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0×50 1 Command 1 HEX 0×44 2 Parameter length 1 HEX 0×04 Stuff 4 HEX 0×FF; 0×FF; 0×FF; 0×FF; Checksum 1 HEX 0×15 3-6 7 Description: Use this command to request for ePH1100 calibration. The ePH1100 cannot determine whether the executed calibration command is successful or not. The Host should accommodate this function. Example: Command / Response Host ePH1100 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 Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) • 21 ePH1100 Handwriting Recognition Microcontroller 11.3.14 Set Writing Area Location (0x46; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0×50 1 Command 1 HEX 0×46 2 Parameter length 1 HEX 0×04 3 Top-left X coordinate 1 HEX 0×00—0×FE 4 Top-left Y coordinate 1 HEX 0v00—0×FE 5 Bottom-right X coordinate 1 HEX 0×00—0×FE 6 Bottom-right Y coordinate 1 HEX 0×00—0×FE 7 Checksum 1 HEX Description: Set the desired location of the writing area. Example: Command / Response COM (set writing area location) Host ePH1100 50 46 04 10 10 F0 F0 96 ACK (set writing area location) 50 46 04 FF FF FF FF 47 11.3.15 Set Recognition Mode / Graphic Mode (0x49; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0×50 1 Command 1 HEX 0×49 2 Parameter length 1 HEX 0×04 3 User defined 1 HEX Recognition:0x00 / Graphic:0×01 Stuff 3 HEX 0×FF; 0×FF; 0×FF 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 ePH1100 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 ePH1100 2. Graphic Mode (0x49): Command / Response 22 • COM (set Graphic Mode) 50 49 04 01 FF FF FF 10 − ACK (set Graphic Mode) − 50 49 04 FF FF FF FF D7 Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) ePH1100 Handwriting Recognition Microcontroller 11.3.16 Set Power Saving Mode (0x4A; 8 Bytes) Bytes Function Length Data Format Remarks 0 1 2 Header Command Parameter length 1 1 1 HEX HEX HEX 3 User defined 1 HEX 4 User defined 1 HEX Stuff Checksum 2 HEX 0×50 0×4A 0×04 Enable “Tap to wake-up”: 0×01 Disable “Tap to wake-up”: 0×00 Idle time for idle mode to take effect: 1~20 0×FF; 0×FF 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 ePH1100 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 1×15 seconds and 20 represent 20×15 seconds. “0” value (default) is used to prevent ePH1100 from entering into power saving mode. 3. To instantly enter into power saving mode, add “0×80” 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 ePH1100 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.17 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 0×50 0×4B 0×04 A/D 8 bit resolution : 0×01 A/D 10 bit resolution : 0×00 0×FF; 0×FF; 0×FF Description: ePH1100 supports two A/D resolutions: 8-bit or 10-bit (default is 8-bit). Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) • 23 ePH1100 Handwriting Recognition Microcontroller Example: Command / Response Host ePH1100 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.18 Rotate Touch Panel (0x4C; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0×50 1 Command 1 HEX 0×4C 2 Parameter length 1 HEX 0×04 3 User defined 1 HEX Stuff 3 HEX Checksum 1 HEX 4~6 7 − 0×FF; 0×FF; 0×FF − 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, Bit0~3 must be fixed to 0. Example: Host ePH1100 COM (rotate touch panel) Command / Response 50 4C 04 70 FF FF FF B9 − ACK (rotate touch panel) − 50 4C 04 FF FF FF FF 5A 11.4 Responses from the ePH1100 Specifications 11.4.1 ACK_ERROR (0x00; 8 Bytes) Bytes Function Length Data format 1 HEX Remark 0 Header 1 Command 1 HEX 0×00 2 Parameter length 1 HEX 0×04 Stuff 4 HEX 0×00; 0×00; 0×00; 0×00; Checksum 1 HEX 0×19 3-6 7 0×50 Description: If Host sends an invalid command, the ePH1100 will respond with “ACK ERROR” to Host. 24 • Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) ePH1100 Handwriting Recognition Microcontroller Example: Command / Response Host ePH1100 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 − Description: Normal inking: when the stylus taps the touch panel, the coordinate is transmitted. Stroke over: when the stylus leaves the touch panel, “0×FF, 0×FF” is transmitted. Word over: when a word is completed, “0×FF, 0×00” 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 ePH1100 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 Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) Desciption =>Normal inking =>Stroke over =>Stroke over =>Word over • 25 ePH1100 Handwriting Recognition Microcontroller 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 0×50 1 Command 1 HEX 0×17 2 Parameter length 1 HEX 0×02 3 X coordinate 1 HEX 0×00—0×FE; 0×FF 4 Y coordinate 1 HEX 0×00—0×FE; 0×FF 5 Checksum 1 HEX Description: The default values of the touch panel writing area are (0×10, 0×10) and (0×F0, 0×F0). The ePH1100 will transmit coordinates through the touch panel button area (0×17) if the tapping occurs outside the writing area. Example: Command / Response Host ePH1100 Response (touch panel button) 50 17 02 01 01 3B 11.4.4 Recognized Characters Array (0x18; Maximum 25 Bytes; Minimum 6 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0×50 1 Command 1 HEX 0×18 2 Parameter length 1 HEX − 3 Max. qty. of characters 1 HEX − 4 Characters (low byte) 1 HEX − 5 Characters (high byte) 1 HEX − Checksum 1 HEX − …. N Description: Recognized characters array package. No character will utilize 6 bytes. Example: 26 • Command / Response Host ePH1100 Response (characters) − 50 18 03 01 08 00 3A Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) ePH1100 Handwriting Recognition Microcontroller 11.4.5 Exit from Power Saving Mode (0x33; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0×50 1 Command 1 HEX 0×33 2 Parameter length 1 HEX 0×04 Stuff 4 HEX 0×FF; 0×FF; 0×FF; 0×FF Checksum 1 HEX 0×19 3-6 7 Description: A. Wake-up Conditions When ePH1100 enters power saving mode, ePH1100 will wake-up when one of the following conditions occurs: 1. Touch panel wake-up (“tap to wake-up”): Tap the touch panel & ePH1100 wakes-up and sends 1 byte (0×00) to Host. Host must respond “Host ready” within 7.5 sec, else ePH1100 will enter power saving mode again. Note that ePH1100 must have the tap-to-wakeup function enabled in order to perform this function. Example: Command / Response Host ePH1100 − 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 Touch panel wakeup response 2. Command wake-up: Host executes command “50 33 04 00 00 00 00 C7” to wake up the ePH1100. Example: Command / Response Command wake-up Command wake-up response Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) Host ePH1100 50 33 04 00 00 00 00 C7 − − 50 33 04 FF FF FF FF 19 • 27 ePH1100 Handwriting Recognition Microcontroller B. ePH1100 Wake-up Response Signal Details 380µs 6.4ms 420µs The above waveform illustrates the characteristics of the signal which ePH1100 sends to Host after it wakes up from Idle mode. This signal is composed of 8 clocks with a total width of 6.4ms and is applicable only under “Tap to wake-up” condition. 28 • Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) ePH1100 Handwriting Recognition Microcontroller 11.4.6 Initial Power On (0x42; 8 Bytes) Bytes Function Length Data Format Remarks 0 Header 1 HEX 0×50 1 Command 1 HEX 0×42 2 Parameter length 1 HEX 0×04 Stuff 4 HEX 0×00; 0×00; 0×00; 0×00; Checksum 1 HEX 0×3D 3-6 7 Description: When the ePH1100 is powered on, it will send “Initial power on” response to the Host. Example: Command / Response Host ePH1100 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 0 Header 1 HEX 1 Follow Host command 1 HEX 2 3-6 7 Remark 0x50 − Parameter length 1 HEX 0x04 Stuff 4 HEX 0xFF,0xFF,0xFF,0xFF Checksum 1 HEX − Description: After executing the Host command, the ePH1100 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.4) 02.16.2006 (This specification is subject to change without further notice) • 29 ePH1100 Handwriting Recognition Microcontroller 11.5 Checksum Program Reference : www.6502.org: Source: CRC Calculations CRC-8 8bits checksum table const BYTE CRCTable[256]={ 0x00,0x07,0x0E,0x09,0x1C,0x1B,0x12,0x15,0x38,0x3F,0x36,0x31, 0x24,0x23,0x2A,0x2D,0x70,0x77,0x7E,0x79,0x6C,0x6B,0x62,0x65, 0x48,0x4F,0x46,0x41,0x54,0x53,0x5A,0x5D,0xE0,0xE7,0xEE,0xE9, 0xFC,0xFB,0xF2,0xF5,0xD8,0xDF,0xD6,0xD1,0xC4,0xC3,0xCA,0xCD, 0x90,0x97,0x9E,0x99,0x8C,0x8B,0x82,0x85,0xA8,0xAF,0xA6,0xA1, 0xB4,0xB3,0xBA,0xBD,0xC7,0xC0,0xC9,0xCE,0xDB,0xDC,0xD5,0xD2, 0xFF,0xF8,0xF1,0xF6,0xE3,0xE4,0xED,0xEA,0xB7,0xB0,0xB9,0xBE, 0xAB,0xAC,0xA5,0xA2,0x8F,0x88,0x81,0x86,0x93,0x94,0x9D,0x9A, 0x27,0x20,0x29,0x2E,0x3B,0x3C,0x35,0x32,0x1F,0x18,0x11,0x16, 0x03,0x04,0x0D,0x0A,0x57,0x50,0x59,0x5E,0x4B,0x4C,0x45,0x42, 0x6F,0x68,0x61,0x66,0x73,0x74,0x7D,0x7A,0x89,0x8E,0x87,0x80, 0x95,0x92,0x9B,0x9C,0xB1,0xB6,0xBF,0xB8,0xAD,0xAA,0xA3,0xA4, 0xF9,0xFE,0xF7,0xF0,0xE5,0xE2,0xEB,0xEC,0xC1,0xC6,0xCF,0xC8, 0xDD,0xDA,0xD3,0xD4,0x69,0x6E,0x67,0x60,0x75,0x72,0x7B,0x7C, 0x51,0x56,0x5F,0x58,0x4D,0x4A,0x43,0x44,0x19,0x1E,0x17,0x10, 0x05,0x02,0x0B,0x0C,0x21,0x26,0x2F,0x28,0x3D,0x3A,0x33,0x34, 0x4E,0x49,0x40,0x47,0x52,0x55,0x5C,0x5B,0x76,0x71,0x78,0x7F, 0x6A,0x6D,0x64,0x63,0x3E,0x39,0x30,0x37,0x22,0x25,0x2C,0x2B, 0x06,0x01,0x08,0x0F,0x1A,0x1D,0x14,0x13,0xAE,0xA9,0xA0,0xA7, 0xB2,0xB5,0xBC,0xBB,0x96,0x91,0x98,0x9F,0x8A,0x8D,0x84,0x83, 0xDE,0xD9,0xD0,0xD7,0xC2,0xC5,0xCC,0xCB,0xE6,0xE1,0xE8,0xEF, 0xFA,0xFD,0xF4,0xF3}; Code of produce and verify checksum : unsigned char GenerateCRC(unsigned char *Packet, int size) { int i; unsigned char value; value=0; for(i=0;i<size-1;i++){ value ^= Packet[i]; value =CRCTable[value]; } return value; } void main(void) { unsigned char Packet[8]; //produce checksum of 8bytes package int I; for(I=0;I<8;I++)Packet[I]=0; Packet[7]=GenerateCRC(Packet,sizeof(Packet)) //checksum place the eighth byte } 30 • Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) ePH1100 Handwriting Recognition Microcontroller 12 Package LQFP44 Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice) • 31 ePH1100 Handwriting Recognition Microcontroller 13 Tape Reel Specification 32 • Product Specification (V2.4) 02.16.2006 (This specification is subject to change without further notice)