Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

PIC18F1230-E/SOSQTP Datasheet(PDF) 176 Page - Microchip Technology

Part # PIC18F1230-E/SOSQTP
Description  18/20/28-Pin, Enhanced Flash Microcontrollers with nanoWatt Technology, High-Performance PWM and A/D
PDF  312 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC18F1230-E/SOSQTP Datasheet(HTML) 176 Page - Microchip Technology

Back Button PIC18F1230-E/SOSQTP Datasheet HTML 172Page - Microchip Technology PIC18F1230-E/SOSQTP Datasheet HTML 173Page - Microchip Technology PIC18F1230-E/SOSQTP Datasheet HTML 174Page - Microchip Technology PIC18F1230-E/SOSQTP Datasheet HTML 175Page - Microchip Technology PIC18F1230-E/SOSQTP Datasheet HTML 176Page - Microchip Technology PIC18F1230-E/SOSQTP Datasheet HTML 177Page - Microchip Technology PIC18F1230-E/SOSQTP Datasheet HTML 178Page - Microchip Technology PIC18F1230-E/SOSQTP Datasheet HTML 179Page - Microchip Technology PIC18F1230-E/SOSQTP Datasheet HTML 180Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 176 / 312 page
background image
PIC18F1230/1330
DS39758B-page 174
Advance Information
© 2006 Microchip Technology Inc.
16.1
Comparator Configuration
For every analog comparator, there is a control bit
called CMENx in the CMCON register. By setting the
CMENx bit, the corresponding comparator can be
enabled. If the Comparator mode is changed, the
comparator output level may not be valid for the
specified mode change delay shown in Section 22.0
“Electrical Characteristics”.
16.2
Comparator Operation
A single comparator is shown in Figure 16-1, along with
the relationship between the analog input levels and
the digital output. When the analog input at VIN+
(CMPx) is less than the analog input VIN- (CVREF), the
output of the comparator is a digital low level. When the
analog input at VIN+ (CMPx) is greater than the analog
input VIN- (CVREF), the output of the comparator is a
digital high level. The shaded areas of the output of the
comparator in Figure 16-1 represent the uncertainty
due to input offsets and response time.
16.3
Comparator Reference
In this comparator module, an internal voltage
reference is used (see Section 17.0 “Comparator
Voltage Reference Module”).
FIGURE 16-1:
SINGLE COMPARATOR
16.4
Comparator Response Time
Response time is the minimum time, after selecting a
new reference voltage or input source, before the
comparator output has a valid level. If the internal
reference is changed, the maximum delay of the
internal voltage reference must be considered when
using
the
comparator
outputs.
Otherwise,
the
maximum delay of the comparators should be used
(see Section 22.0 “Electrical Characteristics”).
16.5
Comparator Outputs
The comparator outputs are read through the CxOUT
bits of the CMCON register. These bits are read-only.
The uncertainty of each of the comparators is related to
the input offset voltage and the response time given in
the specifications.
16.6
Comparator Interrupts
The comparator interrupt flag is set whenever there is
a change in the output value of the corresponding
comparator. Software will need to maintain information
about the status of the output bits, as read from
CMCON<7:5>, to determine the actual change that
occurred.
The
CMPxIF
bit
(PIR1<3:1>)
is
the
Comparator Interrupt Flag. The CMPxIF bit must be
reset by clearing it. Since it is also possible to write a ‘1’
to this register, a simulated interrupt may be initiated.
Both the CMPxIE bit (PIE1<3:1>) and the PEIE bit
(INTCON<6>) must be set to enable the interrupt for
the corresponding comparator. In addition, the GIE bit
(INTCON<7>) must also be set. If any of these bits are
clear, the interrupt is not enabled, though the CMPxIF
bit will still be set if an interrupt condition occurs.
The user, in the Interrupt Service Routine, can clear the
interrupt in the following manner:
a)
Any read or write of CMCON will end the
mismatch condition.
b)
Clear flag bit CMPxIF.
A mismatch condition will continue to set flag bit
CMPxIF. Reading CMCON will end the mismatch
condition and allow flag bit CMPxIF to be cleared.
Note:
Comparator interrupts should be disabled
during
a
Comparator
mode
change;
otherwise, a false interrupt may occur.
-
+
VIN+
Output
Output
VIN-
VIN+
VIN-
Note 1: When reading the PORT register, all pins
configured as analog inputs will read as a
‘0’. Pins configured as digital inputs will
convert an analog input according to the
Schmitt Trigger input specification.
2: Analog levels on any pin defined as a
digital input may cause the input buffer to
consume more current than is specified.
Note:
If a change in the CMCON register (C2OUT,
C1OUT or C0OUT) should occur when a
read operation is being executed (start of
the Q2 cycle), then the CMPxIF (PIR1
register) interrupt flag may not get set.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com