Receive mailbox, Procedure for receiving data from the ktcx receive, Verify that the access byte is 01h – Rockwell Automation D17846.2.4 CONTROLNET KT EMULA User Manual
Page 27: Verify that the valid byte is 01h, Read the receive box's message, Write a 00h to valid to send the packet to the, Write a 00h to access flag, Receive processes: polled and interrupt, Receive mailbox -7

Publication 1784-6.2.4 - September 1997
How Your Driver Operates the KTCX Card
3-7
Receive Mailbox
To receive packets, your driver must check to see that the Receive
Access Request byte (0480h) and the Receive Data Valid byte
(0481h) indicate that the mailbox is available to it (shown by 01h in
both bytes). Then your driver must copy the packet from the dual-
port’s receive mailbox (bytes 0482h - 07EFh). This mailbox can hold
up to 877 bytes. After copying the packet into its own buffer area,
your driver must signal the KTCX that it is done by zeroing valid then
access bytes.
As you develop your driver, you should be familiar with:
•
Procedure for Receiving Data from the KTCX Receive Box
•
Receive Processes: Polled and Interrupt
•
Receive Packet Examples
•
Code Examples for Polled and Interrupt
•
Receive Data Memory Map
To read a message in the Receive Box of the KTCX:
Procedure for Receiving Data from the KTCX Receive Box
1.
Verify that the ACCESS byte is 01h.
2.
Verify that the VALID byte is 01h.
3.
Read the receive box's message.
4.
Write a 00h to VALID to send the packet to the receive box.
5.
Write a 00h to ACCESS flag.
Now the receive box will return the message packet.
Receive Processes: Polled and Interrupt
You may receive messages via two processes: polled or interrupt.
!
ATTENTION: Failure to execute the following steps
can cause your card to behave improperly and cause
damage to your system.
Process
Definition
polled
In this mode, the host must monitor the Receive Access Request and the Receive
Data Valid bytes to determine when a packet is available for processing.
interrupt
The KTCX can send an interrupt to the host after placing a packet into the receive
mailbox. Receive interrupts cannot be disabled in software.