I did not find the problem but did get the code working.
I was setting up the A to D with the direct registers and had the setup wrong.
I just changed the code to use the ADCIN command and all is now working.
Something was messed up where I was reading the A to D justified register into a variable word using. .highbyte and. .Lowbyte
Yes this is on a breadboard but the results are now very stable as expected.
Thanks all…
tcbcats




Bookmarks