Tom
Interesting results.
I take the following from your results.
1)
All PGA gains can be correctly set by the PIC.
This suggests the connections for Ci Di and -CS between the PIC and the PGA are fine.
It also suggests to me the PGA may not be the defect.
2)
The current readings between the anode and screen on all ranges manually set are similar but not exactly the same.
The differences are small enough to possibly be a combination of calibration errors and component tolerance.
Hard to be sure at this point but it does not seem to suggest at this point any gross failure in the IC62 the PGA113.
3)
The
anode
curve result for the manual setting 0-4mA is exactly the same as the auto
anode
curve result.
This suggests the PIC is ALWAYS SETTING the anode PGA IC62 to maximum gain when set to auto.
I do not have the source code for the PIC as it is black box closed source code :( so I can only speculate on how the code works.
I hate debugging black box micro code hardware faults but what can you do?
However I am going to suggest the following.
The PIC first measures the voltage level on AD AN0 (pin2) the input to IC62 the anode PGA.
Second based on what voltage it sees at the input to the PGA it then selects the correct gain range for the PGA.
The PIC next measures the value at the output of the PGA with AD AN2 (pin4). This is the value it presents in the results data.
The PIC does no bounds checking for the value it gets at AN2 so if the data is full scale (PGA clipping) you simply get a full scale reading of 4.5mA.
This makes sense as a good code strategy as it would always allow finding the correct PGA gain setting in a maximum of two AD measurements of the test pulse and would be consistently fast.
The lack of any bounds checking is common as programmers almost always assume the hardware is good and rarely sanity check results from hardware measurements.
After all it takes more code, more real time and more programming effort to check your results for errors. Human factors are what they are.
4)
So my money is on there is a connectivity failure between PIC pin AN0 (pin2) and the PGA for the anode,
IC62 CH1 (pin2).
This could be a PIC not fully set in the socket (common) OR pin #2 of the PIC is bent OR PIC pin#2 of the socket is not soldered OR there is a copper track defect on the PCB between PIC pin #2 and IC62 pin #2.
I suggest buzzing the connectivity out between the actual pin #2 on the pic and at actual pin #2 on the PGA.
Look out in testing the connectivity as the connection may be intermittent if the cause is a loose connection.
May times I have encountered testing shows all connections are fine because pushing on the pin with the ohm meter probe corrects the loose connection.
That is my best shot on you issue.
Good luck and let me know how it goes.
Bob