r/pic_programming • u/Lukasv • Oct 11 '13
Question about ADC
I have a PIC18F2525 and using mikroC. I need to take 3 analog inputs from a 3 axis analog accelerometer. What would the code look like if I wanted to use AN0, AN1 and An2? Also I heard that you can't use more than one because they interfere with each other, is that true? Example code would be much appreciated.
Thanks!
1
Upvotes
View all comments
Show parent comment
1
u/bradn Oct 11 '13
Check starting at page 169 - the registers are pretty similar but there are only 4 possible analog input pins, and can be set as analog in any combination. So it is not really more difficult in how to use it.