| 数据搜索系统,热门电子元器件搜索 |
|
ENC28J60-C/ML 数据表(PDF) 42 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
ENC28J60-C/ML 数据表(HTML) 42 Page - Microchip Technology |
|
42 / 96 page ![]() ENC28J60 DS39662B-page 40 Preliminary © 2006 Microchip Technology Inc. FIGURE 7-2: SAMPLE TRANSMIT PACKET LAYOUT To achieve the example layout shown in Figure 7-2 and to transmit a packet, the host controller should: 1. Appropriately program the ETXST Pointer to point to an unused location in memory. It will point to the per packet control byte. In the example, it would be programmed to 0120h. It is recommended that an even address be used for ETXST. 2. Use the WBM SPI command to write the per packet control byte, the destination address, the source MAC address, the type/length and the data payload. 3. Appropriately program the ETXND Pointer. It should point to the last byte in the data payload. In the example, it would be programmed to 0156h. 4. Clear EIR.TXIF, set EIE.TXIE and set EIE.INTIE to enable an interrupt when done (if desired). 5. Start the transmission process by setting ECON1.TXRTS. If a DMA operation was in progress while the TXRTS bit was set, the ENC28J60 will wait until the DMA opera- tion is complete before attempting to transmit the packet. This possible delay is required because the DMA and transmission engine share the same memory access port. Similarly, if the DMAST bit in ECON1 is set after TXRTS is already set, the DMA will wait until the TXRTS bit becomes clear before doing anything. While the transmission is in progress, none of the unshaded bits (except for the EECON1 register’s bits) in Table 7-2 should be changed. Additionally, none of the bytes to be transmitted should be read or written to through the SPI. If the host controller wishes to cancel the transmission, it can clear the TXRTS bit. When the packet is finished transmitting or was aborted due to an error/cancellation, the ECON1.TXRTS bit will be cleared, a seven-byte transmit status vector will be written to the location pointed to by ETXND + 1, the EIR.TXIF will be set and an interrupt will be generated (if enabled). The ETXST and ETXND Pointers will not be modified. To check if the packet was successfully transmitted, the ESTAT.TXABRT bit should be read. If it was set, the host controller may interrogate the ESTAT.LATECOL bit in addition to the various fields in the transmit status vector to determine the cause. The transmit status vector is organized as shown in Table 7-1. Multi-byte fields are written in little-endian format. Control tsv[7:0] tsv[15:8] Address Memory Description 0120h 0121h 0122h 016Ah 016Bh 016Ch 016Dh 0Eh PHUGEEN, PPADN, Destination Address, 016Eh Start of the Next Packet tsv[23:16] tsv[31:24] data[1] data[2] tsv[39:32] tsv[47:40] tsv[55:48] 0159h 0157h 0158h 0156h data[m] Data Packet Status Vector Status Vector ETXST = 0120h ETXND = 0156h Type/Length and Data PCRCEN and POVERRIDE Written by the Hardware Source Address, Buffer Pointers |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |