| 数据搜索系统,热门电子元器件搜索 |
|
CFA633-RDI-KS 数据表(PDF) 71 Page - Crystalfontz America, Inc. |
|
|
|||||||||||||||||||||||||||||
CFA633-RDI-KS 数据表(HTML) 71 Page - Crystalfontz America, Inc. |
|
71 / 88 page ![]() Crystalfontz America, Inc. Data Sheet Release Date 2012/02/21 www.crystalfontz.com CFA633-RDI-KS LCD Module (Hardware v2.0 / Firmware s2v1) February 2012 Page 71 APPENDIX C: DEMONSTRATION SOFTWARE AND SAMPLE CODE SAMPLE CODE 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. http://www.crystalfontz.com/product/633WinTest#docs Linux compatible command-line demonstration program with C source code. 8K. http://www.crystalfontz.com/product/linux_cli_examples#docs Supported by CrystalControl freeware. http://www.crystalfontz.com/product/CrystalControl2.html In addition, see http://lcdproc.org/hardware.php3 for Linux LCD drivers. LCDproc is an open source project that supports many of the Crystalfontz displays. ALGORITHMS TO CALCULATE THE CRC Below are eight sample algorithms that will calculate the CRC of a CFA633 packet. Some of the algorithms were contributed by forum members and originally written for the CFA631 aand CFA635. The CRC used in the CFA633 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] = {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, |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |