You would need help of a good technician or EE, here are some thoughts -
1) Check the signal grounds for the analog and digital are split, and only join
together at the point the leave the board or meet the power rails for the
system.
2) Use a scope and look for ground bounce on PIC power supply. It power should
be bypassed at chip with .01 and .1 uF ceramic disk and a 5 - 10 uF tantalum.
Tant should be polymer tant for best performance. Same rules apply to IA.
3) Try using signal averaging in code, read several samples, sum them, and divide
by number of samples. That helps remove un-correlated noise (PWM noise is
correlated).
4) Any hi z signal path should be isolated on board from coupling of power rails,
like MOSFET source/drain connections. Eg. use a trace that is surrounded by ground.
See the following -
https://www.dropbox.com/s/ruaf9booe17jk8n/PCB%20Layout.zip?dl=0Regards, Dana