Ttelmah
Joined: 11 Mar 2010 Posts: 20061
|
|
Posted: Mon Aug 17, 2015 8:28 am |
|
|
I see very little HF decoupling.
The electrolytic capacitors will block low frequency noise, but not HF noise. You need something like a 100nF ceramic capacitor adjacent to every major IC, and a couple right by the supply pins to the PIC, and the Vref input.
Then if you have a Vref, use it. You started with code that was selecting the Vdd as the reference, so everything afterwards was based on this. However if you have got a Vref, then you need to change the analog setup to use this.
However there is a problem if the Vref is 4.6v. The analog inputs are not allowed to go more than 0.3v above the Vref.
Also (obviously) if using the Vref, your maths needs to change to use it's voltage, not 5v. |
|