[Q] How to calculate CRC

Discussion in 'Programmer's Corner' started by Mohannad, Mar 15, 2011.

  1. Mohannad

    Thread Starter New Member

    Mar 15, 2011
    2
    0
    Hello every one :)

    I would to write simple code in PIC 16F877A (in MPLAB), to communicate with a HMI
    that uses Modbus protocol .

    Is there any one have wrote these code , because I want the CRC calculating block

    thanks alot...

    Best Regards,
    Mohannad.​
     
    Last edited: Mar 15, 2011
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    MPLAB is just an IDE. Which program language/compiler do you use?
     
    Mohannad likes this.
  3. Mohannad

    Thread Starter New Member

    Mar 15, 2011
    2
    0
    Iam using assembly, this is simple code

    START
    MOVLW H'00B4'

    MOVWF H'A0'

    GOTO START

     
    Last edited: Mar 15, 2011
  4. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
  5. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    The trouble with CRC algorithms is finding test cases that you know the answer to. If you code it and it doesn't work -- what do you do then?
     
Loading...