| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
MXT1664T3-C2TESSQTP bảng dữ liệu(PDF) 51 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
MXT1664T3-C2TESSQTP bảng dữ liệu(HTML) 51 Page - Microchip Technology |
|
51 / 98 page ![]() MXT1664T3 2.0 2018 Microchip Technology Inc. DS40002054A-page 51 10.4.1.1 Command and Response Packets The command packet has the generic format given in Figure 10-3. The following sections give examples on using the command to write to the memory map and to read from the memory map. FIGURE 10-3: READ/WRITE MEMORY MAP – COMMAND PACKET FORM In Figure 10-3: • Rpt ID is the USB report ID used for Object Protocol commands and responses (see Table 10-3 on page 50). • Command ID is the command ID for the write/read operation (0x51) • NumWx is the number of data bytes to write to the memory map (may be zero). If the address pointer is being sent, this must include the size of the address pointer. • NumRx is the number of data bytes to read from the memory map (may be zero). • Addr 0 and Addr 1 form the address pointer to the memory map (where necessary; may be zero if not needed). This is typically an address of an object within the device. • Data 0 to Data 57 are the bytes of data to be written (in the case of a write). Note that data locations beyond the number specified by NumWx will be ignored. The response packet has the generic format given in Figure 10-4. FIGURE 10-4: READ/WRITE MEMORY MAP – RESPONSE PACKET FORMAT In Figure 10-4: • Status indicates the result of the command: - 0x00 = read and write completed; read data returned - 0x04 = write completed; no read data requested • NumRx is the number of bytes following that have been read from the memory map (in the case of a read). This will be the same value as NumRx in the command packet. • Data 0 to Data 60 are the data bytes read from the memory map. 10.4.1.2 Writing To the Device A write operation cycle to the device consists of sending a packet that contains six header bytes (see Section 10.4.1.1 “Command and Response Packets”). These specify the USB report ID, the Command ID, the number of bytes to read, the number of bytes to write, and the 16-bit address pointer. Subsequent bytes in a multibyte transfer form the actual data. These are written to the location of the address pointer, location of the address pointer +1, location of the address pointer + 2, and so on. Figure 10-5 shows an example command packet to write four bytes of data to contiguous addresses starting at 0x1234. FIGURE 10-5: EXAMPLE OF A FOUR-BYTE WRITE STARTING AT ADDRESS 0x1234 Write Data (58 Bytes) Data 57 Data 0 ... 0x51 NumWx Address Pointer (LSByte, MSByte) Number of Bytes to Read/Write NumRx Addr 0 Addr 1 Rpt ID Command ID Read Data (61 Bytes) Data 60 Rpt ID Status Number of Bytes Read Success/ Failure NumRx Data 0 ... Write Data (4 Bytes) 0x51 0x06 Number of Bytes to Write 0x00 0x34 0x12 0x96 0x9B 0xA0 0xA5 Address Pointer (LSByte, MSByte) Number of Bytes to Read Command ID Rpt ID Unused Bytes (54 bytes) 0x00 0x00 ... |
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất 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 |