DATASHEET SEARCH SITE | WWW.ALLDATASHEET.COM
Document overview
- Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
- PDF pages: 79
Technical content
Crystalfontz America, Incorporated Crystalfontz America, Incorporated
12412 East Saltese Avenue
Spokane Valley, WA 99216-0357 Phone: 888-206-9720 Fax: 509-892-1203 Email: techinfo@crystalfontz.com URL: www.crystalfontz.com Data Sheet Release 2012/10/12 for the CFA735 Family: CFA735-TFK-KR CFA735-TML-KR CFA735-YYK-KR Hardware Revision: 1v0 Firmware Revision: 0vB INTELLIGENT LCD MODULE SPECIFICATIONS
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 2 Note on Firmware and Hardware Revisions For information about firmware and hardware revisions, see the Part Change Notifications (PCNs) under “News” in our website’s navigation bar. To see the most recent PCN for the CFA735 family at the time of this Data Sheet release date, see PCN #10429. Data Sheet Revision History Data Sheet Release: 2012/10/12 Data Sheet Revision: In Firmware (Pg. 9), omitted information about downloading previous firmware. In Module Outline Drawing Front and Side Views (Pg. 14), corrected Active Area from 77.95 (W) x 22.35 (H) to In LCD Duty and Bias (Pg. 18), corrected Duty specification from 1/32 to 1/160 and Bias specification from 6.7 to 1/13 Bias. In Absolute Maximum Ratings (Pg. 18), corrected Supply Voltage for Logic maximum from +5.5v to +5.25v. Added a description for connector parts to make your own cable to use between the CFA-FBSCAB and the CFA735. See CFA-FBSCAB Connector (Pg. 28). Changed proper handling explanation to show label over the bent Flat Flex Cable. See Handling Caution to Avoid Damaging Flat Flex Cable (Pg. 61). Added URL for location of WHQL Drivers (Pg. 68). Deprecated Command 20 (0x14): Arbitrary DOW Transaction (CFA-FBSCAB Required). Throughout the Data Sheet, in all text that compared the CFA735 family of modules to the CFA635 family of modules, the description “obsolete” was deleted for the CFA635 family. The CFA635 family is available with a new LCD controller chip. See PCN #10405. Updated formatting, wording, and organization of Data Sheet text and illustrations to meet current publication standards. 2012/02/13 Data Sheet Revision: 2012/02/13 Added important note about proper handling. To avoid damage of FFC (Flat Flex Cable), please see HANDLING CAUTION. Added new information on How to Identify Version Numbers.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 3 2012/02/03 Under TTL “Logic Level, Inverted” Serial H1 Pin Assignments, corrected label on pin 13 from GPIO4 (DOW I/O) to GPIO4. H1 has no DOW connector. Under Connect Optional Crystalfontz CFA-FBSCAB for Fans and Temperature Sensors, a note was added that the CFA735 does not supply power to the CFA-FBSCAB (optional FB System Cooling Accessory Board). The CFA-FBSCAB requires external power.In HOST COMMUNICATIONS FOR CFA635 EMULATION section, under Through USB section, changed from “The settings that are not used as the communication is pure USB data.” to “The virtual COM port settings such as baud rate (speed), stop bits, etc. are ignored as the communications occur as pure USB data.” Under 1 (0x01): Get Hardware & Firmware Version and Module Information, changed revision numbers from XvX is the hardware revision, "0v9" for example YvY is the firmware version, "0v9" for example to XvX is the hardware revision, "0vA" for example YvY is the firmware version, "0vB" for example In 5 (0x05): Reset Functions, the following note was added: “When using both the USB and serial interface simultaneously, you may notice that performing a reset from one interface will impact the other interface.” In command 9 (0x09): Set LCD Special Character Data, changed from data[0] = ... 0-15 are valid to data[0] = ... 0-7 are valid In Design and Mounting under the Care and Handling Precautions section, added “Allow adequate space for the flex at the bottom of the module. If flex is creased, module may be permanently damaged.” Additional minor text and illustration changes were made to make information easier to understand. About Variations We work continuously to improve our products. Because display technologies are quickly evolving, these products may have component or process changes. Slight variations (for example, contrast, color, or intensity) between lots are normal. If you need the highest consistency, whenever possible, order and arrange delivery for your production runs at one time so your displays will be from the same lot. Data Sheet Revision History (Continued)
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 4 The Fine Print Certain applications using Crystalfontz America, Inc. products may involve potential risks of death, personal injury, or severe property or environmental damage (“Critical Applications”). CRYSTALFONTZ AMERICA, INC. PRODUCTS ARE NOT DESIGNED, INTENDED, AUTHORIZED, OR WARRANTED TO BE SUITABLE FOR USE IN LIFE-SUPPORT APPLICATIONS, DEVICES OR SYSTEMS OR OTHER CRITICAL APPLICATIONS. Inclusion of Crystalfontz America, Inc. products in such applications is understood to be fully at the risk of the customer. In order to minimize risks associated with customer applications, adequate design and operating safeguards should be provided by the customer to minimize inherent or procedural hazard. Please contact us if you have any questions concerning potential risk applications. Crystalfontz America, Inc. assumes no liability for applications assistance, customer product design, software performance, or infringements of patents or services described herein. Nor does Crystalfontz America, Inc. warrant or represent that any license, either express or implied, is granted under any patent right, copyright, or other intellectual property right of Crystalfontz America, Inc. covering or relating to any combination, machine, or process in which our products or services might be or are used. All specifications in Data Sheets and on our website are, to the best of our knowledge, accurate but not guaranteed. Corrections to specifications are made as any inaccuracies are discovered. Company and product names mentioned in this publication are trademarks or registered trademarks of their respective owners. Copyright © 2012 by Crystalfontz America, Inc., 12412 East Saltese Avenue, Spokane Valley, WA 99216-0357 U.S.A. Copyrights Acknowledgement /Attribution Notices for CFA635 Emulation Code Please see http://www.crystalfontz.com/products/document/3000/CFA635_Emulation_Firmware_Copyrights_Acknowledgment.pdf
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 5 How to Identify Revision Numbers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 9 CFA635 Emulation Code (Shipped by Default from Factory) - - - - - - - - - - - - - - - - - - - - - - 10 Explanation of Part Number Codes in This Data Sheet - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 Comparison of CFA735 Family and the CFA635 Family - - - - - - - - - - - - - - - - - - - - - - - - - - 11 Module Outline Drawing Front and Side Views - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 14 Module Outline Drawing Back View and PIxel Details - - - - - - - - - - - - - - - - - - - - - - - - - - - 15 Logic Level GPIO +5 volt Tolerant Pins - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 19 Test Conditions and Definitions for Optical Characteristics - - - - - - - - - - - - - - - - - - - - - - - - - 22
CONTENTS
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 6 H1 Connector for TTL “Logic Level, Inverted” Serial Interface and GPIO/ATX Functionality - - - - - - - 28 Standard (+5v) Power Supply and Data Communications through USB - - - - - - - - - - - - - - - - - - - 29 ATX Power Supply Power and Control Connections - - - - - - - - - - - - - - - - - - - - - - - - - - - - 30 TTL “Logic Level, Inverted” Serial H1 Pin Assignments - - - - - - - - - - - - - - - - - - - - - - - - - - - 32 Connect Optional Crystalfontz CFA-FBSCAB for Fans and Temperature Sensors - - - - - - - - - - - - - 33 Connect Optional WR-DOW-Y17 Temperature Sensors to CFA-FBSCAB - - - - - - - - - - - - - - - - - 33 Through TTL “Logic Level, Inverted” Serial - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 34 0x81: Fan Speed Report (CFA-FBSCAB Required) - - - - - - - - - - - - - - - - - - - - - - - - - - - 36 0x82: Temperature Sensor Report (CFA-FBSCAB Required) - - - - - - - - - - - - - - - - - - - - - - 37 1 (0x01): Get Hardware & Firmware Revision and Module Information - - - - - - - - - - - - - - - - - 38 4 (0x04): Store Current State As Boot State - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 39 CFA735 Soft Reboot and Settings Reset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 42 Return Packet for all Five Reset Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 43 9 (0x09): Set LCD Special Character Data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 43 16 (0x10): Set Up Fan Reporting (CFA-FBSCAB Required) - - - - - - - - - - - - - - - - - - - - - - - 45 17 (0x11): Set Fan Power (CFA-FBSCAB Required) - - - - - - - - - - - - - - - - - - - - - - - - - - 46 CONTENTS, CONTINUED
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 7 18 (0x12): Read WR-DOW-Y17 Temperature Sensors (CFA-FBSCAB Required) - - - - - - - - - - - - 46 19 (0x13): Set Up WR-DOW-Y17 Temperature Reporting (CFA-FBSCAB Required) - - - - - - - - - - 46 25 (0x19): Set Fan Power Fail-Safe (CFA-FBSCAB Required) - - - - - - - - - - - - - - - - - - - - - 48 26 (0x1A): Set Fan Tachometer Glitch Delay (CFA-FBSCAB Required) - - - - - - - - - - - - - - - - - 49 27 (0x1B): Query Fan Power & Fail-Safe Mask (CFA-FBSCAB Required) - - - - - - - - - - - - - - - - 49 28 (0x1C): Set ATX Power Switch Functionality - - - - - - - - - - - - - - - - - - - - - - - - - - - - 50 FOUR FUNCTIONS ENABLED BY COMMAND 28 - - - - - - - - - - - - - - - - - - - - - - - - - 51 Function 4: LCD_OFF_IF_HOST_IS_OFF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 51 29 (0x1D): Enable/Disable and Reset the Watchdog - - - - - - - - - - - - - - - - - - - - - - - - - - 52 34 (0x22): Set or Set and Configure GPIO Pin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 54 35 (0x23): Read GPIO and GPO Pin Levels and Configuration State - - - - - - - - - - - - - - - - - - 56 Module Longevity (EOL / Replacement Policy) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 59 Handling Caution to Avoid Damaging Flat Flex Cable - - - - - - - - - - - - - - - - - - - - - - - - - - - 61 ESD (Electro-Static Discharge) Specifications - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 62 Algorithms to Calculate the CRC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 68 Algorithm 1: “C” Table Implementation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 68 Algorithm 2: “C” Bit Shift Implementation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 69 Algorithm 2B: “C” Improved Bit Shift Implementation - - - - - - - - - - - - - - - - - - - - - - - - - - 70 Algorithm 3: “PIC Assembly” Bit Shift Implementation - - - - - - - - - - - - - - - - - - - - - - - - - - 71 Algorithm 4: “Visual Basic” Table Implementation - - - - - - - - - - - - - - - - - - - - - - - - - - - - 73 Algorithm 5: “Java” Table Implementation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 74
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 9 INTRODUCTION The CFA735 family has three color choices. All variants can use a USB and a serial interface (TTL “logic level, inverted” serial or “full swing” RS232 serial) simultaneously. Modules with “full swing” RS232 serial have a mounted CFA-RS232 Serial Converter board. When the information in this Data Sheet applies to all modules, the term “CFA735” is used. Difference Between the Two Serial Interfaces Both of the two serial interfaces use firmware that bring the two UART pins (Tx & Rx) of the CFA735's microcontroller to the CFA735's H1 connector. TTL “Logic Level, Inverted” Serial (Sold as CFA735-xxx-KR) The CFA735-xxx-KR exposes the UART Tx & Rx (“logic level, inverted”, 0v to +3.3v Tx nominal, 0v to +5.0v Rx nominal) signals on pin 1 and pin 2 of the CFA735's connector H1. If your embedded processor is close to the CFA735, you can cable its UART Rx and Tx pins directly to the CFA735-xxx-KR's Tx and Rx pins. No RS232 level translators are required on either end. “Full Swing” RS232 Serial (Sold as CFA735-xxx-KT) The CFA735-xxx-KT is a CFA735-xxx-KR with a mounted RS232 level converter board (CFA-RS232). The CFA735-xxx-KT is the correct choice if your embedded controller or host system has a RS232 serial port (-10v to +10v “full swing” serial interface, typically through a UART). FIRMWARE How to Identify Revision Numbers Before you apply power to the module, press the right arrow key on the keypad. Apply power, keeping the right arrow key depressed until the firmware revision displays. As long as the keypad is depressed, this information is displayed. When you release the right arrow key, the display clears after five seconds. Or when coming out of reset, keep the right arrow key depressed until the firmware revision displays. As long as the keypad is depressed, this information is displayed. When you release the right arrow key, the display clears after five seconds. An alternate method to identify revision number is by using command 1 (0x01): Get Hardware & Firmware Revision and Module Information (Pg. 38). This Data Sheet has information for the three CFA735-xxx-KR variants: CFA735-TFK-KR, CFA735-TML-KR, and CFA735-YYK-KR. TTL “Logic Level, Inverted” Serial and USB CFA735-TFK-KR CFA735-TML-KR CFA735-YYK-KR “Full Swing” RS232 Serial and USB CFA735-TFK-KT CFA735-TML-KT CFA735-YYK-KT
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 10 CFA635 Emulation Code (Shipped by Default from Factory) Each CFA735-xxx-KR module has the current CFA635 emulation firmware revision installed at the time it is shipped. Firmware updates are announced through our PCN (Part Change Notices). To ensure that the appropriate people in your organization receive notices, please ask them to subscribe at www.crystalfontz.com/news/pcn.php Use Your Own Code To use your own code instead of the pre-installed CFA635 emulation firmware, clone the cfa_735_simple git repository. Follow the readme.txt instructions to compile and install the firmware on the CFA735-xxx-KR. (JTAG programmer/ debugger required.) User code is community supported in our forum. Crystalfontz has no phone or email support for user code. EXPLANATION OF PART NUMBER CODES IN THIS DATA SHEET Caution Installation of custom firmware on a CFA735 will remove firmware supported by Crystalfontz. There is no method to reinstall the supported firmware on CFA735 without returning the module to Crystalfontz. Caution When not in use, always verify that the microSD card socket is in the closed and LOCKED position. CFA 735 - x x x - K R Brand CFA – Crystalfontz America, Inc. Model Identifier 735 Backlight Type & Color T – LED, white Y – LED, yellow-green Fluid Type, Image (positive or negative), & LCD Glass Color F – FSTN, positive M – STN, negative, blue Y – STN, positive, yellow-green Polarizer Film Type, Temperature Range, & View Angle (O ‘Clock) K – Transflective, Wide Temperature -20°C to +70°C, 12:00 L – Transmissive, Wide Temperature -20°C to +70°C, 12:00 Special Code K – Manufacturer's code Interface Code R – TTL “Logic Level, Inverted” Serial and USB Bidirectional 9600 / 19200 / 115200 baud logic-level asynchro- nous serial interface is suitable to connect directly to microcon- troller UART pins. Full-speed USB interface is available simultaneously.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 11 COMPARISON OF CFA735 FAMILY AND THE CFA635 FAMILY The CFA735 family is mechanically compatible with and uses the same command format as the CFA635 family. In most applications, a CFA735 module can be used in place of a CFA635 module with little or no change to the host system’s software required. Please note that the USB driver used on the host PC is different for the CFA735 than for the CFA635. All CFA735 modules support USB interface and serial logic level interfaces simultaneously. The CFA635 modules are USB only or serial only. The CFA735 emulates all the CFA635 functions, with the exception of command 22 (0x16): Send Command Directly to the LCD Controller. Unlike the CFA635+SCAB, the CFA735+ CFA-FBSCAB (FB System Cooling Accessory Board) has no ATX functionality provided through the CFA-FBSCAB. However, ATX control is available using the H1 connector on the CFA735. ADDITIONAL MODULE FEATURES Large easy-to-read 20 characters x 4 lines in a compact size. Fits nicely in a 1U rack mount case (37.1 mm overall height typical to 38.0 overall height maximum). Choice of 3 colors. Edge-lit display is backlight with 12 LEDs, 6 per side. Attractive stainless steel bezel. Six-button translucent silicone keypad with screened legend is backlit with white LEDs. Fully decoded keypad: any key combination is valid and unique. Only a single supply is needed. Wide power supply voltage range (VDD = +3.3v to +5.5v) is perfect for embedded systems. Adjustable backlight and contrast. Backlight and contrast are fully voltage regulated over the power supply range. No adjustments to the contrast setting or backlight brightness are needed. DAC (Digital-to-Analog Converter) controls the constant current LED driver. Key Differences CFA735 + CFA-FBSCAB CFA635 + SCAB or CFA631 + SCAB Crystalfontz WR-DOW-Y17 temperature sensors. Supports up to 16 sensors. Supports up to 32 sensors. Number of fans that can be used with a SCAB or CFA-FBSCAB. Up to 4 fans. Up to 4 fans for USB interface. Up to 3 fans for serial interface. Fan speed when module is disconnected from the SCAB or CFA-FBSCAB. Default fan speed in nonvolatile memory of CFA-FBSCAB, set by CFA735 command. 100% power. GPIOs. H1 connector on CFA735. H1 connector on CFA631 or CFA635 passes through to J8 con- nector on the SCAB. ATX for module with SCAB or CFA-FBSCAB. H1 connector on CFA735 using Crystalfontz WR-PWR-Y25 cable. J8 connector on SCAB using Crys- talfontz WR-PWR-Y05 or WR-PWR-Y14 cable. ATX for module without SCAB or CFA-FBSCAB. H1 connector on CFA631 or CFA635 using Crystalfontz WR-PWR-Y25 cable.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 12 A row of four bicolor (red + green) LED status lights on the front of the display. Using constant current LED driver, the LEDs' brightness can be set by the host software, which allows smoothly adjusting the LEDs to produce other colors (for example, yellow and orange). The CFA735-xxx-KR is powered by an ST-Micro STM32F103 series 32-bit ARM-based microcontroller and Sitronix ST7529 driver/controller. Robust packet based communications protocol with 16-bit CRC. Nonvolatile memory (flash) capability: Customize the “power-on” display settings. 16-byte “scratch” register for storing IP, netmask, system serial number, etc. Optional ATX functionality allows the keypad buttons to replace the power and reset switches on your system, sim- plifying front panel design. The 16-pin Crystalfontz WR-PWR-Y25 ATX power switch cable may be used for direct connection to the host’s power supply. Hardware watchdog can reset host on host software failure. The CFA735-xxx-KR firmware support for the optional Crystalfontz CFA-FBSCAB (FB System Cooling Accessory Board). For more information, see Connect Optional Crystalfontz CFA-FBSCAB for Fans and Temperature Sensors (Pg. 33) and the CFA-FBSCAB Data Sheet on our website. The combination of the CFA735 with the optional CFA-FBSCAB (CFA735+CFA-FBSCAB) allows: Control up to four fans with RPM monitoring. Fail-safe fan power settings allows host to safely control four fans based on temperature. Add one up to 16 Crystalfontz WR-DOW-Y17 cables with DOW (Dallas 1-Wire) DS18B20 temperature sensors. Monitor temperatures at up to 0.5°C absolute accuracy. Available mounted in DS735, a SLED chassis that holds the display module, the optional (CFA-FBSCAB (FB Sys- tem Cooling Accessory Board) and a 3.5-inch disk drive. Also available in a a 5.25-inch half-height drive bay mount- ing bracket. See Kit Configurations (Pg. 12). To download a PDF file of the Certificate of Compliance: ISO 9001:2008 manufacturer, Product Specifications, RoHS, and REACH:SVHC, go to the module’s Doc/Files tab on the part number’s website page. ACCESSORIES Modules with Cables The CFA735-xxx-KR color variants are also sold separately or as part of a kit that includes one cable: If you prefer to buy individual cables for this module, see Cables (Pg. 26). Kit Configurations In addition to modules sold with the cables listed above, we also sell module kits that include an assortment of cables with the following accessories: Bracket: a 5.25-inch half-height drive bay mounting bracket. or SLED: a chassis that fits in 5.25-inch half-height drive bay. The SLED can hold a CFA735-xxx-KR module, an CFA-FBSCAB (FB System Cooling Accessory Board), and a 3.5-inch hard disk drive. (Hard drive is not included.) and Kit Part Numbers CFA735-TFK-KR1, CFA735-TML-KR1, and CFA735-YYK-KR1 includes a WR-USB-Y27, a Micro-B to USB-A to 6-foot cable. Kit Part Numbers CFA735-TFK-KR2, CFA735-TML-KR2, and CFA735-YYK-KR2 includes WR-USB-Y34, a Micro-B USB to 4-pin 0.1” connector for USB pins on your motherboard.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 13 Overlay: an overlay for the front of module with a display window of thick hard-coated polycarbonate. Overlays are sold with the bracket and SLED. Overlay choices are black brushed anodized aluminum, silver brushed anodized aluminum, beige plastic, and black plastic. Kit configurations are available here: https://www.crystalfontz.com/products/select_kit.html. MECHANICAL SPECIFICATIONS PHYSICAL CHARACTERISTICS PHYSICAL CHARACTERISTIC SPECIFICATION Module Overall Dimensions Width and Height 142.0 (W) mm x 37.1 (H) mm typical to 38.0 (H) mm maximum Module Depth (Thickness): with Keypad, with Connectors 21.1 mm maximum Viewing Area 83.0 (W) x 27.5 (H) mm Pixel Array 79.27 (W) x 23.78 (H) mm Active Area 77.97 (W) x 22.38 (H) mm 5x7 Standard Character 3.225 (W) x 4.875 (H) mm 6x8 Character Matrix 3.90 (W) x 5.60 (H) mm Pixel Size 0.300 (W) x 0.325 (H) mm Pixel Pitch 0.325 (W) x 0.350 (H) mm Keystroke Travel (approximate) ~2.4 mm Weight 57 grams (typical)
Figure 1. Module Outline Drawing Front and Side Views
12.0 Keypad
15.3 Overall
8.1 PCB / Bezel
12.0 Keypad Maximum
79.27 Pixel Array
82.9 Viewing Area
106.0 PCB Mounting Holes
142.0 Overall (PCB)
20.0 TYP
99.0 Bezel
20 X 4
77.97 Active Area
Note: Tolerance is ±0.5 mm unless specified.
Figure 2. Module Outline Drawing Back View and PIxel Details
0.07 Typical to
0.35 MaximumFlex Bezel
Note: Tolerance is ±0.5 mm unless specified.
Figure 3. Keypad Detail Drawing
- Material: silicone rubber,
- Lifetime: 1 million keystrokes
- Resistance: Less than 100
- Actuation Force: 80~120 grams
- Silicone rubber color: translucent white
- All comers have a fillet radius of 0.75mm
Figure 4. System Block Diagram
4 Bicolor
4 Fans
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 18 LCD DUTY AND BIAS 1The duty cycle, also known as duty ratio or multiplex rate, is the fraction of total frame time that each row of the LCD is addressed. 2The drive bias, also known as voltage margin, is related to the number of voltage levels used when driving the LCD. Bias is defined as 1/(number of voltage levels-1). The more segments driven by each driver(1), the higher number of voltage levels are required. There is a direct relationship between the bias and the duty. ABSOLUTE MAXIMUM RATINGS All variants (all colors) INPUT SUPPLY VOLTAGES Internal processor and logic supply voltage: +3.3v. (Developed from module supply voltage with buck/boost converter.) DRIVING METHOD SPECIFICATION Duty1 1/160 Bias2 1/13 ABSOLUTE MAXIMUM RATINGS SYMBOL MINIMUM MAXIMUM Operating Temperature TOP -20°C +70°C Storage Temperature TST -30°C +80°C Humidity Range (Noncondensing) RH 10% 90% Supply Voltage for Logic VDD 0v +5.25v Notes: These are stress ratings only. Extended exposure to the absolute maxi- mum ratings listed above may affect device reliability or cause permanent damage.. Changes in temperature can result in changes in contrast.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 19 LOGIC LEVEL GPIO +5 VOLT TOLERANT PINS TYPICAL GPIO CURRENT LIMITS DC CHARACTERISTICS SYMBOL MINIMUM MAXIMUM CONTROLLER AND BOARD Input High Voltage VIH 0.42*(VDD-2 v)+1v If VDD = +3.3v = +1.55v +5.5v Input Low Voltage VIL -0.3v 0.32*(VDD-2v)+0.75v If VDD = +3.3v = +1.17v Output High Voltage VOH +2.4v +3.3v Output Low Voltage VOL +0.4v +1.3v TYPICAL GPIO CURRENT LIMITS Sink 8 mA Source 8 mA
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 20 TYPICAL CURRENT CONSUMPTION All interfaces: TTL “Logic Level, Inverted” Serial, “Full swing” RS232 Serial, and USB CFA735-TFK-Kx (Black on White) CFA735-TML-Kx (White on Blue) CFA735-YYK-Kx (Black on Yellow-Green) Page 1 0 1 02 03 04 05 06 07 08 09 0 1 0 0 100 150 200 250 300 350 3.3v 3.5v 4.0v 4.5v 5.0v 5.5v LED Keypad and Display Backlight Power Setting (%) Typical Current Consumption (mA) Page 1 0 1 02 03 04 05 06 07 08 09 0 1 0 0 100 150 200 250 300 350 3.3v 3.5v 4.0v 4.5v 5.0v 5.5v LED Keypad and Display Backlight Power Setting (%) Typical Current Consumption (mA) Page 1 0 1 02 03 04 05 06 07 08 09 0 1 0 0 100 150 200 250 300 350 3.3v 3.5v 4.0v 4.5v 5.0v 5.5v LED Keypad and Display Backlight Power Setting (%) Typical Current Consumption (mA)
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 21 ESD (ELECTRO-STATIC DISCHARGE) The remainder of the circuitry is industry standard CMOS logic and is susceptible to ESD damage. Please use industry standard antistatic precautions as you would for any other static sensitive devices such as expansion cards, motherboards, or integrated circuits. Ground your body, work surfaces, and equipment. OPTICAL SPECIFICATIONS VIEWING DIRECTION OPTICAL CHARACTERISTICS CFA735-TFK-Kx VIEWING DIRECTION
12 O’Clock
Viewing Angle (12 o’clock) Deg θ = 90° CR>2 Deg θ = 270° 60 Deg θ = 0° 45 Deg θ = 180° 45 Contrast Ratio1 CR 3.8 5.0 LCD Response Time2,3 T rise Ta = 25°C 180 ms T fall Ta = 25°C 200 ms 1Contrast Ratio = (brightness with pixels light)/(brightness with pixels dark). 2For reference only. 3Response Time: The amount of time it takes a liquid crystal cell to go from active to inactive or back again.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 22 CFA735-TML-Kx and CFA735-YYK-Kx TEST CONDITIONS AND DEFINITIONS FOR OPTICAL CHARACTERISTICS We work to continuously improve our products, including backlights that are brighter and last longer. Slight color variations from module to module and batch to batch are normal. Viewing Angle Vertical (V)θ: 0° Horizontal (H)ϕ: 0° Frame Frequency: 78 Hz Driving Waveform: 1/160 Duty, 1/13 Bias Ambient Temperature (Ta): 25°C ITEM SYMBOL CONDITION MINIMUM TYPICAL MAXIMUM Viewing Angle (12 o’clock) Deg θ = 90° CR>2 Deg θ = 270° 40 Deg θ = 0° 30 Deg θ = 180° 30 Contrast Ratio1 CR 3.8 5.0 LCD Response Time2 T rise Ta = 25°C 180 ms T fall Ta = 25°C 200 ms 1Contrast Ratio = (brightness with pixels light)/(brightness with pixels dark). 2Response Time: The amount of time it takes a liquid crystal cell to go from active to inactive or back again.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 26 LED BACKLIGHT INFORMATION Backlight control is by DAC (Digital-to-Analog Converter) controlling the constant current LED driver. The LCD and keypad backlights are independently controlled. CONNECTION INFORMATION CABLES Following this table are descriptions of common connection configurations. Cable lengths are approximate. Note For modules with white backlights (CFA735-TML-Kx and CFA735-TFK-Kx ), we recommend that the backlight be dimmed or turned off during periods of inactivity to conserve the LEDs’ lifetime. Part Number Description of Cables for CFA735-xxx-KR All cables are RoHS compliant USB WR-USB-Y27 ~6 feet Connect cable’s micro-B USB female connector to CFA735’s micro-B USB connector. Connect cable’s USB-A female connector to host’s USB-A connector. WR-USB-Y34 ~27.5 inches Connect cable’s micro-B USB female connector to CFA735’s micro-B USB connector. Connect cable’s sin- gle piece 4-pin 0.1" female connector to USB pins on host’s motherboard. For correct orientation, note the +5v location on the 4-pin connector. Note: Keep the micro-B USB cable connector parallel to the CFA735 when plugging or unplugging the cable. Do not lift or pull up on the cable. Too much pressure may permanently damage the CFA735’s micro-B USB connector. TTL “Logic Level, Inverted” Serial WR-PWR-Y24 ~26 inches Connect cable’s 16-pin female connector to CFA735’s H1 connector. Connect cable’s male connector to host’s power supply. Note: To make your own cable, see list of parts for H1 connector (Pg. 28). ATX Functionality Use CFA735 to Power On, Power Off, or Reset the host with or without CFA-FBSCAB accessory. WR-PWR-Y25 ~11 inches Connect cable’s 16-pin female connector to CFA735’s H1 connector. Connect cable’s male connector directly to host’s ATX power supply. Or connect cable’s 4 separate female connectors to the 4 pins on host’s motherboard. Note: Unlike the CFA635+SCAB, the CFA735+CFA-FBSCAB (FB System Cooling Accessory Board) has no ATX functionality provided through the CFA-FBSCAB. ATX control is available using the H1 connector on the CFA735. CFA-FBSCAB (FB System Cooling Accessory Board) Note: The CFA735 does not supply power to the CFA-FBSCAB. The CFA-FBSCAB requires external power, typically supplied by a 4-pin 3.5-inch floppy drive power connector.
Figure 11. Location of Connectors The module has three connectors on the back of the PCB: H1, USB, and FBSCAB. Note: The PCB pads labeled BOOT and the EXPANSION pads are reserved for factory testing and programming. J_DOW. If desired, connect the cable’s 3-pin male connector to an additional temperature sensor.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 28 USB Connector The USB connector is a micro USB 5-pin (F) B type. You may connect the module to one host using a USB interface while at the same time using a serial interface to a second host. For details, see Standard (+5v) Power Supply and Data Communications through USB (Pg. 29). CFA-FBSCAB Connector The CFA735-xxx-KR has an optional system cooling accessory board CFA-FBSCAB. Fans and up to 16 temperature sensors may be connected to the CFA-FBSCAB. See Connect Optional WR-DOW-Y17 Temperature Sensors to CFA-FBSCAB (Pg. 33). Use our WR-EXT-Y37 Cable You may use the WR-EXT-Y37 cable (~18 inches) to connect the CFA-FBSCAB to the CFA735-xxx-KR Make Your Own Cable To make your own cable, here are some typical connector parts manufactured by Hirose, available through Digi-Key: Connection at CFA-FBSCAB Female housing on cable: Hirose DF11-4DS-2C (www.digikey.com/product-detail/en/DF11-4DS-2C). Female crimp terminal in housing: Hirose DF11-2428SC (www.digikey.com/product-detail/en/DF11-2428SC). For reference, mating male connector on CFA-FBSCAB: Hirose DF11GZ-4DP-2V(20) (www.digikey.com/ product-detail/en/DF11GZ-4DP-2V(20)). Connection at CFA735 Male housing on cable: Hirose DF11-4DEP-2C (www.digikey.com/product-detail/en/DF11-4DEP-2C). Male crimp terminal in housing: Hirose DF11-EP2428PC (www.digikey.com/product-detail/en/DF11- EP2428PCF. For reference, mating female connector on CFA735: Hirose DF11Z-4DS-2V(20) (www.digikey.com/product- detail/en/DF11Z-4DS-2V(20)) Pre-crimped wires are also available from Digi-Key. Here is a link to a 12", 24ga, pin-to-socket in blue: Hirose H3ABT- 10112-L4-ND (www.digikey.com/product-detail/en/H3ABT-10112-L4-ND). H1 Connector for TTL “Logic Level, Inverted” Serial Interface and GPIO/ATX Functionality This 16-pin connector can be used for TTL “logic level, inverted” serial connection to one host while at the same time using a USB interface to a second host. See H1 Connector for TTL “Logic Level, Inverted” Serial Interface and GPIO/ ATX Functionality (Pg. 28) for connection details. The following parts may be used to make your own cable to connect to the modules’ H1 connector: 16-position housing: Hirose DF11-16DS-2C / Digi-Key H2025-ND. Crimping contact (tape & reel): Hirose DF11-2428SCF / Digi-Key H1504TR-ND. Crimping contact (loose): Hirose DF11-2428SC / Digi-Key H1504-ND. Pre-terminated interconnect wire: Hirose / Digi-Key H3BBT-10112-B4-ND is typical.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 30 ATX POWER SUPPLY POWER AND CONTROL CONNECTIONS ATX power supply control functionality allows the buttons on the CFA735-xxx-KR to replace the power and reset button on your system, simplifying front panel design. GPIO[1] ATX Host Power Sense Since the CFA735-xxx-KR must act differently depending on whether the host's power supply is on or off, you must also connect the host's “switched +5v” to GPIO[1]. This GPIO line functions as POWER SENSE. The POWER SENSE pin is configured as an input with a pull-down, 5kΩ nominal. GPIO[2] ATX Host Power Control The motherboard's power switch input is connected to GPIO[2]. This GPIO line functions as POWER CONTROL. The POWER CONTROL pin is configured as a high impedance input until the LCD module instructs the host to turn on or off. Then it will change momentarily to low impedance output, driving either low or high depending on the setting of POWER INVERT. See command 28 (0x1C): Set ATX Power Switch Functionality (Pg. 50). GPIO[3] ATX Host Reset Control The motherboard's reset switch input is connected to GPIO[3]. This GPIO line functions as RESET. The RESET pin is configured as a high-impedance input until the LCD module wants to reset the host. Then it will change momentarily to Note to Customers Using USB Interface While Supplying Power through H1 JP10 on the CFA735-xxx-KR is closed by factory default. If you are going to use USB interface while supplying power through H1, you must open JP10 to prevent back-powering the USB. Note to Customers using Optional CFA-FBSCAB (FB System Cooling Accessory Board) Unlike the CFA635+SCAB, the CFA735+ CFA-FBSCAB has no ATX functionality provided through the CFA-FBSCAB. However, ATX control is available using a WR-PWR-Y25 cable on the H1 connector of the CFA735. Note The GPIO pins used for ATX control must not be configured as user GPIO. The GPIO pins must be configured to their default drive mode in order for the ATX functions to work correctly. These settings are factory default but may be changed by the user. Please see command 34 (0x22): Set or Set and Configure GPIO Pin (Pg. 54). Open JP10 for USB
Set ATX Power Switch Functionality (Pg. 50). This connection is also used for the hardware watchdog. Figure 14. ATX Power Supply and Control Connections Using Crystalfontz WR-PWR-Y25 Cable
Figure 15. Pin Assignments on CFA735-xxx-KR’s H1 Connector (Includes GPIOs) Reserved. Make no connection. Reserved. Make no connection. Reserved. Make no connection. Reserved. Make no connection. Reserved. Make no connection. Reserved. Make no connection. Reserved. Make no connection.
Figure 16. CFA735-xxx-KR Module Connected to Optional CFA-FBSCAB with WR-EXT-Y37 Cable by a 4-pin 3.5-inch floppy drive power connector. For more information, see the CFA-FBSCAB Data Sheet. provided through the CFA-FBSCAB. However, ATX control is available using the H1 connector on the CFA735. male connector to an additional temperature sensor. Up to 16 temperature sensors can be connected. (“daisy chained”).
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 34 The DS18B20 on the WR-DOW-Y17 has 0.5°C absolute accuracy. You can make a temperature sensor cable using a DS1822 Dallas Econo 1-Wire Digital Thermometer with +2°C accuracy. For more information, see the CFA-FBSCAB Data Sheet. HOST COMMUNICATIONS FOR CFA635 EMULATION THROUGH USB The easiest and most common way for the host software to access the USB is through the Crystalfontz virtual COM port (VCP) drivers. A link to VCP drivers download and installation instructions can be found on the Crystalfontz website at USB LCD Drivers. Using these drivers makes it appear to the host system as if there is an additional serial port (the VCP) on the host system when the CFA735 is connected. When communicating over USB, the VCP settings are accepted for compatibility reasons. The virtual COM port settings such as baud rate (speed), stop bits, etc. are ignored as the communications occur as pure USB data. THROUGH TTL “LOGIC LEVEL, INVERTED” SERIAL Modules are shipped with port settings 115200 baud, 8 data bits, no parity, 1 stop bit. Baud rate can be changed to 19200 baud. See command 33 (0x21): Set Baud Rate (Pg. 53). PACKET STRUCTURE All communication between the CFA735 and the host takes place in the form of a simple and robust CRC checked packet. The packet format allows for very reliable communications between the CFA735 and the host without the traditional problems that occur in a stream-based serial communication (such as having to send data in inefficient ASCII format, to “escape” certain “control characters”, or losing sync if a character is corrupted, missing, or inserted). Note Because there is no difference in communications and commands for serial and USB interfaces, this Data Sheet section uses the term “CFA735” for the entire CFA735 family of modules. Note to CFA635 Customers The CFA635 requires different firmware for USB interface. The CFA735 supports serial and USB interface with the same firmware. The CFA735 USB driver is not the same as the CFA635 USB driver. If you used the CFA635 USB driver, you will need to replace it with the CFA735 USB driver.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 35 All packets have the following structure: type is one byte, and identifies the type and function of the packet: TTcc cccc |||| ||||--Command, response, error or report code 0-63 00 = normal command from host to CFA735 01 = normal response from CFA735 to host 10 = normal report from CFA735 to host (not in direct response to a command from the host) 11 = error response from CFA735 to host (a packet with valid structure but illegal content was received by the CFA735) data_length specifies the number of bytes that will follow in the data field. The valid range of data_length is 0 to 255. data is the payload of the packet. Each type of packet will have a specified data_length and format for data as well as algorithms for decoding data detailed below. CRC is a standard 16-bit CRC of all the bytes in the packet except the CRC itself. The CRC is sent LSB first. At the port, the CRC immediately follows the last used element of data []. See Appendix B: Demonstration Software and Sample Code (Pg. 68) for several examples of how to calculate the CRC in different programming languages. The following C definition may be useful for understanding the packet structure. typedef struct unsigned char command; unsigned char data_length; unsigned char data[max_data_length]; unsigned short CRC; }COMMAND_PACKET; On our website, Crystalfontz supplies a demonstration and test program, 635_WinTest along with its C source code. Included in the 635_WinTestsource is a CRC algorithm and an algorithm that detects packets. The algorithm will automatically re-synchronize to the next valid packet in the event of any communications errors. Please follow the algorithm in the sample code closely in order to realize the benefits of using the packet communications. Note Reconciling packets is recommended rather than using delays when communicating with the LCD module. To reconcile your packets, please ensure that you have received the acknowledgement packet from the packet most recently sent before sending any additional packets to the LCD module. This practice will guarantee that you will not have any dropped packets or missed communication with the LCD module.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 36 ABOUT HANDSHAKING The nature of CFA735’s packets makes it unnecessary to implement traditional hardware or software handshaking. The host should wait for a corresponding acknowledge packet from the CFA735 before sending the next command packet. The CFA735 will respond to all packets within 250 mS. The host software should stop waiting and retry the packet if the CFA735 fails to respond within 250 mS. The host software should report an error if a packet is not acknowledged after several retries. This situation indicates a hardware problem — for example, a disconnected cable. Please note that some operating systems may introduce delays between when the data arrives at the physical port from the CFA735 until it is available to the user program. In this case, the host program may have to increase its timeout window to account for the additional overhead of the operating system. The CFA735 can be configured to send several types of report packets along with regular acknowledge packets. The host should be able to buffer several incoming packets and must guarantee that it can process and remove packets from its input buffer faster than the packets can arrive given the 115200 equivalent baud rate of the VCP and the reporting configuration of the CFA735. For any modern PC or microcontroller using reasonably efficient software, this requirement will not be a challenge. The report packets are sent asynchronously with respect to the command packets received from the host. The host should not assume that the first packet received after it sends a command is the acknowledge packet for that command. The host should inspect the type field of incoming packets and process them accordingly. REPORT CODES The CFA735 can be configured to report three items. The CFA735 sends reports automatically when the data becomes available. Reports are not sent in response to a particular packet received from the host. The three report types are (1) 0x80: Key Activity, (2) 0x81: Fan Speed Report (CFA-FBSCAB required), and (3) 0x82: Temperature Sensor Report. Details are below. 0x80: Key Activity If a key is pressed or released, the CFA735 sends a Key Activity report packet to the host. Key event reporting may be individually enabled or disabled by command 23 (0x17): Configure Key Reporting (Pg. 47). type = 0x80 data_length = 1 data[0] is the type of keyboard activity: KEY_UP_PRESS 1 KEY_DOWN_PRESS 2 KEY_LEFT_PRESS 3 KEY_RIGHT_PRESS 4 KEY_ENTER_PRESS 5 KEY_EXIT_PRESS 6 KEY_UP_RELEASE 7 KEY_DOWN_RELEASE 8 KEY_LEFT_RELEASE 9 KEY_RIGHT_RELEASE 10 KEY_ENTER_RELEASE 11 KEY_EXIT_RELEASE 12 0x81: Fan Speed Report (CFA-FBSCAB Required) If any of up to four fans connected to CFA735+CFA-FBSCAB is configured to report its speed information to the host, the CFA735 will send Fan Speed Reports for each selected fan every 1/2 second. See command 16 (0x10): Set Up Fan Reporting (CFA-FBSCAB Required) (Pg. 45).
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 37 type = 0x81 data_length = 4 data[0] is the index of the fan being reported: 0 = FAN 1 1 = FAN 2 2 = FAN 3 3 = FAN 4 data[1] is number_of_fan_tach_cycles data[2] is the MSB of Fan_Timer_Ticks data[3] is the LSB of Fan_Timer_Ticks The following C function will decode the fan speed from a Fan Speed Report packet into RPM: int OnReceivedFanReport(COMMAND_PACKET *packet, char * output) int return_value; return_value=0; int number_of_fan_tach_cycles; number_of_fan_tach_cycles=packet->data[1]; if(number_of_fan_tach_cycles<3) sprintf(output," STOP"); else if(number_of_fan_tach_cycles<4) sprintf(output," SLOW"); else if(0xFF==number_of_fan_tach_cycles) sprintf(output," ----"); else //Specific to each fan, most commonly 2 int pulses_per_revolution; pulses_per_revolution=2; int Fan_Timer_Ticks; Fan_Timer_Ticks=(*(unsigned short *)(&(packet->data[2]))); return_value=((27692308L/pulses_per_revolution)* (unsigned long)(number_of_fan_tach_cycles-3))/ (Fan_Timer_Ticks); sprintf(output,"%5d",return_value); return(return_value); 0x82: Temperature Sensor Report (CFA-FBSCAB Required) If any of the up to 16 temperature sensors is configured to report to the host, the CFA735+CFA-FBSCAB will send Temperature Sensor Reports for each selected sensor every second. See the command 19 (0x13): Set Up WR-DOW- Y17 Temperature Reporting (CFA-FBSCAB Required) (Pg. 46). type = 0x82 data_length = 4 data[0] is the index of the temperature sensor being reported: 0 = temperature sensor 1 1 = temperature sensor 2 . . . 15 = temperature sensor 16 data[1] is the LSB of Temperature_Sensor_Counts data[2] is the MSB of Temperature_Sensor_Counts data[3] is DOW_crc_status
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 38 The following C function will decode the Temperature Sensor Report packet into °C and °F: void OnReceivedTempReport(COMMAND_PACKET *packet, char *output) //First check the DOW CRC return code from the CFA735 if(packet->data[3]==0) strcpy(output,"BAD CRC"); else double degc; degc=(*(short *)&(packet->data[1]))/16.0; double degf; degf=(degc*9.0)/5.0+32.0; sprintf(output,"%9.4f°C =%9.4f°F", degc, degf); COMMAND CODES Below is a list of valid commands for the CFA735. Each command packet is answered by either a response packet or an error packet.The low 6 bits of the type field of the response or error packet is the same as the low 6 bits of the type field of the command packet being acknowledged. 0 (0x00): Ping Command The CFA735 will return the Ping Command to the host. type = 0x00 = 010 valid data_length is 0 to 255 data[0-(data_length-1)] can be filled with any arbitrary data The return packet is identical to the packet sent, except the type will be 0x40 (normal response, Ping Command): type = 0x40 | 0x00 = 0x40 = 6410 data_length = (identical to received packet) data[0-(data_length-1)] = (identical to received packet) 1 (0x01): Get Hardware & Firmware Revision and Module Information The CFA735 will return the hardware and firmware revision information to the host. type = 0x01 = 110 valid data_length is 0-1. data[0] = Module information to return 0 = (optional) Hardware and Firmware Revision, same as using a data length of 0 1 = Module Serial Number The return packet will be: type = 0x40 | 0x01 = 0x41 = 6510 data_length = 16 data[] = "CFA735:hXvX,fYvY" hXvX is the hardware revision fYvY is the firmware revision
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 39 or for data[0] = 1 from the host type = 0x40 | 0x01 = 0x41 = 6510 data_length = 20 data[] = Module Serial Number 2 (0x02): Write User Flash Area The CFA735 reserves 16 bytes of nonvolatile memory for arbitrary use by the host. This memory can be used to store a serial number, IP address, gateway address, netmask, or any other data required. All 16 bytes must be supplied. type = 0x02 = 210 valid data_length is 16 data[] = 16 bytes of arbitrary user data to be stored in the CFA735's nonvolatile memory The return packet will be: type = 0x40 | 0x02 = 0x42 = 6610 data_length = 0 3 (0x03): Read User Flash Area This command will read the User Flash Area and return the data to the host. type = 0x03 = 310 valid data_length is 0 The return packet will be: type = 0x40 | 0x03 = 0x43 = 6710 data_length = 16 data[] = 16 bytes user data recalled from the CFA735's nonvolatile memory 4 (0x04): Store Current State As Boot State The CFA735 loads its power-up configuration from nonvolatile memory when power is applied. The CFA735 is configured at the factory to display a “welcome” screen when power is applied. This command can be used to customize the “welcome screen”, as well as the following items: Characters shown on LCD, which are affected by: Command 6 (0x06): Clear LCD Screen (Pg. 43). Command 31 (0x1F): Send Data to LCD (Pg. 53). Special character font definitions (command 9 (0x09): Set LCD Special Character Data (Pg. 43)). Cursor position (command 11 (0x0B): Set LCD Cursor Position (Pg. 44)). Cursor style (command 12 (0x0C): Set LCD Cursor Style (Pg. 44)). Contrast setting (command 13 (0x0D): Set LCD Contrast (Pg. 44)). Backlight setting (command 14 (0x0E): Set LCD & Keypad Backlights (Pg. 44)). Fan power settings (command 17 (0x11): Set Fan Power (CFA-FBSCAB Required) (Pg. 46)). Key press and release masks (command 23 (0x17): Configure Key Reporting (Pg. 47)). Fan glitch delay settings (command 26 (0x1A): Set Fan Tachometer Glitch Delay (CFA-FBSCAB Required) (Pg. 49). ATX function enable and pulse length settings (command 28 (0x1C): Set ATX Power Switch Functionality (Pg. 50)). Baud rate (command 33 (0x21): Set Baud Rate (Pg. 53)). GPIO settings (command 34 (0x22): Set or Set and Configure GPIO Pin (Pg. 54)). The front panel LED/GPO settings (command 34 (0x22): Set or Set and Configure GPIO Pin (Pg. 54)). You cannot store the fan or temperature reporting, or the fan fail-safe or host watchdog. The host software should enable these items once the system is initialized and it is ready to receive the data.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 40 type = 0x04 = 410 valid data_length is 0 The return packet will be: type = 0x40 | 0x04 = 0x44 = 6810 data_length = 0 5 (0x05): Reset Functions Depending on the parameters you provide, this command provides five reset functions: (1) Reload Boot Settings, (2) Reset Host, (3) Power Off Host, (4) CFA735 Soft Reboot, or (5) CFA735 Soft Reboot and Settings Reset. Reload Boot Settings Reloads default settings stored in command 4 (0x04): Store Current State As Boot State (Pg. 39). This has the same parameters and the same effect as the CFA635’s command 5 “Reboot CFA635”. Rebooting the CFA735 may be useful when testing the boot configuration. It may also be useful to re-enumerate the devices on the 1-wire bus. type = 0x05 = 510 valid data_length is 3 data[0] = 8 data[1] = 18 data[2] = 99 Reset Host This command instructs the CFA735+WR-PWR-Y25 cable to simulate a power-on restart of itself, reset the host, or turn the host's power off. The ability to reset the host may be useful to allow certain host operating system configuration changes to complete. The ability to turn the host's power off under software control may be useful in systems that do not have ACPI* compatible BIOS. Note When using both the USB and serial interface simultaneously, you may notice that performing a reset from one interface will impact the other interface. Note The CFA735 will return the acknowledge packet immediately, then reload it settings. The module will respond to new commands immediately. Realize this may reconfigure the interface you are communicating through to its boot state. Part of this delay is the intentional staggered sequencing of turning on power to the fans. If you are not using fans, you can speed the boot process by setting the fan power to 0 (command 17 (0x11): Set Fan Power (CFA-FBSCAB Required)) and saving this as the default boot state (command 4 (0x04): Store Current State As Boot State).
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 41 *Advanced Configuration and Power Interface) is an industry specification for the efficient handling of power consumption in desktop and mobile computers. To reset the host (CFA735+WR-PWR-Y25 cable), assuming the host's reset line is connected to GPIO[3] as described in command 28 (0x1C): Set ATX Power Switch Functionality (Pg. 50), send the following packet: type = 0x05 = 510 valid data_length is 3 data[0] = 12 data[1] = 28 data[2] = 97 Power Off Host This command instructs the CFA735+WR-PWR-Y25 cable to simulate a power-on restart of itself, reset the host, or turn the host's power off. The ability to reset the host may be useful to allow certain host operating system configuration changes to complete. The ability to turn the host's power off under software control may be useful in systems that do not have ACPI compatible BIOS. To turn the host's power off CFA735+WR-PWR-Y25 cable), assuming the host's power control line is connected to GPIO[2] as described in command 28 (0x1C): Set ATX Power Switch Functionality (Pg. 50), send the following packet: type = 0x05 = 510 valid data_length is 3 data[0] = 3 data[1] = 11 data[2] = 95 Note The GPIO pins used for ATX control must not be configured as user GPIO, and must be configured to their default drive mode in order for the ATX functions to work correctly. These settings are factory default, but may be changed by the user. Please see command 34 (0x22): Set or Set and Configure GPIO Pin (Pg. 54). Note The CFA735 will return the acknowledge packet immediately, then reset the host. After resetting the host (~1.5 seconds), the module will soft reboot as detailed below. Part of this delay is the intentional staggered sequencing of turning on power to the fans. If you are not using fans, you can speed the boot process by setting the fan power to 0 (command 17 (0x11): Set Fan Power (CFA-FBSCAB Required)) and saving this as the default boot state (command 4 (0x04): Store Current State As Boot State). Normally, the host will be recovering from its own reset, so the boot delay of the module will not be of consequence. Note The GPIO pins used for ATX control must not be configured as user GPIO, and must be configured to their default drive mode in order for the ATX functions to work correctly. These settings are factory default, but may be changed by the user. Please see command 34 (0x22): Set or Set and Configure GPIO Pin (Pg. 54).
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 42 CFA735 Soft Reboot Performs a soft reboot of the CFA735 module. If used as a USB device, CFA735 soft reboot will cause the module to disconnect and then reconnect (re-enumerate). For CFA735 soft reboot, send the following packet: type = 0x05 = 510 valid data_length is 3 data[0] = 8 data[1] = 25 data[2] = 48 CFA735 Soft Reboot and Settings Reset Resets the system boot state to that of an “un-customized” CFA735 and then performs a CFA735 soft reboot. If used as a USB device, CFA735 soft reboot will cause the module to disconnect and then reconnect (re-enumerate). For settings reset and CFA735 soft reboot, send the following packet: type = 0x05 = 510 valid data_length is 3 data[0] = 10 data[1] = 8 data[2] = 98 Note The CFA735 will return the acknowledge packet immediately, then power down the host. The power down length is dependent on the length of the power pulse (command 28 (0x1C): Set ATX Power Switch Functionality (Pg. 50)). After powering down the host, the module will perform according to the ATX Settings defined by command 28 (0x1C): Set ATX Power Switch Functionality (Pg. 50). Note The CFA735 will return the acknowledge packet immediately, then reboot itself. The module will not respond to new command packets for up to 3 seconds. Note The CFA735 will return the acknowledge packet immediately, then reboot itself. The module will not respond to new command packets for up to 3 seconds. Note This command does not affect the user flash values input for command 2 (0x02): Write User Flash Area (Pg. 39).
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 43 Return Packet for all Five Reset Functions For any of the reset functions, the return packet will be: type = 0x40 | 0x05 = 0x45 = 6910 data_length = 0 6 (0x06): Clear LCD Screen Sets the contents of the LCD screen DDRAM to ' ' = 0x20 = 32 and moves the cursor to the left-most column of the top line. type = 0x06 = 610 valid data_length is 0 The return packet will be: type = 0x40 | 0x06 = 0x46 = 7010 data_length = 0 Clear LCD Screen is one of the items stored by the command 4 (0x04): Store Current State As Boot State (Pg. 39). 9 (0x09): Set LCD Special Character Data Sets the font definition for one of the special characters (CGRAM). type = 0x09 = 910 valid data_length is 9 data[0] = index of special character that you would like to modify, 0-7 are valid data[1-8] = bitmap of the new font for this character data[1-8] are the bitmap information for this character. Any value is valid between 0 and 255.The msb is at the left of the character cell of the row. The lsb is at the right of the character cell. data[1] is at the top of the cell. data[8] is at the bottom of the cell. If you set bit 7 of any of the data bytes in the pixel row, the entire row will blink. The return packet will be: type = 0x40 | 0x09 = 0x49 = 7310 data_length = 0 Set LCD Special Character Data is one of the items stored by the command 4 (0x04): Store Current State As Boot State (Pg. 39). 10 (0x0A): Read 8 Bytes of LCD Memory This command will return the contents of the LCD’s DDRAM or CGRAM. This command is intended for debugging. type = 0x0A = 1010 valid data_length is 1 data[0] = address code of desired data data[0] is the address code native to the LCD controller: 0x40 ( 64) to 0x7F (127) for CGRAM 0x80 (128) to 0x93 (147) for DDRAM, line 0 0xA0 (160) to 0xB3 (179) for DDRAM, line 1 0xC0 (192) to 0xD3 (211) for DDRAM, line 2 0xE0 (224) to 0xF3 (243) for DDRAM, line 3 The return packet will be: type = 0x40 | 0x0A = 0x4A = 7410 data_length = 9
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 44 data[0] of the return packet will be the address code. data[1-8] of the return packet will be the data read from the LCD controller's memory. 11 (0x0B): Set LCD Cursor Position This command allows the cursor to be placed at the desired location on the CFA735’s LCD screen. If you want the cursor to be visible, you may also need to send a command 12 (0x0C): Set LCD Cursor Style (Pg. 44). type = 0x0B = 1110 valid data_length is 2 data[0] = column (0-19 valid) data[1] = row (0-3 valid) The return packet will be: type = 0x40 | 0x0B = 0x4B = 7510 data_length = 0 Set LCD Cursor Position is one of the items stored by the command 4 (0x04): Store Current State As Boot State (Pg. 39). 12 (0x0C): Set LCD Cursor Style This command allows you to select among four hardware generated cursor options. type = 0x0C = 1210 valid data_length is 1 data[0] = cursor style (0-4 valid) 0 = no cursor 1 = blinking block cursor 2 = underscore cursor 3 = blinking block plus underscore 4 = inverting, blinking block The return packet will be: type = 0x40 | 0x0C = 0x4C = 7610 data_length = 0 Set LCD Cursor Style is one of the items stored by the command 4 (0x04): Store Current State As Boot State (Pg. 39). 13 (0x0D): Set LCD Contrast This command sets the contrast of the display. type = 0x0D = 1310 valid data_length is 1 data[0] = contrast setting (0-255 valid) 0-65 = very light 66 = light 85 = about right 125 = dark 126-254 = very dark (may be useful at cold temperatures) The return packet will be: type = 0x40 | 0x0D = 0x4D = 7710 data_length = 0 Set LCD Contrast is one of the items stored by the command 4 (0x04): Store Current State As Boot State (Pg. 39). 14 (0x0E): Set LCD & Keypad Backlights This command sets the brightness of the LCD and keypad backlights. (Initiated by the host, responded to by the CFA735.)
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 45 If one byte is supplied, both the keypad and LCD backlights are set to that brightness (compatible to the CFA635). type: 0x0E = 1410 valid data_length is 1 data[0]: keypad and LCD backlight power setting (0-100 valid) 0 = off 1-99 = variable brightness 100 = on The return packet will be: type: 0x40 | 0x0E = 0x4E = 7810 data_length: 0 If two bytes are supplied, the LCD is set to the brightness of the first byte, the keypad is set to the brightness of the second byte type: 0x0E = 1410 valid data_length is 2 data[0]: LCD backlight power setting (0-100 valid) 0 = off 1-100 = variable brightness data[1]: keypad backlight power setting (0-100 valid) 0 = off 1-100 = variable brightness The return packet will be: type: 0x40 | 0x0E = 0x4E = 7810 data_length: 0 Set LCD & Keypad Backlight is one of the items stored by the command 4 (0x04): Store Current State As Boot State (Pg. 39). 16 (0x10): Set Up Fan Reporting (CFA-FBSCAB Required) This command will configure the CFA735+CFA-FBSCAB to report the fan speed information to the host every 500 mS. type = 0x10 = 1610 valid data_length is 1 data[0] = bitmask indicating which fans are enabled to report (0-15 valid) ---- 8421 Enable Reporting of this Fan’s Tach Input |||| ||||-- Fan 1: 1 = enable, 0 = disable |||| |||--- Fan 2: 1 = enable, 0 = disable |||| ||---- Fan 3: 1 = enable, 0 = disable |||| |----- Fan 4: 1 = enable, 0 = disable The return packet will be: type = 0x40 | 0x10 = 0x50 = 8010 data_length = 0 If data[0] is not 0, then the CFA735+CFA-FBSCAB will start sending 0x81: Fan Speed Report packets for each enabled fan every 500 mS. (See 0x81: Fan Speed Report (CFA-FBSCAB Required) (Pg. 36).) Each of the report packets is staggered by 1/8 of a second. Reporting a fan will override the fan power setting to 100% for up to 1/8 of a second every 1/2 second. Please see Fan Connections in the CFA-FBSCAB Data Sheet) for a detailed description.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 46 17 (0x11): Set Fan Power (CFA-FBSCAB Required) This command will configure the power for the fan connectors. type = 0x11 = 1710 valid data_length is 4 data[0] = power level for FAN 1 (0-100 valid) data[1] = power level for FAN 2 (0-100 valid) data[2] = power level for FAN 3 (0-100 valid) data[3] = power level for FAN 4 (0-100 valid) The return packet will be: type = 0x40 | 0x11 = 0x51 =8110 data_length = 0 Set Fan Power is one of the items stored by the command 4 (0x04): Store Current State As Boot State (Pg. 39). 18 (0x12): Read WR-DOW-Y17 Temperature Sensors (CFA-FBSCAB Required) When power is applied to the CFA735+CFA-FBSCAB+WR-DOW-Y17 cable, it detects any devices (WR-DOW-Y17) connected to the Dallas Semiconductor 1-Wire (DOW) bus and stores the device’s information. This command will allow the host to read the device’s information. type = 0x12 = 1810 valid data_length is 1 data[0] = device index (0-15 valid) The return packet will be: type = 0x40 | 0x12 = 0x52 = 8210 data_length = 9 data[0] = device index (0-15 valid) data[1-8] = ROM ID of the device If data[1] is 0x22 (WR-DOW-Y17 temperature sensor), then that device can be set up to automatically convert and report the temperature every second. See the command 19 (0x13): Set Up WR-DOW-Y17 Temperature Reporting (CFA-FBSCAB Required) (Pg. 46). 19 (0x13): Set Up WR-DOW-Y17 Temperature Reporting (CFA-FBSCAB Required) This command will configure the CFA735+CFA-FBSCAB+WR-DOW-Y17 to report the temperature information to the host every second.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 47 type = 0x13 = 1910 valid data_length is 4 data[0-1] = 16-bit bitmaskindicating which temperature sensors are enabled to report (0-255 valid in each location) data[0] 08 07 06 05 04 03 02 01 Enable Reporting of sensor with device index of: | | | | | | | |-- 0: 1 = enable, 0 = disable | | | | | | |----- 1: 1 = enable, 0 = disable data[1] 16 15 14 13 12 11 10 09 Enable Reporting of sensor with device index of: | | | | | | | |-- 8: 1 = enable, 0 = disable | | | | | | |----- 9: 1 = enable, 0 = disable data[2] = 0 data[3] = 0 Sensor enabled must have been detected as a 0x28 (WR-DOW-Y17 temperature sensor) during DOW enumeration. This can be verified by using the command 18 (0x12): Read WR-DOW-Y17 Temperature Sensors (CFA-FBSCAB Required) (Pg. 46). The return packet will be: type = 0x40 | 0x13 = 0x53 = 8310 data_length = 0 23 (0x17): Configure Key Reporting By default, the CFA735 reports any key event to the host. This command allows the key events to be enabled or disabled on an individual basis. #define KP_UP 0x01 #define KP_ENTER 0x02 #define KP_CANCEL 0x04 #define KP_LEFT 0x08 #define KP_RIGHT 0x10 #define KP_DOWN 0x20 type = 0x17 = 23 data_length = 2 data[0]: press mask (valid 0-63 or Ox3F) data[1]: release mask The return packet will be: type = 0x40 | 0x17 = 0x57 = 8710 data_length = 0 Valid values of the mask are \\000-\\063. Configure Key Reporting is one of the items stored by the command 4 (0x04): Store Current State As Boot State (Pg. 39).
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 48 24 (0x18): Read Keypad, Polled Mode In some situations, it may be convenient for the host to poll the CFA735 for key activity. This command allows the host to detect which keys are currently pressed, which keys have been pressed since the last poll, and which keys have been released since the last poll. This command is independent of the key reporting masks set by command 23 (0x17): Configure Key Reporting (Pg. 47). All keys are always visible to this command. Typically both masks of command 23 would be set to "0" if the host is reading the keypad in polled mode. #define KP_UP 0x01 #define KP_ENTER 0x02 #define KP_CANCEL 0x04 #define KP_LEFT 0x08 #define KP_RIGHT 0x10 #define KP_DOWN 0x20 type = 0x18 = 24 data_length = 0 The return packet will be: type = 0x40 | 0x18 = 0x58 = 8810 data_length = 3 data[0] = bit mask showing the keys currently pressed data[1] = bit mask showing the keys that have been pressed since the last poll data[2] = bit mask showing the keys that have been released since the last poll 25 (0x19): Set Fan Power Fail-Safe (CFA-FBSCAB Required) The combination of the CFA735+CFA-FBSCAB can be used as part of an active cooling system. The fans can be slowed down to reduce noise when a system is idle or when the ambient temperature is low. The fans speed up when the system is under heavy load or the ambient temperature is high. Since there are a very large number of ways to control the speed of the fans (thresholds, thermostat, proportional, PID, multiple temperature sensors “contributing” to the speed of several fans . . .) there was no way to foresee the particular requirements of your system and include an algorithm in the CFA735’s firmware that would be an optimal fit for your application. Varying fan speeds under host software control gives the ultimate flexibility in system design but would typically have a fatal flaw: a host software or hardware failure could cause the cooling system to fail. If the fans were set at a slow speed when the host software failed, system components may be damaged due to inadequate cooling. The fan power fail-safe command allows host control of the fans without compromising safety. When the fan control software activates, it should set the fans that are under its control to fail-safe mode with an appropriate timeout value. If for any reason the host fails to update the power of the fans before the timeout expires, the fans previously set to fail- safe mode will be forced to 100% power. #define FAN_1 0x01 #define FAN_2 0x02 #define FAN_3 0x04 #define FAN_4 0x08 type = 0x19 = 25 data_length = 2 data[0] = bit mask of fans set to fail-safe (0-15 valid) data[1] = timeout value in 1/8 second ticks: 1 = 1/8 second 2 = 1/4 second 255 = 31 7/8 seconds
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 49 The return packet will be: type = 0x40 | 0x19 = 0x59 = 8910 data_length = 0 26 (0x1A): Set Fan Tachometer Glitch Delay (CFA-FBSCAB Required) The combination of the CFA735+CFA-FBSCAB+WR-FAN-X01 cable controls fan speed by using PWM. Using PWM turns the power to a fan on and off quickly to change the average power delivered to the fan. The CFA633 uses approximately 18 Hz for the PWM repetition rate. The fan’s tachometer output is only valid if power is applied to the fan. Most fans produce a valid tachometer output very quickly after the fan has been turned back on but some fans take time after being turned on before their tachometer output is valid. This command allows you to set a variable-length delay after the fan has been turned on before the CFA735 will recognize transitions on the tachometer line. The delay is specified in counts, each count being nominally 552.5 µS long (1/100 of one period of the 18 Hz PWM repetition rate). In practice, most fans will not need the delay to be changed from the default length of 1 count. If a fan’s tachometer output is not stable when its PWM setting is other than 100%, simply increase the delay until the reading is stable. Typically you would (1) start at a delay count of 50 or 100, (2) reduce it until the problem reappears, and then (3) slightly increase the delay count to give it some margin. Setting the glitch delay to higher values will make the RPM monitoring slightly more intrusive at low power settings. Also, the higher values will increase the lowest speed that a fan with RPM reporting enabled will “seek” at "0%" power setting. The Fan Glitch Delay is one of the items stored by the command 4 (0x04): Store Current State As Boot State (Pg. 39). type = 0x1A = 2610 data_length = 4 data[0] = delay count (1-100) of fan 1 data[1] = delay count (1-100) of fan 2 data[2] = delay count (1-100) of fan 3 data[3] = delay count (1-100) of fan 4 The return packet will be: type = 0x40 | 0x1A = 0x5A = 9010 data_length = 0 27 (0x1B): Query Fan Power & Fail-Safe Mask (CFA-FBSCAB Required) This command can be used to verify the current fan power and verify which fans are set to fail-safe mode. #define FAN_1 0x01 #define FAN_2 0x02 #define FAN_3 0x04 #define FAN_4 0x08 type = 0x1B = 2710 data_length = 0 The return packet will be: type = 0x40 | 0x1B = 0x5B = 9110 data_length = 5 data[0] = fan 1 power data[1] = fan 2 power data[2] = fan 3 power data[3] = fan 4 power data[4] = bit mask of fans with fail-safe set
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 50 28 (0x1C): Set ATX Power Switch Functionality The combination of the CFA735 with ATX can be used to replace the function of the power and reset switches in a standard ATX-compatible system. The ATX Power Switch Functionality is one of the items stored by the command 4 (0x04): Store Current State As Boot State (Pg. 39). The RESET (GPIO[3]) and POWER CONTROL (GPIO[2]) lines on the CFA735 with ATX are normally high-impedance. CONTROL lines, they are momentarily driven high or low (as determined by the RESET_INVERT and POWER_INVERT bits, detailed below). To end the power or reset pulse, the CFA735 with ATX changes the lines back to high-impedance. Note The GPIO pins used for ATX control must not be configured as user GPIO. The pins must be configured to their default drive mode in order for the ATX functions to work correctly. These settings are factory default but may be changed by the user. Please see command 34 (0x22): Set or Set and Configure GPIO Pin (Pg. 54). These settings must be saved as the boot state. To ensure that GPIO[1] will operate correctly as ATX SENSE, user GPIO[1] must be configured as: DDD = "011: 1=Resistive Pull Up, 0=Strong Drive Down”. F = "0: Port unused for user GPIO." This configuration can be assured by sending the following command: command = 34 length = 3 data[0] = 1 data[1] = 0 data[2] = 3 To ensure that GPIO[2] will operate correctly as ATX POWER, user GPIO[2] must be configured as: DDD = "010: Hi-Z, use for input". F = "0: Port unused for user GPIO." This configuration can be assured by sending the following command: command = 34 length = 3 data[0] = 2 data[1] = 0 data[2] = 2 To ensure that GPIO[3] will operate correctly as ATX RESET, user GPIO[3] must be configured as: DDD = "010: Hi-Z, use for input". F = "0: Port unused for user GPIO." This configuration can be assured by sending the following command: command = 34 length = 3 data[0] = 3 data[1] = 0 data[2] = 2 These settings must be saved as the boot state.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 51 FOUR FUNCTIONS ENABLED BY COMMAND 28 Function 1: KEYPAD_RESET If POWER-ON SENSE (GPIO[1]) is high, holding the green check key for 4 seconds will pulse RESET (GPIO[3]) pin for 1 second. During the 1-second pulse, the CFA735 will show RESET, and then the CFA735 will reset itself, showing its boot state as if it had just powered on. Once the pulse has finished, the CFA735 will not respond to any commands until after it has reset the host and itself. Function 2: KEYPAD_POWER_ON If POWER-ON SENSE (GPIO[1]) is low, pressing the green check key for 0.25 seconds will pulse POWER CONTROL (GPIO[2]) for the duration specified in data[1]. During this time the CFA735 will show POWER ON, then the CFA735 will reset itself. Function 3: KEYPAD_POWER_OFF If POWER-ON SENSE (GPIO[1]) is high, holding the red X key for 4 seconds will pulse POWER CONTROL (GPIO[2]) for the duration specified in data[1] If the user continues to hold the power key down, then the CFA735 will continue to drive the line for a maximum of 5 additional seconds. During this time the CFA735 will show POWER OFF. Function 4: LCD_OFF_IF_HOST_IS_OFF If LCD_OFF_IF_HOST_IS_OFF is set, the CFA735 will blank its screen and turn off its backlight to simulate its power being off any time POWER-ON SENSE (GPIO[1]) is low. The CFA735 will still be active (since it is powered by VSB), monitoring the keypad for a power-on keystroke. If +12v remains active (which would not be expected, since the host is “off”), the fans will remain on at their previous settings. Once POWER-ON SENSE (GPIO[1]) goes high, the CFA735 will reboot as if power had just been applied to it. #define AUTO_POLARITY 0x01 //Automatically detects polarity for reset and //power (recommended) #define RESET_INVERT 0x02 //Reset pin drives high instead of low (disregard //if AUTO_POLARITY) #define POWER_INVERT 0x04 //Power pin drives high instead of low (disregard //if AUTO_POLARITY) #define LEDS_FOLLOW_MODULE_LOOK 0x08 // Turn off the LEDs also if the host is off //(ignored if MODULE_LOOK_FOLLOWS_HOST is not set) #define MODULE_LOOK_FOLLOWS_HOST 0x10 // Turn off the LCD if the Host is off #define KEYPAD_RESET 0x20 #define KEYPAD_POWER_ON 0x40 #define KEYPAD_POWER_OFF 0x80 type = 0x1C = 28 data_length = 1 or 2 data[0]: bit mask of enabled functions data[1]: (optional) length of power on & off pulses in 1/32 second increments 1 = 1/32 sec 2 = 1/16 sec 16 = 1/2 sec 254 = 7.9 sec 255 = Hold until power sense change or 8 sec, whichever is shorter (default) The return packet will be: type = 0x40 | 0x1C = 0x5C = 9210 data_length = 0
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 52 29 (0x1D): Enable/Disable and Reset the Watchdog Some systems use hardware watchdog timers to ensure that a software or hardware failure does not result in an extended system outage. Once the host system has booted, a system monitor program is started. The system monitor program would enable the watchdog timer on the CFA735 with ATX (CFA735+WR-PWR-Y25). If the system monitor program fails to reset the watchdog timer, the CFA735 with ATX will reset the host system and soft reboot as if command 5 (0x05): Reset Functions (Pg. 40) soft reboot function was issued. type = 0x1D = 2910 data_length = 1 data[0] = enable/timeout If timeout is 0, the watchdog is disabled. If timeout is 1-255, then this command must be issued again within timeout seconds to avoid a watchdog reset. To turn the watchdog off once it has been enabled, simply set timeout to 0. If the command is not re-issued within timeout seconds, then the CFA735 with ATX will reset the host system (see command 28 (0x1C): Set ATX Power Switch Functionality (Pg. 50) for details) and soft reboot itself as if command 5 (0x05): Reset Functions (Pg. 40) soft reboot function was issued. Since the watchdog is off by default when the it powers up,CFA735 with ATX will not issue another host reset until the host has once again enabled the watchdog. The return packet will be: type = 0x40 | 0x1D = 0x5D = 9310 data_length = 0 30 (0x1E): Read Reporting & Status This command can be used to verify the current items configured to report to the host, as well as some other miscellaneous status information. type = 0x1E = 3010 data_length = 0 Note The GPIO pins used for ATX control must not be configured as user GPIO. They must be configured to their default drive mode in order for the ATX functions to work correctly. These settings are factory default, but may be changed by the user. Please see the note under command 28 (0x1C): Set ATX Power Switch Functionality (Pg. 50) or command 34 (0x22): Set or Set and Configure GPIO Pin (Pg. 54).
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 53 The return packet will be: type = 0x40 | 0x1E = 0x5E = 9410 data_length = 15 data[0] = Fan 1-4 reporting status (as set by command 16) data[1] = Temperatures 1-8 reporting status (as set by command 19) data[2] = Temperatures 9-16 reporting status (as set by command 19) data[3] = 0 data[4] = 0 data[5] = Key presses (as set by command 23 data[6] = Key releases (as set by command 23) data[7] = ATX Power Switch Functionality (as set by command 28) data[8] = Current watchdog counter (as set by command 29) data[9] = Fan RPM glitch delay[0] (as set by command 26) data[10] = Fan RPM glitch delay[1] (as set by command 26) data[11] = Fan RPM glitch delay[2] (as set by command 26) data[12] = Fan RPM glitch delay[3] (as set by command 26) data[13] = Contrast setting (as set by command 13) data[14] = Backlights setting (as set by command 14) Please Note: Future firmware revisions may return fewer or additional bytes 31 (0x1F): Send Data to LCD This command allows data to be placed at any position on the LCD. type = 0x1F = 3110 data_length = 3 to 22 data[0]: col = x = 0 to 19 data[1]: row = y = 0 to 3 data[2-21]: text to place on the LCD, variable from 1 to 20 characters The return packet will be: type = 0x40 | 0x1F = 0x5F = 9510 data_length = 0 Send Data to LCD is one of the items stored by the command 4 (0x04): Store Current State As Boot State (Pg. 39). 33 (0x21): Set Baud Rate This command will set the baud rate of the CFA735 serial interface. This command does not affect the USB interface. The CFA735 will send the acknowledge packet for this command and change its baud rate to the new value. The host should send the baud rate command, wait for a positive acknowledge from the CFA735 at the old baud rate, and then switch itself to the new baud rate. The baud rate must be saved by the command 4 (0x04): Store Current State As Boot State (Pg. 39) if you want the CFA735 to power up at the new baud rate. The factory default baud rate is 115200. type = 0x21 = 3310 data_length = 1 data[0]: 0 = 19200 baud 1 = 115200 baud 2 = 9600 baud The return packet will be: type = 0x40 | 0x21 = 0x61 = 9710 data_length = 0
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 54 34 (0x22): Set or Set and Configure GPIO Pin The CFA735 has five pins for user-definable general purpose input / output (GPIO). These pins are shared with the ATX functions. Be careful when you configure the GPIO if you want to use the ATX at the same time. The architecture of the CFA735 allows great flexibility in the configuration of the GPIO pins. They can be set as input or output. They can output constant high or low signals or a variable duty cycle 100 Hz PWM signal. In output mode using the PWM (and a suitable current limiting resistor), an LED may be turned on or off and even dimmed under host software control. With suitable external circuitry, the GPIOs can also be used to drive external logic or power transistors. The CFA735 continuously polls the GPIOs as inputs at 32 Hz. The present level can be queried by the host software at a lower rate. The CFA735 also keeps track of whether there were rising or falling edges since the last host query (subject to the resolution of the 32 Hz sampling). This means that the host is not forced to poll quickly in order to detect short events. The algorithm used by the CFA735 to read the inputs is inherently “debounced”. The GPIOs also have “pull-up” and “pull-down” modes. These modes can be useful when using the GPIO as an input connected to a switch since no external pull-up or pull-down resistor is needed. For instance, the GPIO can be set to pull up. Then when a switch connected between the GPIO and ground is open, reading the GPIO will return a "1". When the switch is closed, the input will return a "0". Pull-up/pull-down resistance values are approximately 40kΩ. Typical GPIO current limits when sinking or sourcing all five GPIO pins simultaneously are 8 mA. If you need more information, please see the ST-Micro STM32F103 datasheet. The GPIO configuration is one of the items stored by the command 4 (0x04): Store Current State As Boot State (Pg. 39). Note The GPIO pins may also be used for ATX control through the H1 connector using the Crystalfontz cable WR- PWR-Y25. By factory default, the GPIO output setting, function, and drive mode are set correctly to enable operation of the ATX function. The GPIO output setting, function, and drive mode must be set to the correct values in order for the ATX function to function properly. The 635_WinTest may be used to easily check and reset the GPIO configuration to the default state so the ATX and DOW functions will work. Unlike the CFA635+SCAB, the CFA735+ CFA-FBSCAB (System Cooling Accessory Board) has no ATX functionality provided through the CFA-FBSCAB. ATX control is available using the H1 connector on the CFA735.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 55 type: 0x22 = 3410 data_length: 2 bytes to change value only 3 bytes to change value and configure function and drive mode data[0]: index of GPIO/GPO to modify 0 = GPIO[0] = H1, Pin 11 1 = GPIO[1] = H1, Pin 12 (default is ATX Host Power Sense) 2 = GPIO[2] = H1, Pin 9 (default is ATX Host Power Control) 3 = GPIO[3] = H1, Pin 10 (default is ATX Host Reset Control) 4 = GPIO[4] = H1, Pin 13 5 = GPO[ 5] = LED 3 (bottom) green die 6 = GPO[ 6] = LED 3 (bottom) red die 7 = GPO[ 7] = LED 2 green die 8 = GPO[ 8] = LED 2 red die 9 = GPO[ 9] = LED 1 green die 10 = GPO[10] = LED 1 red die 11 = GPO[11] = LED 0 (top) green die 12 = GPO[12] = LED 0 (top) red die 13-255 = not accessible Please note: Future revisions of this command on future hardware modules may accept addi- tional values for data[0], which would control the state of future additional GPIO pins. data[1] = Pin output state (actual behavior depends on drive mode): 0 = Output set to low 1-99 = Output duty cycle percentage (100 Hz nominal) 100 = Output set to high 101-254 = invalid data[2] = Pin function select and drive mode (optional, 0-15 valid except for 6 and 14) 0 Only meaningful for GPIOs (index 0-4). GPOs (index of 5-12) will ignore. ---- FDDD |||| ||||-- DDD = Drive Mode (based on output state of 1 or 0) |||| | 000: 1=Strong Drive Up, 0=Resistive Pull Down |||| | 001: 1=Strong Drive Up, 0=Strong Drive Down |||| | 010: Hi-Z, use for input |||| | 011: 1=Resistive Pull Up, 0=Strong Drive Down |||| | 100: 1=Strong Drive Up, 0=Hi-Z |||| | 101: 1=Strong Drive Up, 0=Strong Drive Down |||| | 110: reserved, do not use -- error returned |||| | 111: 1=Hi-Z,0=Strong Drive Down |||| |----- F = Function (only valid for GPIOs, index of 0-4) |||| 0: Port unused for GPIO. It will take on the default |||| function such as ATX or unused. The user is |||| responsible for setting the drive to the correct |||| value in order for the default function to work |||| correctly. |||| 1: Port used for GPIO under user control. The user is |||| responsible for setting the drive to the correct |||| value in order for the desired GPIO mode to work |||| correctly. The return packet will be: type = 0x40 | 0x22 = 0x62 = 9810 data_length = 0
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 56 35 (0x23): Read GPIO and GPO Pin Levels and Configuration State Please see command 34 (0x22): Set or Set and Configure GPIO Pin (Pg. 54) for details on the GPIO and GPO architecture. type: 0x23 = 3510 data_length: 1 data[0]: index of GPIO to query 0 = GPIO[0] = H1, Pin 11 1 = GPIO[1] = H1, Pin 12 (default is ATX Host Power Sense) 2 = GPIO[2] = H1, Pin 9 (default is ATX Host Power Control) 3 = GPIO[3] = H1, Pin 10 (default is ATX Host Reset Control) 4 = GPIO[4] = H1, Pin 13 5 = GPO[ 5] = LED 3 (bottom) green die 6 = GPO[ 6] = LED 3 (bottom) red die 7 = GPO[ 7] = LED 2 green die 8 = GPO[ 8] = LED 2 red die 9 = GPO[ 9] = LED 1 green die 10 = GPO[10] = LED 1 red die 11 = GPO[11] = LED 0 (top) green die 12 = GPO[12] = LED 0 (top) red die 13-255 = not accessible Please note: Future revisions of this command on future hardware modules may accept addi- tional values for data[0], which would return the status of future additional GPIO/GPO pins. The return packet will be: type = 0x40 | 0x23 = 0x63 = 9910 data_length = 4
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 57 data[0] = index of GPIO to read data[1] = Pin state & changes since last poll Only useful for GPIOs (index 0-4). GPOs (index of 5-12) will return 0. ---- -RFS Enable Reporting of this Fan’s Tach Input |||| ||||-- S = state at the last reading |||| |||--- F = at least one falling edge has |||| || been detected since the last poll |||| ||---- R = at least one rising edge has |||| | been detected since the last poll (This reading is the actual pin state, which may or may not agree with the pin setting, depending on drive mode and the load presented by external circuitry. The pins are polled at approximately 32 Hz asynchronously with respect to this command. Transients that happen between polls will not be detected.) data[2] = Requested Pin level/PWM level 0-100: Output duty cycle percentage (This value is the requested PWM duty cycle. The actual pin may or may not be toggling in agreement with this value, depending on the drive mode and the load presented by external circuitry) data[3] = Pin function select and drive mode ---- FDDD |||| | 000: 1=Strong Drive Up, 0=Resistive Pull Down |||| | 001: 1=Strong Drive Up, 0=Strong Drive Down |||| | 010: Hi-Z, use for input |||| | 011: 1=Resistive Pull Up, 0=Strong Drive Down |||| | 100: 1=Strong Drive Up, 0=Hi-Z |||| | 101: 1=Strong Drive Up, 0=Strong Drive Down |||| | 111: 1=Hi-Z, 0=Strong Drive Down |||| Only meaningful for GPIOs (index 0-4). GPOs (index of 5-12) will return 0 |||| 0: Port unused for GPIO. It will take on the default |||| function such as ATX or unused. The user is |||| responsible for setting the drive to the correct |||| value in order for the default function to work |||| correctly. |||| 1: Port used for GPIO under user control. The user is |||| responsible for setting the drive to the correct |||| value in order for the desired GPIO mode to work |||| correctly.
a byte with the value of 137 to the display, then a superscript "9" will be shown. Figure 17. Character Generator
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 59 MODULE RELIABILITY AND LONGEVITY MODULE RELIABILITY We work to continuously improve our products, including backlights that are brighter and last longer. Slight color variations from module to module and batch to batch are normal. MODULE LONGEVITY (EOL / REPLACEMENT POLICY) Crystalfontz is committed to making all of our LCD modules available for as long as possible. Occasionally, a supplier discontinues a component, or a process used to make the module becomes obsolete, or the process moves to a more modern manufacturing line. In order to continue making the module, we will do our best to find an acceptable replacement part or process which will make the “replacement” fit, form, and function compatible with its predecessor. We recognize that discontinuing a module may cause problems for some customers. However, rapidly changing technologies, component availability, or low customer order levels may force us to discontinue (“End of Life”, EOL) a module. For example, we must occasionally discontinue a module when a supplier discontinues a component or a manufacturing process becomes obsolete. When we discontinue a module, we will do our best to find an acceptable replacement module with the same fit, form, and function. In most situations, you will not notice a difference when comparing a “fit, form, and function” replacement module to the discontinued module it replaces. However, sometimes a change in component or process for the replacement module results in a slight variation, perhaps an improvement, over the previous design. Although the replacement module is still within the stated Data Sheet specifications and tolerances of the discontinued module, changes may require modification to your circuit and/or firmware. Possible changes include: ITEM RELIABILITY SPECIFICATION LCD portion (excluding keypad, status LEDs, and backlights) 50,000 to 100,000 hours Keypad 1,000,000 keystrokes Bicolor LED status lights 50,000 to 100,000 hours CFA735-TFK-Kx (white LED display backlight and white LED keypad back- light) Power-On Hours % of Initial Brightness (New Module) 10,000 hours >90% <50,000 hours >50% CFA735-TML-Kx (white LED display backlight and blue LED keypad back- light) Power-On Hours % of Initial Brightness (New Module) <10,000 >90% <50,000 >50% CFA735-YYK-Kx (yellow-green LED display backlight and yellow-green LED keypad backlight) 50,000 to 100,000 hours Note: For modules with white LED backlights (CFA735-TFK-Kx and CFA735-TML-Kx), adjust backlight brightness so the display is readable but not too bright. Dim or turn off the backlight during periods of inactivity to conserve the white LED backlight life- time. Note: Values listed above are approximate and represent typical lifetime.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 60 Backlight LEDs. Brightness may be affected (perhaps the new LEDs have better efficiency) or the current they draw may change (new LEDs may have a different VF). Controller. A new controller may require minor changes in your code. Component tolerances. Module components have manufacturing tolerances. In extreme cases, the tolerance stack can change the visual or operating characteristics. Please understand that we avoid changing a module whenever possible; we only discontinue a module if we have no other option. We post Part Change Notices (PCN) on the product's website page as soon as possible. If interested, you can subscribe to future part change notifications.
For optimum operation of the module and to prolong its life, please follow the precautions described below. fingers on either side of the label. Figure 18. Handling Caution to Avoid Damaging Flat Flex Cable When not in use, always verify that the microSD card socket is in the closed and LOCKED position. If you press here, you may damage the connection. Bent FFC (Flat Flex Cable) is under the label.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 62 ESD (ELECTRO-STATIC DISCHARGE) SPECIFICATIONS The circuitry is industry standard CMOS logic and is susceptible to ESD damage. Please use industry standard antistatic precautions as you would for any other static sensitive devices such as expansion cards, motherboards, or integrated circuits. Ground your body, work surfaces, and equipment. DESIGN AND MOUNTING When handling the CFA735-xxx-KR,use care so as to not press on the exposed FFC with excess force. See Location of Connectors (Pg. 27). The exposed surface of the LCD “glass” is actually a polarizer laminated on top of the glass. To protect the polarizer from damage, the module ships with a protective film over the polarizer. Please peel off the protective film slowly. Peeling off the protective film abruptly may generate static electricity. The polarizer is made out of soft plastic and is easily scratched or damaged. When handling the module, avoid touching the polarizer. Finger oils are difficult to remove. To protect the soft plastic polarizer from damage, place a transparent plate (for example, acrylic, polycarbonate, or glass) in front of the module, leaving a small gap between the plate and the display surface. We recommend HP-92 Lexan, which is readily available and works well. Allow adequate space for the flex at the bottom of the module. If flex is creased, module may be permanently damaged. For USB interface, keep the micro-B USB cable connector parallel to the CFA735 when plugging or unplugging the cable. Do not lift or pull up on the cable. Too much pressure may permanently damage the CFA735’s micro- B USB connector. Do not disassemble or modify the module. Do not modify the five tabs of the metal bezel or make connections to them. Do not reverse polarity to the power supply connections. Reversing polarity will immediately ruin the module. AVOID SHOCK, IMPACT, TORQUE, OR TENSION Do not expose the module to strong mechanical shock, impact, torque, or tension. Do not drop, toss, bend, or twist the module. Do not place weight or pressure on the module. IF LCD PANEL BREAKS If the module is severely damaged and the LCD panel breaks, be careful to not get the liquid crystal fluid in your mouth or eyes. If the liquid crystal fluid touches your skin, clothes, or work surface, wash it off immediately using soap and plenty of water. HOW TO CLEAN The polarizer (laminated to the glass) is soft plastic. The soft plastic is easily scratched or damaged. Damage will be especially obvious on a negative image module (a module that appear dark when power is “off”). Be very careful when you clean the polarizer. The polarizer will eventually become hazy if you do not take great care when cleaning it. Long contact with moisture (from condensation or cleaning) may permanently spot or stain the polarizer.Do not clean the polarizer with liquids. Do not wipe the polarizer with any type of cloth or swab (for example, Q-tips).
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 63 Use the removable protective film to remove smudges (for example, fingerprints) and any foreign matter. If you no longer have the protective film, use standard transparent office tape (for example, Scotch® brand “Crystal Clear Tape”). If the polarizer is dusty, you may carefully blow it off with clean, dry, oil-free compressed air. OPERATION Your circuit should be designed to protect the module from ESD and power supply transients. Observe the operating temperature limitations: a minimum of -20°C to a maximum of 70°C noncondensing with minimal fluctuation. Operation outside of these limits may shorten life and/or harm display. At lower temperatures of this range, response time is delayed. At higher temperatures of this range, display becomes dark. You may need to adjust the contrast. Operate away from dust, moisture, and direct sunlight. For modules with white LED backlights (CFA735-TFK-Kx and CFA735-TML-Kx), adjust backlight brightness so the display is readable but not too bright. Dim or turn off the backlight during periods of inactivity to conserve the white LED backlight lifetime. STORAGE AND RECYCLING Store in an ESD-approved container away from dust, moisture, and direct sunlight with humidity less than 90% noncondensing. Observe the storage temperature limitations: a minimum of -30°C minimum to +80°C non-condensing maximum with minimal fluctuations. Rapid temperature changes can cause moisture to form, resulting in permanent damage. Do not allow weight to be placed on the modules while they are in storage. Please recycle your outdated Crystalfontz modules at an approved facility.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 64 APPENDIX A: QUALITY ASSURANCE STANDARDS INSPECTION CONDITIONS Environment Temperature: 25±5°C Humidity: 30~85% RH For visual inspection of active display area Source lighting: two 20 Watt or one 40 Watt fluorescent light Display adjusted for best contrast Viewing distance: 30±5 cm (about 12 inches) Viewable angle: inspect at 45° angle of vertical line right and left, top and bottom COLOR DEFINITIONS We try to describe the appearance of our modules as accurately as possible. For the photos, we adjust for optimal appearance. Actual display appearance may vary due to (1) different operating conditions, (2) small variations of component tolerances, (3) inaccuracies of our camera, (4) color interpretation of the photos on your monitor, and/or (5) personal differences in the perception of color.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 65 DEFINITION OF ACTIVE AREA AND VIEWING AREA ACCEPTANCE SAMPLING DEFECTS CLASSIFICATION Defects are defined as: Major Defect: results in failure or substantially reduces usability of unit for its intended purpose Minor Defect: deviates from standards but is not likely to reduce usability for its intended purpose ACCEPTANCE STANDARDS DEFECT TYPE AQL* Major < 0.65% Minor < 1.00% *Acceptable Quality Level: maximum allowable error rate or variation from standard # DEFECT TYPE CRITERIA MAJOR / MINOR 1 Electrical defects 1. No display, displa y malfunctions, or shorted segments. 2. Current consumption exceeds specifications. Major 2 Viewing area defect Viewing area does not meet specifications. (See Inspection Conditions (Pg. 64). Major
3 Contrast adjustment
defect Contrast adjustment fails or malfunctions. Major 27.5 VA 22.38 AA
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 66
4 Blemishes or foreign
Defect Size (mm) Acceptable Qty Minor 0.3 3 <2 defects within 10 mm of each other
5 Other blemishes or for-
Defect Size (mm) Acceptable Qty Minor
0.15 Ignore
0.15 to 0.20 3 0.20 to 0.25 2 0.25 to 0.30 1
6 Dark lines or scratches
Defect Width (mm) Defect Length (mm) Acceptable Qty Minor <0.03 < 3.0 3 0.03 to 0.05 < 2.0 2 0.05 to 0.08 < 2.0 1 0.08 to 0.10 ≤3.0 0 >0.10 >3.0 0
7 Bubbles between polarizer film and glass Defect Size (mm) Acceptable Qty
<0.20 Ignore 0.20 to 0.40 3 0.40 to 0.60 2 >0.60 0
8 Display pattern defect
# DEFECT TYPE CRITERIA MAJOR / MINOR Blemish Width Length Defect size = (A + B)/2 Width Length D A BC EF G Dot Size (mm) Acceptable Qty ((A+B)/2)<0.2 <3 total defects <2 pinholes per digit C>0 ((D+E)/2)<0.25 ((F+G)/2)<0.25
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 67 9 Backlight defects 1. Light fails or flickers.* 2. Color and luminance do not correspond to specifications.* 3. Exceeds standards for display’s blemishes or foreign matter (see test 5, Pg. 66), and dark lines or scratches (see test 6, Pg. 66). *Minor if display functions correctly. Major if the display fails. Minor 10 COB defects 1. Pinholes >0.2 mm. 2. Seal surface has pinholes through to the IC. 3. More than 3 locations of sealant beyond 2 mm of the sealed areas. Minor 11 PCB defects 1. Oxidation or contamination on connectors.* 2. Wrong parts, missing parts, or parts not in specification.* 3. Jumpers set incorrectly. 4. Solder (if any) on bezel, LED pad, zebra pad, or screw hole pad is not smooth. *Minor if display functions correctly. Major if the display fails. Minor 12 Soldering defects 1. Unmelted solder paste. 2. Cold solder joints, missing solder connections, or oxidation.* 3. Solder bridges causing short circuits.* 4. Solder balls. *Minor if display functions correctly. Major if the display fails. Minor # DEFECT TYPE CRITERIA MAJOR / MINOR
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 68 APPENDIX B: DEMONSTRATION SOFTWARE AND SAMPLE CODE DRIVERS WHQL and non-WHQL drivers are here: www.crystalfontz.com/software/CFA735USBDRIVER.html. See http://lcdproc.omnipotent.net/hardware.php3 for Linux LCD drivers. LCDproc is an open source project that supports many of the Crystalfontz displays. The CFA635 driver should work with the CFA735. DEMONSTRATION SOFTWARE We encourage you to use the free sample code listed below. Please leave the original copyrights in the code. Windows compatible test/demonstration program and source. CFA735 uses CFA635 emulation. www.crystalfontz.com/product/635WinTest Linux compatible command-line demonstration program with C source code. 8K. It will show as /dev/ttyACMx instead of /dev/ttyUSBx. www.crystalfontz.com/product/linux_cli_examples.html Supported by CC2 (CrystalControl2) freeware. www.crystalfontz.com/product/CrystalControl2.html ALGORITHMS TO CALCULATE THE CRC Below are eight sample algorithms that will calculate the CRC of a CFA735 packet. Some of the algorithms were contributed by forum members and originally written for the CFA631. The CRC used in the CFA735 is the same one that is used in IrDA, which came from PPP, which seems to be related to a CCITT (ref: Network Working Group Request for Comments: 1171) standard. At that point, the trail was getting a bit cold and diverged into several referenced articles and papers, dating back to 1983. The polynomial used is X16 + X12 + X5 + X0 (0x8408) The result is bit-wise inverted before being returned. Algorithm 1: “C” Table Implementation This algorithm is typically used on the host computer, where code space is not an issue. //This code is from the IRDA LAP documentation, which appears to //have been copied from PPP: // http://irda.affiniscape.com/associations/2494/files/Specifications/ IrLAP11_Plus_Errata.zip //I doubt that there are any worries about the legality of this code, //searching for the first line of the table below, it appears that //the code is already included in the linux 2.6 kernel "Driver for //ST5481 USB ISDN modem". This is an "industry standard" algorithm //and I do not think there are ANY issues with it at all. typedef unsigned char ubyte; typedef unsigned short word; word get_crc(ubyte *bufptr,word len) //CRC lookup table to avoid bit-shifting loops. static const word crcLookupTable[256] =
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 69 {0x00000,0x01189,0x02312,0x0329B,0x04624,0x057AD,0x06536,0x074BF, 0x08C48,0x09DC1,0x0AF5A,0x0BED3,0x0CA6C,0x0DBE5,0x0E97E,0x0F8F7, 0x01081,0x00108,0x03393,0x0221A,0x056A5,0x0472C,0x075B7,0x0643E, 0x09CC9,0x08D40,0x0BFDB,0x0AE52,0x0DAED,0x0CB64,0x0F9FF,0x0E876, 0x02102,0x0308B,0x00210,0x01399,0x06726,0x076AF,0x04434,0x055BD, 0x0AD4A,0x0BCC3,0x08E58,0x09FD1,0x0EB6E,0x0FAE7,0x0C87C,0x0D9F5, 0x03183,0x0200A,0x01291,0x00318,0x077A7,0x0662E,0x054B5,0x0453C, 0x0BDCB,0x0AC42,0x09ED9,0x08F50,0x0FBEF,0x0EA66,0x0D8FD,0x0C974, 0x04204,0x0538D,0x06116,0x0709F,0x00420,0x015A9,0x02732,0x036BB, 0x0CE4C,0x0DFC5,0x0ED5E,0x0FCD7,0x08868,0x099E1,0x0AB7A,0x0BAF3, 0x05285,0x0430C,0x07197,0x0601E,0x014A1,0x00528,0x037B3,0x0263A, 0x0DECD,0x0CF44,0x0FDDF,0x0EC56,0x098E9,0x08960,0x0BBFB,0x0AA72, 0x06306,0x0728F,0x04014,0x0519D,0x02522,0x034AB,0x00630,0x017B9, 0x0EF4E,0x0FEC7,0x0CC5C,0x0DDD5,0x0A96A,0x0B8E3,0x08A78,0x09BF1, 0x07387,0x0620E,0x05095,0x0411C,0x035A3,0x0242A,0x016B1,0x00738, 0x0FFCF,0x0EE46,0x0DCDD,0x0CD54,0x0B9EB,0x0A862,0x09AF9,0x08B70, 0x08408,0x09581,0x0A71A,0x0B693,0x0C22C,0x0D3A5,0x0E13E,0x0F0B7, 0x00840,0x019C9,0x02B52,0x03ADB,0x04E64,0x05FED,0x06D76,0x07CFF, 0x09489,0x08500,0x0B79B,0x0A612,0x0D2AD,0x0C324,0x0F1BF,0x0E036, 0x018C1,0x00948,0x03BD3,0x02A5A,0x05EE5,0x04F6C,0x07DF7,0x06C7E, 0x0A50A,0x0B483,0x08618,0x09791,0x0E32E,0x0F2A7,0x0C03C,0x0D1B5, 0x02942,0x038CB,0x00A50,0x01BD9,0x06F66,0x07EEF,0x04C74,0x05DFD, 0x0B58B,0x0A402,0x09699,0x08710,0x0F3AF,0x0E226,0x0D0BD,0x0C134, 0x039C3,0x0284A,0x01AD1,0x00B58,0x07FE7,0x06E6E,0x05CF5,0x04D7C, 0x0C60C,0x0D785,0x0E51E,0x0F497,0x08028,0x091A1,0x0A33A,0x0B2B3, 0x04A44,0x05BCD,0x06956,0x078DF,0x00C60,0x01DE9,0x02F72,0x03EFB, 0x0D68D,0x0C704,0x0F59F,0x0E416,0x090A9,0x08120,0x0B3BB,0x0A232, 0x05AC5,0x04B4C,0x079D7,0x0685E,0x01CE1,0x00D68,0x03FF3,0x02E7A, 0x0E70E,0x0F687,0x0C41C,0x0D595,0x0A12A,0x0B0A3,0x08238,0x093B1, 0x06B46,0x07ACF,0x04854,0x059DD,0x02D62,0x03CEB,0x00E70,0x01FF9, 0x0F78F,0x0E606,0x0D49D,0x0C514,0x0B1AB,0x0A022,0x092B9,0x08330, 0x07BC7,0x06A4E,0x058D5,0x0495C,0x03DE3,0x02C6A,0x01EF1,0x00F78}; register word newCrc; newCrc=0xFFFF; //This algorithm is based on the IrDA LAP example. while(len--) newCrc = (newCrc >> 8) ^ crcLookupTable[(newCrc ^ *bufptr++) & 0xff]; //Make this crc match the one’s complement that is sent in the packet. return(~newCrc); Algorithm 2: “C” Bit Shift Implementation This algorithm was mainly written to avoid any possible legal issues about the source of the routine (at the request of the LCDproc group). This routine was “clean” coded from the definition of the CRC. It is ostensibly smaller than the table driven approach but will take longer to execute. This routine is offered under the GPL. typedef unsigned char ubyte; typedef unsigned short word; word get_crc(ubyte *bufptr,word len) register unsigned int newCRC; //Put the current byte in here. ubyte data; int bit_count; //This seed makes the output of this shift based algorithm match //the table based algorithm. The center 16 bits of the 32-bit //"newCRC" are used for the CRC. The MSb of the lower byte is used //to see what bit was shifted out of the center 16 bit CRC //accumulator ("carry flag analog");
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 70 newCRC=0x00F32100; while(len--) //Get the next byte in the stream. data=*bufptr++; //Push this byte’s bits through a software //implementation of a hardware shift & xor. for(bit_count=0;bit_count<=7;bit_count++) //Shift the CRC accumulator newCRC>>=1; //The new MSB of the CRC accumulator comes //from the LSB of the current data byte. if(data&0x01) newCRC|=0x00800000; //If the low bit of the current CRC accumulator was set //before the shift, then we need to XOR the accumulator //with the polynomial (center 16 bits of 0x00840800) if(newCRC&0x00000080) newCRC^=0x00840800; //Shift the data byte to put the next bit of the stream //into position 0. data>>=1; //All the data has been done. Do 16 more bits of 0 data. for(bit_count=0;bit_count<=15;bit_count++) //Shift the CRC accumulator newCRC>>=1; //If the low bit of the current CRC accumulator was set //before the shift we need to XOR the accumulator with //0x00840800. if(newCRC&0x00000080) newCRC^=0x00840800; //Return the center 16 bits, making this CRC match the one’s //complement that is sent in the packet. return((~newCRC)>>8); Algorithm 2B: “C” Improved Bit Shift Implementation This is a simplified algorithm that implements the CRC.
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 71 unsigned short get_crc(unsigned char count,unsigned char *ptr) unsigned short crc; //Calculated CRC unsigned char i; //Loop count, bits in byte unsigned char data; //Current byte being shifted crc = 0xFFFF; // Preset to all 1's, prevent loss of leading zeros while(count--) data = *ptr++; i = 8; do if((crc ^ data) & 0x01) crc >>= 1; crc ^= 0x8408; else crc >>= 1; data >>= 1; } while(--i != 0); return (~crc); Algorithm 3: “PIC Assembly” Bit Shift Implementation This routine was graciously donated by one of our customers, orignally for the CFA635. ; Crystalfontz CFA735 PIC CRC Calculation Example ; This example calculates the CRC for the hard coded example provided ; in the documentation. ; It uses "This is a test. " as input and calculates the proper CRC ; of 0x93FA. #include "p16f877.inc" ; CRC16 equates and storage accuml equ 40h ; BYTE - CRC result register high byte accumh equ 41h ; BYTE - CRC result register high low byte datareg equ 42h ; BYTE - data register for shift j equ 43h ; BYTE - bit counter for CRC 16 routine Zero equ 44h ; BYTE - storage for string memory read index equ 45h ; BYTE - index for string memory read savchr equ 46h ; BYTE - temp storage for CRC routine seedlo equ 021h ; initial seed for CRC reg lo byte seedhi equ 0F3h ; initial seed for CRC reg hi byte
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 72 polyL equ 008h ; polynomial low byte polyH equ 084h ; polynomial high byte ; CRC Test Program org 0 ; reset vector = 0000H clrf PCLATH ; ensure upper bits of PC are cleared clrf STATUS ; ensure page bits are cleared goto main ; jump to start of program ; ISR Vector org 4 ; start of ISR goto $ ; jump to ISR when coded org 20 ; start of main program main movlw seedhi ; setup intial CRC seed value. movwf accumh ; This must be done prior to movlw seedlo ; sending string to CRC routine. movwf accuml ; clrf index ; clear string read variables main1 movlw HIGH InputStr ; point to LCD test string movwf PCLATH ; latch into PCL movfw index ; get index call InputStr ; get character movwf Zero ; setup for terminator test movf Zero,f ; see if terminator btfsc STATUS,Z ; skip if not terminator goto main2 ; else terminator reached, jump out of loop call CRC16 ; calculate new crc call SENDUART ; send data to LCD incf index,f ; bump index goto main1 ; loop main2 movlw 00h ; shift accumulator 16 more bits. call CRC16 ; This must be done after sending movlw 00h ; string to CRC routine. call CRC16 ; comf accumh,f ; invert result comf accuml,f ; movfw accuml ; get CRC low byte call SENDUART ; send to LCD movfw accumh ; get CRC hi byte call SENDUART ; send to LCD stop goto stop ; word result of 0x93FA is in accumh/accuml ; calculate CRC of input byte CRC16 movwf savchr ; save the input character movwf datareg ; load data register movlw .8 ; setup number of bits to test movwf j ; save to incrementor _loop clrc ; clear carry for CRC register shift rrf datareg,f ; perform shift of data into CRC register rrf accumh,f ; rrf accuml,f ; btfss STATUS,C ; skip jump if if carry goto _notset ; otherwise goto next bit
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 73 movlw polyL ; XOR poly mask with CRC register xorwf accuml,F ; movlw polyH ; xorwf accumh,F ; _notset decfsz j,F ; decrement bit counter goto _loop ; loop if not complete movfw savchr ; restore the input character return ; return to calling routine ; USER SUPPLIED Serial port transmit routine SENDUART return ; put serial xmit routine here ; test string storage org 0100h InputStr addwf PCL,f dt 7h,10h,"This is a test. ",0 end Algorithm 4: “Visual Basic” Table Implementation Visual BASIC has its own challenges as a language (such as initializing static arrays), and it is also challenging to use Visual BASIC to work with “binary” (arbitrary length character data possibly containing nulls—such as the “data” portion of the CFA735 packet) data. This routine was adapted from the C table implementation. The complete project can be found in our forums. 'This program is brutally blunt. Just like VB. No apologies. 'Written by Crystalfontz America, Inc. 2004 http://www.crystalfontz.com 'Free code, not copyright copyleft or anything else. 'Some visual basic concepts taken from: 'http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=21434&lngWId=1 'most of the algorithm is from functions in 635_WinTest ‘http://www.crystalfontz.com/product/635WinTest.html 'Full zip of the project is available in our forum: 'http://www.crystalfontz.com/forum/showthread.php?postid=9921#post9921 Private Type WORD Lo As Byte Hi As Byte End Type Private Type PACKET_STRUCT command As Byte data_length As Byte data(22) As Byte crc As WORD End Type Dim crcLookupTable(256) As WORD Private Sub MSComm_OnComm() 'Leave this here End Sub 'My understanding of visual basic is very limited--however it appears that there is no way 'to initialize an array of structures. Nice language. Fast processors, lots of memory, big Sub Initialize_CRC_Lookup_Table() crcLookupTable(0).Lo = &H0
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 74 crcLookupTable(0).Hi = &H0 . . . 'For purposes of brevity in this data sheet, I have removed 251 entries of this table, the 'full source is available in our forum: 'http://www.crystalfontz.com/forum/showthread.php?postid=9921#post9921 . . . crcLookupTable(255).Lo = &H78 crcLookupTable(255).Hi = &HF End Sub 'This function returns the CRC of the array at data for length positions Private Function Get_Crc(ByRef data() As Byte, ByVal length As Integer) As WORD Dim Index As Integer Dim Table_Index As Integer Dim newCrc As WORD newCrc.Lo = &HFF newCrc.Hi = &HFF For Index = 0 To length - 1 'exclusive-or the input byte with the low-order byte of the CRC register 'to get an index into crcLookupTable Table_Index = newCrc.Lo Xor data(Index) 'shift the CRC register eight bits to the right newCrc.Lo = newCrc.Hi newCrc.Hi = 0 ' exclusive-or the CRC register with the contents of Table at Table_Index newCrc.Lo = newCrc.Lo Xor crcLookupTable(Table_Index).Lo newCrc.Hi = newCrc.Hi Xor crcLookupTable(Table_Index).Hi Next Index 'Invert & return newCrc Get_Crc.Lo = newCrc.Lo Xor &HFF Get_Crc.Hi = newCrc.Hi Xor &HFF End Function Private Sub Send_Packet(ByRef packet As PACKET_STRUCT) Dim Index As Integer 'Need to put the whole packet into a linear array 'since you can’t do type overrides. VB, gotta love it. Dim linear_array(26) As Byte linear_array(0) = packet.command linear_array(1) = packet.data_length For Index = 0 To packet.data_length - 1 linear_array(Index + 2) = packet.data(Index) Next Index packet.crc = Get_Crc(linear_array, packet.data_length + 2) 'Might as well move the CRC into the linear array too linear_array(packet.data_length + 2) = packet.crc.Lo linear_array(packet.data_length + 3) = packet.crc.Hi 'Now a simple loop can dump it out the port. For Index = 0 To packet.data_length + 3 MSComm.Output = Chr(linear_array(Index)) Next Index End Sub Algorithm 5: “Java” Table Implementation This code was posted in our forum by user “norm” as a working example of a Java CRC calculation. public class CRC16 extends Object public static void main(String[] args) byte[] data = new byte[2]; // hw - fw data[0] = 0x01; data[1] = 0x00; System.out.println("hw -fw req"); System.out.println(Integer.toHexString(compute(data)));
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 75 // ping data[0] = 0x00; data[1] = 0x00; System.out.println("ping"); System.out.println(Integer.toHexString(compute(data))); // reboot data[0] = 0x05; data[1] = 0x00; System.out.println("reboot"); System.out.println(Integer.toHexString(compute(data))); // clear lcd data[0] = 0x06; data[1] = 0x00; System.out.println("clear lcd"); System.out.println(Integer.toHexString(compute(data))); // set line 1 data = new byte[18]; data[0] = 0x07; data[1] = 0x10; String text = "Test Test Test "; byte[] textByte = text.getBytes(); for (int i=0; i < text.length(); i++) data[i+2] = textByte[i]; System.out.println("text 1"); System.out.println(Integer.toHexString(compute(data))); private CRC16() private static final int[] crcLookupTable = 0x00000,0x01189,0x02312,0x0329B,0x04624,0x057AD,0x06536,0x074BF, 0x08C48,0x09DC1,0x0AF5A,0x0BED3,0x0CA6C,0x0DBE5,0x0E97E,0x0F8F7, 0x01081,0x00108,0x03393,0x0221A,0x056A5,0x0472C,0x075B7,0x0643E, 0x09CC9,0x08D40,0x0BFDB,0x0AE52,0x0DAED,0x0CB64,0x0F9FF,0x0E876, 0x02102,0x0308B,0x00210,0x01399,0x06726,0x076AF,0x04434,0x055BD, 0x0AD4A,0x0BCC3,0x08E58,0x09FD1,0x0EB6E,0x0FAE7,0x0C87C,0x0D9F5, 0x03183,0x0200A,0x01291,0x00318,0x077A7,0x0662E,0x054B5,0x0453C, 0x0BDCB,0x0AC42,0x09ED9,0x08F50,0x0FBEF,0x0EA66,0x0D8FD,0x0C974, 0x04204,0x0538D,0x06116,0x0709F,0x00420,0x015A9,0x02732,0x036BB, 0x0CE4C,0x0DFC5,0x0ED5E,0x0FCD7,0x08868,0x099E1,0x0AB7A,0x0BAF3, 0x05285,0x0430C,0x07197,0x0601E,0x014A1,0x00528,0x037B3,0x0263A, 0x0DECD,0x0CF44,0x0FDDF,0x0EC56,0x098E9,0x08960,0x0BBFB,0x0AA72, 0x06306,0x0728F,0x04014,0x0519D,0x02522,0x034AB,0x00630,0x017B9, 0x0EF4E,0x0FEC7,0x0CC5C,0x0DDD5,0x0A96A,0x0B8E3,0x08A78,0x09BF1, 0x07387,0x0620E,0x05095,0x0411C,0x035A3,0x0242A,0x016B1,0x00738, 0x0FFCF,0x0EE46,0x0DCDD,0x0CD54,0x0B9EB,0x0A862,0x09AF9,0x08B70, 0x08408,0x09581,0x0A71A,0x0B693,0x0C22C,0x0D3A5,0x0E13E,0x0F0B7, 0x00840,0x019C9,0x02B52,0x03ADB,0x04E64,0x05FED,0x06D76,0x07CFF, 0x09489,0x08500,0x0B79B,0x0A612,0x0D2AD,0x0C324,0x0F1BF,0x0E036, 0x018C1,0x00948,0x03BD3,0x02A5A,0x05EE5,0x04F6C,0x07DF7,0x06C7E, 0x0A50A,0x0B483,0x08618,0x09791,0x0E32E,0x0F2A7,0x0C03C,0x0D1B5, 0x02942,0x038CB,0x00A50,0x01BD9,0x06F66,0x07EEF,0x04C74,0x05DFD, 0x0B58B,0x0A402,0x09699,0x08710,0x0F3AF,0x0E226,0x0D0BD,0x0C134, 0x039C3,0x0284A,0x01AD1,0x00B58,0x07FE7,0x06E6E,0x05CF5,0x04D7C, 0x0C60C,0x0D785,0x0E51E,0x0F497,0x08028,0x091A1,0x0A33A,0x0B2B3, 0x04A44,0x05BCD,0x06956,0x078DF,0x00C60,0x01DE9,0x02F72,0x03EFB, 0x0D68D,0x0C704,0x0F59F,0x0E416,0x090A9,0x08120,0x0B3BB,0x0A232, 0x05AC5,0x04B4C,0x079D7,0x0685E,0x01CE1,0x00D68,0x03FF3,0x02E7A, 0x0E70E,0x0F687,0x0C41C,0x0D595,0x0A12A,0x0B0A3,0x08238,0x093B1, 0x06B46,0x07ACF,0x04854,0x059DD,0x02D62,0x03CEB,0x00E70,0x01FF9, 0x0F78F,0x0E606,0x0D49D,0x0C514,0x0B1AB,0x0A022,0x092B9,0x08330, 0x07BC7,0x06A4E,0x058D5,0x0495C,0x03DE3,0x02C6A,0x01EF1,0x00F78 public static int compute(byte[] data)
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 76 int newCrc = 0x0FFFF; for (int i = 0; i < data.length; i++) int lookup = crcLookupTable[(newCrc ^ data[i]) & 0xFF]; newCrc = (newCrc >> 8) ^ lookup; return(~newCrc); Algorithm 6: “Perl” Table Implementation This code was translated from the C version by one of our customers. #!/usr/bin/perl use strict; my @CRC_LOOKUP = (0x00000,0x01189,0x02312,0x0329B,0x04624,0x057AD,0x06536,0x074BF, 0x08C48,0x09DC1,0x0AF5A,0x0BED3,0x0CA6C,0x0DBE5,0x0E97E,0x0F8F7, 0x01081,0x00108,0x03393,0x0221A,0x056A5,0x0472C,0x075B7,0x0643E, 0x09CC9,0x08D40,0x0BFDB,0x0AE52,0x0DAED,0x0CB64,0x0F9FF,0x0E876, 0x02102,0x0308B,0x00210,0x01399,0x06726,0x076AF,0x04434,0x055BD, 0x0AD4A,0x0BCC3,0x08E58,0x09FD1,0x0EB6E,0x0FAE7,0x0C87C,0x0D9F5, 0x03183,0x0200A,0x01291,0x00318,0x077A7,0x0662E,0x054B5,0x0453C, 0x0BDCB,0x0AC42,0x09ED9,0x08F50,0x0FBEF,0x0EA66,0x0D8FD,0x0C974, 0x04204,0x0538D,0x06116,0x0709F,0x00420,0x015A9,0x02732,0x036BB, 0x0CE4C,0x0DFC5,0x0ED5E,0x0FCD7,0x08868,0x099E1,0x0AB7A,0x0BAF3, 0x05285,0x0430C,0x07197,0x0601E,0x014A1,0x00528,0x037B3,0x0263A, 0x0DECD,0x0CF44,0x0FDDF,0x0EC56,0x098E9,0x08960,0x0BBFB,0x0AA72, 0x06306,0x0728F,0x04014,0x0519D,0x02522,0x034AB,0x00630,0x017B9, 0x0EF4E,0x0FEC7,0x0CC5C,0x0DDD5,0x0A96A,0x0B8E3,0x08A78,0x09BF1, 0x07387,0x0620E,0x05095,0x0411C,0x035A3,0x0242A,0x016B1,0x00738, 0x0FFCF,0x0EE46,0x0DCDD,0x0CD54,0x0B9EB,0x0A862,0x09AF9,0x08B70, 0x08408,0x09581,0x0A71A,0x0B693,0x0C22C,0x0D3A5,0x0E13E,0x0F0B7, 0x00840,0x019C9,0x02B52,0x03ADB,0x04E64,0x05FED,0x06D76,0x07CFF, 0x09489,0x08500,0x0B79B,0x0A612,0x0D2AD,0x0C324,0x0F1BF,0x0E036, 0x018C1,0x00948,0x03BD3,0x02A5A,0x05EE5,0x04F6C,0x07DF7,0x06C7E, 0x0A50A,0x0B483,0x08618,0x09791,0x0E32E,0x0F2A7,0x0C03C,0x0D1B5, 0x02942,0x038CB,0x00A50,0x01BD9,0x06F66,0x07EEF,0x04C74,0x05DFD, 0x0B58B,0x0A402,0x09699,0x08710,0x0F3AF,0x0E226,0x0D0BD,0x0C134, 0x039C3,0x0284A,0x01AD1,0x00B58,0x07FE7,0x06E6E,0x05CF5,0x04D7C, 0x0C60C,0x0D785,0x0E51E,0x0F497,0x08028,0x091A1,0x0A33A,0x0B2B3, 0x04A44,0x05BCD,0x06956,0x078DF,0x00C60,0x01DE9,0x02F72,0x03EFB, 0x0D68D,0x0C704,0x0F59F,0x0E416,0x090A9,0x08120,0x0B3BB,0x0A232, 0x05AC5,0x04B4C,0x079D7,0x0685E,0x01CE1,0x00D68,0x03FF3,0x02E7A, 0x0E70E,0x0F687,0x0C41C,0x0D595,0x0A12A,0x0B0A3,0x08238,0x093B1, 0x06B46,0x07ACF,0x04854,0x059DD,0x02D62,0x03CEB,0x00E70,0x01FF9, 0x0F78F,0x0E606,0x0D49D,0x0C514,0x0B1AB,0x0A022,0x092B9,0x08330, 0x07BC7,0x06A4E,0x058D5,0x0495C,0x03DE3,0x02C6A,0x01EF1,0x00F78); # our test packet read from an enter key press over the serial line: # type = 80 (key press) # data_length = 1 (1 byte of data) # data = 5 my $type = '80'; my $length = '01'; my $data = '05'; my $packet = chr(hex $type) .chr(hex $length) .chr(hex $data); my $valid_crc = '5584' ; print "A CRC of Packet ($packet) Should Equal ($valid_crc)\\n";
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 77 my $crc = 0xFFFF ; printf("%x\\n", $crc); foreach my $char (split //, $packet) # newCrc = (newCrc >> 8) ^ crcLookupTable[(newCrc ^ *bufptr++) & 0xff]; # & is bitwise AND # ^ is bitwise XOR # >> bitwise shift right $crc = ($crc >> 8) ^ $CRC_LOOKUP[($crc ^ ord($char)) & 0xFF] ; # print out the running crc at each byte printf("%x\\n", $crc); # get the complement $crc = ~$crc ; $crc = ($crc & 0xFFFF) ; # print out the crc in hex printf("%x\\n", $crc); Algorithm 7: For PIC18F8722 or PIC18F2685 This code was written for the CFA635 by customer Virgil Stamps of ATOM Instrument Corporation. ; CRC Algorithm for CrystalFontz CFA-635 display (DB535) ; This code written for PIC18F8722 or PIC18F2685 ; Your main focus here should be the ComputeCRC2 and ; CRC16_ routines ComputeCRC2: movlb RAM8 movwf dsplyLPCNT ;w has the byte count nxt1_dsply: movf POSTINC1,w call CRC16_ decfsz dsplyLPCNT goto nxt1_dsply movlw .0 ; shift accumulator 16 more bits call CRC16_ movlw .0 call CRC16_ comf dsplyCRC,F ; invert result comf dsplyCRC+1,F return CRC16_ movwf: dsplyCRCData ; w has byte to crc movlw .8 movwf dsplyCRCCount _cloop: bcf STATUS,C ; clear carry for CRC register shift rrcf dsplyCRCData,f ; perform shift of data into CRC ;register rrcf dsplyCRC,F rrcf dsplyCRC+1,F btfss STATUS,C ; skip jump if carry goto _notset ; otherwise goto next bit movlw 0x84 xorwf dsplyCRC,F movlw 0x08 ; XOR poly mask with CRC register
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 78 xorwf dsplyCRC+1,F _notset: decfsz dsplyCRCCount,F ; decrement bit counter bra _cloop ; loop if not complete return ; example to clear screen dsplyFSR1_TEMP equ 0x83A ; 16-bit save for FSR1 for display ; message handler dsplyCRC equ 0x83C ; 16-bit CRC (H/L) dsplyLPCNT equ 0x83E ; 8-bit save for display message ; length - CRC dsplyCRCData equ 0x83F ; 8-bit CRC data for display use dsplyCRCCount equ 0x840 ; 8-bit CRC count for display use SendCount equ 0x841 ; 8-bit byte count for sending to ; display RXBUF2 equ 0x8C0 ; 32-byte receive buffer for ; Display TXBUF2 equ 0x8E0 ; 32-byte transmit buffer for ; Display ClearScreen: movlb RAM8 movlw .0 movwf SendCount movlw 0xF3 movwf dsplyCRC ; seed ho for CRC calculation movlw 0x21 movwf dsplyCRC+1 ; seen lo for CRC calculation call ClaimFSR1 movlw 0x06 movwf TXBUF2 LFSR FSR1,TXBUF2 movf SendCount,w movwf TXBUF2+1 ; message data length call BMD1 goto SendMsg ; send message via interrupt routine. The code is made complex due ; to the limited FSR registers and extended memory space used ; example of sending a string to column 0, row 0 SignOnL1: call ClaimFSR1 lfsr FSR1,TXBUF2+4 ; set data string position SHOW C0R0,BusName ; move string to TXBUF2 movlw .2 ; addwf SendCount ; movff SendCount,TXBUF2+1 ; insert message data length call BuildMsgDSPLY call SendMsg return ; BuildMsgDSPLY used to send a string to LCD BuildMsgDSPLY: movlw 0xF3 movwf dsplyCRC ; seed hi for CRC calculation movlw 0x21 movwf dsplyCRC+1 ; seed lo for CRC calculation LFSR FSR1,TXBUF2 ; point at transmit buffer movlw 0x1F ; command to send data to LCD movwf TXBUF2 ; insert command byte from us to ; CFA-635 BMD1 movlw .2 ddwf SendCount,w ; + overhead
Crystalfontz America, Inc. Data Sheet Release Date 2012/10/12 www.crystalfontz.com CFA735-xxx-KR LCD Module (Hardware 1v0, Firmware 0vB) Page 79 call ComputeCRC2 ; compute CRC of transmit message movf dsplyCRC+1,w movwf POSTINC1 ; append CRC byte movf dsplyCRC,w movwf POSTINC1 ; append CRC byte return SendMsg: call ReleaseFSR1 LFSR FSR0,TXBUF2 movff FSR0H,irptFSR0 movff FSR0L,irptFSR0+1 ; save interrupt use of FSR0 movff SendCount,TXBUSY2 bsf PIE2,TX2IE ; set transmit interrupt enable ; (bit 4) return ; macro to move string to transmit buffer SHOW macro src, stringname call src MOVLF upper stringname, TBLPTRU MOVLF high stringname, TBLPTRH MOVLF low stringname, TBLPTRL call MOVE_STR endm MOVE_STR: tblrd *+ movf TABLAT,w bz ms1b movwf POSTINC1 incf SendCount goto MOVE_STR ms1b: return