PIC12F1822 analogue channels

Thread Starter

Torbek

Joined Apr 19, 2019
50
Pic12F1822
If I select input 4 and AN channel 3, I assume the two work together? The reason I ask is that it seems this particular pic has the 3 analogue channels butAN4 is not available for use but pin4 is, however, AN3 is available for use but pin3 isnt!

So I can only assume that AN CH3 works with pin4? It doesn't seem clear in the manual about this!

Any help appreciated.
 

hexreader

Joined Apr 16, 2011
540
No need to assume - the datasheet is clear....

Check out table 1

TABLE 1: 8-PIN ALLOCATION TABLE (PIC12F/LF1822)
RA4 is pin 3 (AN3), not pin 4

Not sure what you mean by "input 4"

Feel free to post full code for better, clearer advice.
 

LesJones

Joined Jan 8, 2017
3,506
The PIC12F1822 has 4 AD channels AN0, AN1, AN2 and AN3. The pins use depends on the setting of various registers. Just because pin 7 can be RA0 or AN0 it does not mean that there is any relationship between them. Pin 7 can also be DACOUT serial TX and some other functions.

Les.
 
Top