Checksum & Eprom Programmers
it is a simple
addition of the bytes in a 16 Bit Variable (or 32 Bit in the case of
conitec, dataio chiplab, advantech labtool-38). That's no CRC at all.. it is
a checksum only.
~/src/checksum $ ./ctest 2716.bin
File 2716.bin: 2048 Bytes!
Memory allocated
file read
cksum=23054 5A0E
The simple C program, it's more filesystem operations then actual
work...
-----------------------------------------------------------------
#include <stdio.h>
uint8_t ebyte; FILE * fp; if(argc < 2)
if(fstat(fno,&infstat)!=0) printf("File %s: %ld Bytes!\n",argv[1],infstat.st_size);
if(fread(bufp,sizeof(uint8_t),infstat.st_size,fp)!=infstat.st_size)
fclose(fp); return 0;
|
In the unlikely event you need a simple CRC for something else, I have seen
this used. It's taken from a Chinese user manual for a barcode scanner. I needed
to implement this crc on my end to match theirs. It takes a pointer to a buffer
and the number of bytes to process.
return (uint16_t)crc;
|
The only checksum algorithm I've ever found specific to EPROMs is the "Kontron
CRC". most of them use an additive checksum, which is almost worthless
really. The Kontron CRC was used in the prestigious Kontron line of programmers.
For that alogorithm, you will need to find Appendix "E.2 KONTRON CRC CHECKSUM ALGORITHM" of the MPP-80S/EPP-80/GPP-80. I have several of the PDFs, but none of them have that appendix. I do have notes from when I taught this back in the late 1980's and early 1990's though.
Kontron_MPP-80_EPP-80_programmer_resources.htm
If you look forward for other information about this topic, do not
hesitate to contact me by e-mail at: matthieu.benoit@free.fr
.
Important Notice: Also if you have any data about this topic, do not hesitate
to contribute to this page.
Si vous recherchez des informations pour ce sujet, vous pouvez me contacter par e-mail : matthieu.benoit@free.fr . De même si vous avez des informations sur ce sujet, n'hésitez pas à contribuer à cette page.
M-à-j: 21 avril, 2024 .