Maker Pro
Maker Pro

PIC16F74 Checksum(s)

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
 
S

Spehro Pefhany

Jan 1, 1970
0
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

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
 
W

Winfield Hill

Jan 1, 1970
0
Spehro Pefhany wrote...
IIRC, that part lacks the capability of reading its own
program memory directly, so its rather a moot point.

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

Spehro Pefhany

Jan 1, 1970
0
Spehro Pefhany wrote...

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

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
 
R

Roger Hamlett

Jan 1, 1970
0
Spehro Pefhany said:
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.
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
 
S

Spehro Pefhany

Jan 1, 1970
0
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.

<pulls up datasheet> 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
 
R

Roger Hamlett

Jan 1, 1970
0
<pulls up datasheet> 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.)
Spot on.
It is a real 'pain' at times...

Best Wishes
 
Top