Looks good! You can actually still use the PGD & PGC for the programmer AND for the analog inputs, and still not lose your debugging ability. You just tie PGD to EMUDx and PGC to EMUCx (for any x that is convenient). EMUD and EMUC are alternate debugging pins. So, you would include a toggle switch. You switch it to state A to program it, then switch it to state B to either debug the program, or just run the program like normal, using those pins as analog. I'm doing that this time with a project for my job.
|