Code: Select all
ANSEL := 0; // Set AN pins to Digital I/O
ANSELH := 0;
Thanks,
Jim
#1 Post by JimKueneman » 10 Jan 2009 22:06
Code: Select all
ANSEL := 0; // Set AN pins to Digital I/O
ANSELH := 0;
#2 Post by rmteo » 10 Jan 2009 22:38
3.2.1 ANSEL REGISTER
The ANSEL register (Register 3-3) is used to configure
the Input mode of an I/O pin to analog. Setting the
appropriate ANSEL bit high will cause all digital reads
on the pin to be read as ‘0’ and allow analog functions
on the pin to operate correctly.
The state of the ANSEL bits has no affect on digital output
functions. A pin with TRIS clear and ANSEL set will
still operate as a digital output, but the Input mode will
be analog. This can cause unexpected behavior when
executing read-modify-write instructions on the
affected port.
3.4.1 ANSELH REGISTER
The ANSELH register (Register 3-4) is used to
configure the Input mode of an I/O pin to analog.
Setting the appropriate ANSELH bit high will cause all
digital reads on the pin to be read as ‘0’ and allow
analog functions on the pin to operate correctly.
The state of the ANSELH bits has no affect on digital
output functions. A pin with TRIS clear and ANSELH
set will still operate as a digital output, but the Input
mode will be analog. This can cause unexpected
behavior when executing
#3 Post by JimKueneman » 27 Jan 2009 00:41
Return to “mikroPascal General”