Dallas CRC8 Routines


Results 1 to 24 of 24

Threaded View

  1. #8
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default Re: Dallas CRC8 Routines

    Has anyone ever converted Scott Dattalo's method (1-Wire Polynomial) to PBP?

    Code:
    ;
    ;  Scott Dattalo's version (20 words, 23 cycles per byte)
    ;
    crc_8
            xorwf   CRC,F           ;
            clrw                    ;
            btfsc   CRC,0           ;
            xorlw   0x5E            ; 
            btfsc   CRC,1           ; 
            xorlw   0xBC            ; 
            btfsc   CRC,2           ; 
            xorlw   0x61            ; 
            btfsc   CRC,3           ; 
            xorlw   0xC2            ; 
            btfsc   CRC,4           ; 
            xorlw   0x9D            ; 
            btfsc   CRC,5           ;
            xorlw   0x23            ; 
            btfsc   CRC,6           ; 
            xorlw   0x46            ; 
            btfsc   CRC,7           ; 
            xorlw   0x8C            ; 
            movwf   CRC             ; 
            return                  ;
    It seems like a pretty good compromise between size and performance.

    Regards, Mike
    Last edited by Mike, K8LH; - 23rd May 2012 at 03:05.

Similar Threads

  1. Problems with CRC8 Calc in 1Wire
    By JohnB in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th March 2007, 22:01
  2. dallas ibutton to pics
    By CBUK in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 25th October 2006, 12:55
  3. Dallas 1-wire search Routine
    By jimbab in forum Code Examples
    Replies: 0
    Last Post: - 7th April 2006, 16:14
  4. Dallas Semiconductor Components Serial Numbers
    By ideaman234 in forum General
    Replies: 2
    Last Post: - 27th February 2006, 22:17
  5. Dallas CRC16 Routines
    By Tom Estes in forum Code Examples
    Replies: 0
    Last Post: - 16th May 2005, 15:29

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts