| поискавой системы для электроныых деталей |
|
CFA633-RDI-KS датащи(PDF) 80 Page - Crystalfontz America, Inc. |
|
|
|||||||||||||||||||||||||||||
CFA633-RDI-KS датащи(HTML) 80 Page - Crystalfontz America, Inc. |
|
80 / 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 80 # 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"; 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 by customer Virgil Stamps of ATOM Instrument Corporation for our CFA635 module. ; CRC Algorithm for CrystalFontz CFA635 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 |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |