A PIC Sequencer

While in the pre-planning stage for EME operation at 3B9C it became apparent that in order to protect the equipment a sequencer would be needed. Blowing the receive preamp because the antenna relay was not fully closed when the GS31 amp was producing power was not an option in the middle of the Indian Ocean!
Reviewing circuits I came across the sequencer in the 1991 ARRL handbook. This used components that were readily available, but was physically large. With my previous PIC experience it was decided that if only 3 outputs were needed the whole circuit could be realized in an 8 pin PIC, the 12C508A, which only cost around $1
Reviewing what the sequencer needed to do, the following were defined:-
Operation
At power up the PIC checks the delay pin status. Normally it is pulled to 5V and a 50mS delay between output changes is implemented. If the delay pin is grounded a 100mS delay between output changes is implemented. The PIC then waits and monitors the state of both the ETT and TTL input pins.
If the ETT pin is grounded the PIC waits a short period then checks the ETT pin again. This rechecking is to protect against noise triggering the sequencer. If it is still grounded the 3 outputs are switched, in sequence with the appropriate delay between changes. Note that once the sequence starts it cannot be interrupted, i.e. removing the ground has no effect while the sequence is happening. The PIC then waits monitoring the ETT Pin. When it goes high the PIC waits a short period then checks the ETT pin again If it is still high the 3 outputs are turned off in sequence with the appropriate delay between changes..
If the TTL pin is grounded the PIC waits a short period then checks the TTL pin again. If it is still +5V the 3 outputs are switched, in sequence with the appropriate delay between changes. Note that once the sequence starts it cannot be interrupted, i.e. removing the +5V signal has no effect while the sequence is happening. The PIC then waits monitoring the TTL Pin. When it goes low the PIC waits a short period then checks the TTL pin again If it is still low the 3 outputs are turned off in sequence with the appropriate delay between changes.
Note that after the first time the TTL pin or the ETT pin is triggered the PIC only monitors the triggered pin until power to the PIC is recycled.
The software was written in assembler using the free MPLAB-IDE from microchip.
Implimentation
Although it the initial design used FETS to switch the 3 outputs it was found not to be flexible enough. For this reason a DPDT relay is used for each output which allows switching of two different voltages, all of which are settable as “normally open” or “normally closed” as required. The time between switching transitions defaults to 50mS. If pin 2 is earthed this doubles to 100mS delay between transitions.
The final circuit is shown in Fig 1. The PCB layout is shown in Fig 2 and the component overlay in Fig 3
Fig 1: Circuit

Fig 1: PCB Layout
Fig 1: PCB Overlay
Conclusions