Dć18 – Rockwell Automation 1775-KA PLC-3 Communication Adapter Module User Manual User Manual
Page 228

Detailed Flowcharts
Appendix D
DĆ18
WAKEUP without losing immediate control of the processor. If B wakes
up A, context switching would be deferred until B itself has executed a
SLEEP.
A third alternative would cause a context switch if a process performed a
WAKEUP on a higher priority process. If a WAKEUP had been
performed on a lower priority process, the context switch would be
deferred until the first process has gone to sleep.
The first alternative is the result of implementing the driver totally at the
interrupt level where scheduling is dictated by the interrupt daisy chain
hardware.
The third alternative would be used if the driver were implemented as
tasks under a multitasking operating system. Such an implementation
might be easier, but would probably be limited to lower communication
rates.
At powerup, the Z80 processor starts executing code at location 0. The
POWERUP subroutine starts at XMIT and RCVE processes by executing
a SPAWN. A SPAWN is very similar to a WAKEUP except that the
corresponding SLEEP is imaginary and is located prior to the first
instruction of the spawned process.
Figure D.21
POWERUP Routine
POWERUP
SPAWN
RCVE
SPAWN
XMIT
Continue
Initialization
10091–I
POWERUP