|
RFPIC12F675 Datasheet, PDF (33/136 Pages) Microchip Technology – FLASH-Based Microcontroller with ASK/FSK Transmitter | |||
|
◁ |
rfPIC12F675
6.0 COMPARATOR MODULE
The rfPIC12F675 devices have one analog
comparator. The inputs to the comparator are
multiplexed with the GP0 and GP1 pins. There is an
on-chip Comparator Voltage Reference that can also
be applied to an input of the comparator. In addition,
GP2 can be configured as the comparator output.
The Comparator Control Register (CMCON), shown
in Register 6-1, contains the bits to control the
comparator.
REGISTER 6-1:
CMCON â COMPARATOR CONTROL REGISTER (ADDRESS: 19h)
U-0
R-0
U-0
R/W-0 R/W-0 R/W-0 R/W-0
â
COUT
â
CINV
CIS
CM2
CM1
bit 7
R/W-0
CM0
bit 0
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2-0
Unimplemented: Read as â0â
COUT: Comparator Output bit
When CINV = 0:ï
1 = VIN+ > VIN-ï
0 = VIN+ < VIN-
When CINV = 1:ï
1 = VIN+ < VIN-
0 = VIN+ > VIN-
Unimplemented: Read as â0â
CINV: Comparator Output Inversion bitï
1 = Output invertedï
0 = Output not inverted
CIS: Comparator Input Switch bitï
When CM2:CM0 = 110 or 101:ï
1 = VIN- connects to CIN+ï
0 = VIN- connects to CIN-
CM2:CM0: Comparator Mode bitsï
Figure 6-2 shows the Comparator modes and CM2:CM0 bit settings
Legend:
R = Readable bit
- n = Value at POR
W = Writable bit
â1â = Bit is set
U = Unimplemented bit, read as â0â
â0â = Bit is cleared x = Bit is unknown
ï£ 2003-2013 Microchip Technology Inc.
Preliminary
DS70091B-page 33
|
▷ |