Reading code ROM


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Nov 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Thanks Charles. I got the book out and found the READCODE command. I've never used that one and had missed it when I was looking through the book yesterday. Now I need to figure out how to produce a CRC value for the code space. Thanks again.

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    There are several CRC16 examples on the forum. One of them should be usable for your application. For verifying code, I usually do just a checksum - sum all the bytes into one 16 bit word. It is fast and is usually good enough.
    Charles Linquist

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by markk5xh View Post
    Thanks Charles. I got the book out and found the READCODE command. I've never used that one and had missed it when I was looking through the book yesterday. Now I need to figure out how to produce a CRC value for the code space. Thanks again.
    Are you trying to read your own code and produce your own CRC or what?

  4. #4
    Join Date
    Nov 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Yes, my code.
    I'm looking at a project that requires the software/firmware to meet a U.L. spec. One of the requirements is that the program code must be verified in some way. What the spec calls for is either a "single word" CRC or a "double word" CRC. Their use of the word "word" is a bit confusing as they seems to mean 8 bits and not 16. After reading through the spec (300+ pages) I'm not even sure that a PIC can be used in such a project.
    Thanks for your input.
    Mark

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by markk5xh View Post
    Yes, my code.
    I'm looking at a project that requires the software/firmware to meet a U.L. spec. One of the requirements is that the program code must be verified in some way. What the spec calls for is either a "single word" CRC or a "double word" CRC. Their use of the word "word" is a bit confusing as they seems to mean 8 bits and not 16. After reading through the spec (300+ pages) I'm not even sure that a PIC can be used in such a project.
    Thanks for your input.
    Mark
    Simple idea, , yet probably not so practical...???
    Read your own PIC code, and compare it word for word against an external EEPROM burned with the same code...

  6. #6
    Join Date
    Nov 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Actually this is one of the methods that is discribed in the UL documents. I agree that it might not be the best way. Thanks for the input.

Similar Threads

  1. Problem runing my code
    By Mus.me in forum mel PIC BASIC Pro
    Replies: 33
    Last Post: - 1st December 2009, 21:36
  2. Simple LCD code not working!...WHY?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th November 2009, 20:48
  3. 16F to 18F transition pains
    By lurker in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th December 2008, 02:35
  4. Code to control 4 LEDs and 2 servos
    By The Master in forum Off Topic
    Replies: 2
    Last Post: - 26th November 2008, 14:33
  5. one wire
    By karenhornby in forum General
    Replies: 7
    Last Post: - 18th June 2008, 21:24

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