PIC16F74 Checksum(s)

Oct 05, 2005 8 Replies

The checksum of the PIC code reads differently on different device programmers.



Is this expected with this device?



Is there some way to predict what it should be?



Any information or links on this subject would be appreciated.



Thanks, Dave



But IIRC, there's an indirect way to do it, which is why it's possible to read its program-stored lookup tables.

Thanks, - Win

Probably they just use different methods to calculate the checksum.

IIRC, that part lacks the capability of reading its own program memory directly, so its rather a moot point.

Best regards, Spehro Pefhany

"it\'s the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com

^^^ it's

Best regards, Spehro Pefhany

-- "it's the network..." "The Journey is the reward" snipped-for-privacy@interlog.com Info for manufacturers:

formatting link
Embedded software/hardware/analog Info for designers:
formatting link

No, IIRC, this one requires 8-bit table entries to be stored as retlw (return literal in w) 14-bit instructions and you have to essentially 'call' the correct 'table' location (ugh).

Sometimes developers want to (or are required to by safety standards) run a check of the code memory checksum at startup or periodically to provide a higher degree of safety. IIRC, this particular microcontroller (like the 'C' version it replaces) is quite incapable of performing such a calculation.

Best regards, Spehro Pefhany

"it\'s the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com

Ah, so it does. Looks like there are at least three 16F possibilities-- read only (F74 etc with above registers), read/write (F676 etc. with EEADRH etc.) neither read nor write (F628 etc.)

Best regards, Spehro Pefhany

"it\'s the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com

Er. No. The F74, can read it's memory. Unlike many other 16F chips, it does have the extra special function registers to allow you to address the internal ROM. You load the address required into PMADR, and PMADRH, institute an EEPROM read, and the contents are returned in PMDATA, and PMDATH. It takes a total of about 13 machine cycles to read each location, but it can be done.

Best Wishes

Spot on. It is a real 'pain' at times...

Best Wishes

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required