| Electronic Components Datasheet Search |
|
MCP39F511N Datasheet(PDF) 15 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
MCP39F511N Datasheet(HTML) 15 Page - Microchip Technology |
|
15 / 61 page ![]() 2015-2018 Microchip Technology Inc. DS20005473B-page 15 MCP39F511N 4.0 COMMUNICATION PROTOCOL All communication to the device occurs in frames. Each frame consists of a header byte, the number of bytes in the frame, a command packet (or command packets) and a checksum. It is important to note that the maxi- mum number of bytes in either a Receive or Transmit frame is 35. FIGURE 4-1: MCP39F511N Communication Frame. This approach allows for single, secure transmission from the host processor to the MCP39F511N with either a single command or multiple commands. No command in a frame is processed until the entire frame is complete and the checksum and number of bytes are validated. The number of bytes in an individual command packet depends on the specific command. For example, to set the instruction pointer, three bytes are needed in the packet: the command byte and two bytes for the address you want to set to the pointer. The first byte in a command packet is always the command byte. 4.1 Device Responses After the reception of a communication frame, the MCP39F511N has three possible responses, which are returned with or without data, depending on the frame received. These responses are either: • Acknowledge (ACK, 0x06): Frame received with success; commands understood and commands executed with success. • Negative Acknowledge (NAK, 0x15): Frame received with success; however, commands not executed with success, commands not understood or some other error in the command bytes. • Checksum Fail (CSFAIL, 0x51): Frame received with success; however, the checksum of the frame did not match the bytes in the frame. Note: There is one unique device ID response used to determine which MCP39FXXX device is present: [NAK(0x15) + ID_BYTE]. If the device is interrogated with 0x5A, i.e. it receives 0x5A as the first byte instead of the standard 0xA5 first header byte, a special NAK is returned followed by an ID_BYTE. For the MCP39F511N the ID_BYTE is 0x03. 4.2 Checksum The checksum is generated using simple byte addition and taking the modulus to find the remainder after dividing the sum of the entire frame by 256. This oper- ation is done to obtain an 8-bit checksum. All the bytes of the frame are included in the checksum, including the header byte and the number of bytes. If a frame includes multiple command packets, none of the com- mands will be issued if the frame checksum fails. In this instance, the MCP39F511N will respond with a CSFAIL response of 0x51. On commands that are requesting data back from the MCP39F511N, the frame and checksum are created in the same way, with the header byte becoming an Acknowledge (0x06). Communication examples are given in Section 4.5 “Example Communication Frames and MCP39F511N Responses”. 4.3 UART Settings The default baud rate is 115.2 kbps and can be changed using the UART bits in the System Configuration Register. Note that the baud rate is changed only at system power-up, so when changing the baud rate, a Save To Flash command followed by a power-on cycle is required. The UART operates in 8-bit mode, plus one start bit and one stop bit, for a total of 10 bits per byte, as shown in Figure 4-1. FIGURE 4-1: UART Transmission, N-8-1. Note: If a custom communication protocol is desired, please contact a Microchip sales office. Header Byte (0xA5) Number of Bytes Command Packet1 Command Packet2 ...Command Packet n Checksum Command BYTE0 BYTE1 BYTE2 BYTE N BYTE N Frame IDLE START IDLE STOP D0 D1 D2 D3 D4 D5 D6 D7 |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |