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.
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.
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
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
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.
Bookmarks