Data is written in a send buffer and the send
interrupt is triggered in the "SEND" subroutine.
SEND
Write data to send buffer
Enable send interrupt
LDAA
P
102
ANDA
#
%11110111
ORAA
#
%00000100
STAA
P
102
RET
The interrupt routine "IRQ" is divided into two sections. In one section, the received characters are
checked and written to the receive buffer. In the other section of the routine, a character from the send
buffer is written to the data register.
Command register
Command register
Read status register
Receive character
Yes
Read character
Received
character OK
Yes
Write character to receive buffer
A check is made by the in the "REC" subrou-
tine to see if a character is in the receive buffer.
If a character is received, it is evaluated.
Character in
Receive Buffer
Evaluate receive buffer
IRQ
No
No
RET
B&R COMPACT PLC
REC
No
Yes
RET
A
- 213 -