transmitter program using (AVR)

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

HI! everyone.

I am using the chip (AT90LS4433) for the first time. I am writing the program that transmit and generate a checksum using C code. At the moment I am strugling with this program can you please help me with the program that generate a checksum.I will be happy if you can help me with this type of the program.

yours sincerly

Zanele.

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Zanele,

Does this help? The following code is what I think answers your question:

" (quote)
N+1 - N+2
CheckSum Two digit hex CheckSum character computed by two's complementing the sum of previous bytes except the ':'.
" (/quote)

-----

INTEL HEX FORMAT
Intel Hex format files are text files which include the file
information in hexadecimal.
Position(byte) Character Remarks
------------------------------------------------------------
1 : A record mark
2 - 3 Byte Record length in 2 digit
Hex, Max 20 (64 in ASCII)
4 - 7 Address 4 digit Hex Field. Most
significant byte first.
8 - 9 Byte 2 digit field record type:
01 End of file
02 Extended address
10 - N Data Data field in Hex digits
N+1 - N+2 CheckSum Two digit hex CheckSum
character computed by two's
complementing the sum of
previous bytes except the
':'.
The extended address record specifies the index address that
data will be loaded into. The Extended Address will continue
to offset data record address until a new Extended Address
record is specified.
Example
+--------------------- Record Length
| +----------------- Address
| | +------------- Record type
| | | +--------- Index address
| | | | +----- Checksum
v v v v v
:02 0000 02 4A29 02
- The address field is blank because this record is not
data.
- The record length is '02' for index address (2 Bytes).
- If the address for the data record is '2B56', the actual
address will be 4A290 + 2B56 or 4CDE6(hex).

-------

I know the tabs will get corrupted. If this is unintelligible, please let me know. I can re-post a document as an attachment.

Best regards,

Morten, AVR tech. support, Atmel FAE

admin's test signature