PIC16F1826-I/MQ Microchip Technology, PIC16F1826-I/MQ Datasheet - Page 128

no-image

PIC16F1826-I/MQ

Manufacturer Part Number
PIC16F1826-I/MQ
Description
IC, 8BIT MCU, PIC16F, 32MHZ, QFN-28
Manufacturer
Microchip Technology
Datasheet

Specifications of PIC16F1826-I/MQ

Controller Family/series
PIC16F
Eeprom Memory Size
256Byte
Ram Memory Size
256Byte
Cpu Speed
32MHz
No. Of Timers
3
Interface
EUSART, I2C, SPI
Core Size
8 Bit
Program Memory Size
2kWords
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
PIC16F/LF1826/27
12.3.3
The ANSELB register (Register 12-12) is used to
configure the Input mode of an I/O pin to analog.
Setting the appropriate ANSELB 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 ANSELB bits has no affect on digital
output functions. A pin with TRIS clear and ANSELB 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.
The TRISB register (Register 12-9) controls the PORTB
pin output drivers, even when they are being used as
analog inputs. The user should ensure the bits in the
REGISTER 12-12: ANSELB: PORTB ANALOG SELECT REGISTER
DS41391B-page 128
bit 7
Legend:
R = Readable bit
u = Bit is unchanged
‘1’ = Bit is set
bit 7-1
bit 0
Note 1:
R/W-1/1
ANSB7
When setting a pin to an analog input, the corresponding TRIS bit must be set to Input mode in order to
allow external control of the voltage on the pin.
ANSELB REGISTER
ANSB<7:1>: Analog Select between Analog or Digital Function on Pins RB<7:1>, respectively
0 = Digital I/O. Pin is assigned to port or digital special function.
1 = Analog input. Pin is assigned as analog input
Unimplemented: Read as ‘0’
R/W-1/1
ANSB6
W = Writable bit
x = Bit is unknown
‘0’ = Bit is cleared
R/W-1/1
ANSB5
R/W-1/1
ANSB4
Preliminary
U = Unimplemented bit, read as ‘0’
-n/n = Value at POR and BOR/Value at all other Resets
R/W-1/1
ANSB3
TRISB register are maintained set when using them as
analog inputs. I/O pins configured as analog input always
read ‘0’.
Note:
(1)
. Digital input buffer disabled.
The ANSELB register must be initialized to
configure an analog channel as a digital
input. Pins configured as analog inputs will
read ‘0’.
R/W-1/1
ANSB2
© 2009 Microchip Technology Inc.
R/W-1/1
ANSB1
U-0
bit 0

Related parts for PIC16F1826-I/MQ