Техническая Спецификация для Atmel ATSTK500 500 Starter kit and development system. ATSTK500 ATSTK500
Модели
ATSTK500
2
AVR068
2591C-AVR-06/06
2 Communication interface
The communication between the STK500 and the PC is done over RS232 (PC COM
port). The STK500 uses: 115.2kbps, 8 data bits, 1stop bits, no parity. The PC should
be set up similarly for the communication to work.
port). The STK500 uses: 115.2kbps, 8 data bits, 1stop bits, no parity. The PC should
be set up similarly for the communication to work.
3 Message Format
All commands and responses share a common message format:
Figure 3-1. Message format.
MESSAGE_START
SEQUENCE_NUMBER
MESSAGE_SIZE
TOKEN
MESSAGE_BODY
CHECKSUM
Table 3-1. Common message format fields
Parameter Name
Size/Format
Description
MESSAGE_START
1 byte
Always 0x1B
SEQUENCE_NUMBER 1
byte
Incremented by one for each
message sent. Wraps to zero after
0xFF is reached.
message sent. Wraps to zero after
0xFF is reached.
MESSAGE_SIZE
2 bytes, MSB first
Size of the message body
(1)
TOKEN
1 byte
Always 0x0E
MESSAGE_BODY
MESSAGE_SIZE bytes
Message body, from 0 to 65535 bytes
(1)
CHECKSUM 1
byte
Uses all characters in message
including MESSAGE_START and
MESSAGE_BODY. XOR of all bytes.
including MESSAGE_START and
MESSAGE_BODY. XOR of all bytes.
Note:
1. The current STK500 firmware can only handle messages with a message body
of maximum of 275 bytes.
The host (PC) sends commands, the STK500 responds with answers.
One command will result in one answer. STK500 cannot send a message to the host
that is not an answer to a received command.
that is not an answer to a received command.
The sequence number for an answer is always the same as for the corresponding
command.
command.
4 Protocol Layer State Table
This section describes the state machine in the PC software that handles incoming
packets from the STK500. When an incoming packet is expected, the state machine
is initialized to the Start state.
packets from the STK500. When an incoming packet is expected, the state machine
is initialized to the Start state.