Picswr circuit
By default, the installer places the schematics and PCB layouts in:
    C:\Program files\G3VPX\Calswr\hardware\
Please view and print the picswr_schematic.pdf file to accompany the following circuit description.
PIC16F876 reference clock
The PIC runs at 20Mhz using a 20Mhz crystal, as in PicNMix.
Forward and reflected voltage measurement
The PIC16F876 can support up to five of its data pins as analogue inputs. Two of these can optionally be used as lower and upper reference voltage limits for the ADC function of the other three.
Picswr has the PIC configured for two analogue inputs, AN0 and AN1, and external upper reference voltage (Vref+).  Pin AN0 receives forward volts and AN1 receives reflected volts.  Vref is set by VR1 which should be a multiturn potentiometer.
In this configuration, in input voltage range of  0v to Vref generates the full 10-bit ADC digital range of 0 to 1023.
If your SWR bridge's maximum output exceeds 5 volts then the input attenuators R1/R3 and R2/R4 are needed to scale it down to under Vref which should be at 4.8v.
If your SWR bridge's maximum output is well under 5 volts (eg 3.5v) then omit the input attenuators and reduce Vref to say 3.8v in order to maximise the ADC precision from your lower voltage swing.
Then, when this is set up correctly, your run Calswr on the PC to achieve a linear watts/LED calibration from the non-linear power/volts characteristic of your SWR bridge.
(See also the notes on the schematic)
C3 and C4 are damping capacitors on the SWR bridge input. These are in parallel with the input attenuator resistors and also with the 33k shunt output resistors of the SWR bridge. The time constant is approx 500mS.
Front panel interface
The front panel interface is a miniature push to make switch and a tricolour (R, G, Y) LED.
The switch grounds PIC input RA4.
The LED common is connected to ground.
RA5 drives the red LED via R7  ( 1k )
RC1 drives the green LED via R8 ( 620R )   -- the lower value of R8 gave a better yellow.
T/R input (Tx = low)
This is the transmit/receive line from DSP to PicNMix and Timer boards. It connects to input RA2.
Tx Shutdown circuit
Many transceivers use the ALC facility to progressively reduce the drive with worsening mismatch.
PicAStar has no ALC control of the PA and doesn't need it.
Picswr provides the facility to shut down the PA if reflected power is above a specified level for a specified time interval. The power level is specified in the Calswr calibration program. The time interval is determined by R13 / C7. My default provision is for shutdown at > 4w for approx 8 seconds. This arrangement allows you to tune at full power for eight seconds or more.  The 'shut down' output is an open collector NPN transistor, TR1.
Whenever the specified reflected power level is exceeded, the PIC drives RB1 high. This charges C7 via R13. The voltage on C7 is monitored by PIC input RC5. This is a Schmitt trigger input. It switches high at approx 0.7Vdd  and switches low at 0.3Vdd. While RC5 is high TR1 is switched on by RC3.
I use the Tx shutdown output to energize a small relay (as used in the DDS filter). This interrupts power to the Chris Honey PA driver.
The effect is that if you exceed the specified reflected power level for eight seconds the output ceases. The output restores after a further eight seconds or so.
S-meter input / Status data output.
These use a software implemented serial interface using RB5 and RB4.
On receive the PIC has little do do other than a simple program loop  which monitors RB5 and sets the state of RB4 to be the same.
On transmit, RB4 transmits its own 9600 baud serial data packets to the status board PIC.
PC interface
This uses the PIC's built in UART for bidirectional communication with the PC at 9600 baud.
An ST232N chip is used to convert the output and input to / from RS232 voltage levels.
I wired J3 to a third 3.5mm stereo jack socket on the rear panel using twin screened microphone cable.
The connection is Tx data  to the tip and Rx data to the ring as in PicAStar. I then can use my existing Rs232 - jack  cable.
In situ Programming
J4 provides a programming interface identical to than on PicNMix.