Ga naar inhoud


Aanbevolen berichten

Geplaatst:

ik ben bezig met de checksum ergens van te berekenen door middel van met icprog de kaart uit te lezen. het is zo dat er bij icprog rechts onderaan een venstertje staat met checksum, maar wat houd dit in?

of weet iemand het beter hoe ik een checksum uit kan rekenen?


Geplaatst:

Volgens de uitleg van Duwgati[deze werkt bij mij]doe je dit met je windows calculator.

 

Selecteer de opties Hex and Byte in de calculator.Vervolgens trek je telkens 1 byte af van het resultaat,te beginnen met de waarde nul.

Je begint met de eerste byte van de regel to en met de voorlaatste.Checksum is altijd 1 byte groot.

compu's leuke dingen,had ik er maar meer verstand van.

Geplaatst:

waar heb jij deze uitleg gevonden? niet op de duwgati site.

 

o ja, het is niet voor een sat kaart maar een eeprom card voor ander doel!!

Geplaatst:

Hopelijk kun je Engels, hier heb je de methode ... ik heb het getest het werkt. Maar ik gebruik tegenwoordig het proggie "Phelix Chksum".

 

Calculating the Checksum

 

The last two characters represent a checksum of the data in the line. Since the checksum is a two-digit hexidecimal value, it may represent a value of 0 to 255, inclusive.

 

The checksum is calculated by summing the value of the data on the line, excluding the leading colon and checksum byte itself, and taking its two's complement. For example, the line:

 

:0300300002337A1E

Breaking this line into it's components we have:

 

Record Length: 03 (3 bytes of data)

Address: 0030 (the 3 bytes will be stored at 0030, 0031, and 0032)

Record Type: 00 (normal data)

Data: 02, 33, 7A

Checksum: 1E

 

Taking all the data bytes above, we have to calculate the checksum based on the following hexidecimal values:

 

03 + 00 + 30 + 00 + 02 + 33 + 7A = E2

The two's complement of E2 is 1E which is, as you can, the checksum value.

For those unfamiliar with calculating a two's complement, it's quite simple: The two's complement of a number if the value which must be added to the number to reach the value 256 (decimal). That is to say, E2 + 1E = 100.

 

You may also calculate the two's complement by subtracting the value from 100h. In other words, 100h - E2h = 1Eh -- which is the checksum.

 

If the value in question is greater than FFh, simply take the part which is less than 100h. For example, if you want the two's complement of the value 494h, simply drop the leading "4" which leaves you with 94h. The two's complement of 94h is 6Ch.

 

Grtz,

Lucky Star <img border="0" title="" alt="[Razz]" src="images/icons/tongue.gif" />

 

<small>[ 21-05-2002, 08:12: Bericht gewijzigd door: Lucky Star ]</small>

Geplaatst:

@ unique,kijk bij Duwgati eens bij de uitleg over "mosc clonen en ua edtit".

compu's leuke dingen,had ik er maar meer verstand van.

Geplaatst:

Het ligt eraan wat voor checksum je wilt berekenen. Er zijn namelijk verschillende mogelijkheden.

 

Als je de checksum per regel van een hex file wilt berekenen, dan kun je inderdaad met de methode van mijn site overweg.

 

Er zijn ook programma's die dat voor je doen zoals Lucky Star al schreef. Bij veel van die programma's moet je zelf de methode kiezen die voor jouw situatie van toepassing is.

Gast
Dit onderwerp is nu gesloten voor nieuwe reacties.
  • Wie is er online   0 leden

    • Er zijn geen geregistreerde gebruikers deze pagina aan het bekijken
×
×
  • Nieuwe aanmaken...