Motore di ricerca datesheet componenti elettronici |
|
CFA631 Scheda tecnica(PDF) 70 Page - Crystalfontz America, Inc. |
|
CFA631 Scheda tecnica(HTML) 70 Page - Crystalfontz America, Inc. |
70 / 81 page Crystalfontz Data Sheet Release 2014-11-17 www.crystalfontz.com CFA631 Intelligent Display Modules Page 70 ; seedlo equ 021h ; initial seed for CRC reg lo byte seedhi equ 0F3h ; initial seed for CRC reg hi byte ; 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 |
Codice articolo simile - CFA631 |
|
Descrizione simile - CFA631 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEETIT.COM |
Lei ha avuto il aiuto da alldatasheet? [ DONATE ] |
Di alldatasheet | Richest di pubblicita | contatti | Privacy Policy | scambio Link | Ricerca produttore 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 |