Crc


Closed Thread
Results 1 to 3 of 3

Thread: Crc

  1. #1
    Join Date
    Aug 2006
    Posts
    6

    Exclamation Crc

    Does any one have guide routine in PICBasic to calculate CRC16bit MODBUS ?

    Thank,
    Grich

  2. #2
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  3. #3
    Join Date
    Aug 2006
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    Thanks, and I found list below/
    Is this routine right ?
    Calcul_CRC16:

    CRC16=$FFFF
    For i=0 to (DataAmount -3)
    CRC16=CRC16^DATACRC[i]
    For j=1 to 8
    IF CRC16.Bit0=1 Then
    CRC16=$A001^(CRC16>>1)
    Else
    CRC16=CRC16>>1
    EndIF
    Next j
    Next i
    Return

Similar Threads

  1. Dallas CRC8 Routines
    By Tom Estes in forum Code Examples
    Replies: 23
    Last Post: - 8th May 2018, 18:07
  2. Calculating CRC for Modbus RTU
    By tekart in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 20th January 2010, 22:42
  3. CRC Calculations
    By timmers in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th June 2009, 17:10
  4. Sensirion CRC
    By Tom Estes in forum Code Examples
    Replies: 3
    Last Post: - 9th November 2007, 15:09
  5. Problems with CRC8 Calc in 1Wire
    By JohnB in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th March 2007, 22:01

Members who have read this thread : 2

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