C8051F340/1/2/3/4/5/6/7

1.10. Comparators

C8051F340/1/2/3/4/5/6/7 devices include two on-chip voltage comparators that are enabled/disabled and configured via user software. Port I/O pins may be configured as comparator inputs via a selection mux. Two comparator outputs may be routed to a Port pin if desired: a latched output and/or an unlatched (asyn- chronous) output. Comparator response time is programmable, allowing the user to select between high-speed and low-power modes. Positive and negative hysteresis are also configurable.

Comparator interrupts may be generated on rising, falling, or both edges. When in IDLE mode, these inter- rupts may be used as a “wake-up” source. Comparator0 may also be configured as a reset source. Figure 1.10 shows the Comparator0 block diagram.

 

CMXnN2

CPTnMX

CMXnN1

CMXnN0

CMXnP2

 

 

CMXnP1

 

CMXnP0

 

CPnEN

 

 

CPnOUT

 

CPTnCN

CPnRIF

VDD

CPnFIF

 

 

 

 

CPnHYP1

 

 

CPnHYP0

 

 

CPnHYN1

 

 

CPnHYN0

 

CPn

Interrupt

CPnCPn

Rising-edge Falling-edge

CPn +

+

-

GND

CPn -

D SET

Q

 

D SET

Q

 

CLR

Q

 

CLR

Q

(SYNCHRONIZER)

Interrupt CPnRIE

Logic CPnFIE

CPn

Crossbar

CPnA

Port I/O connection options vary with package (32-pin or 48-pin)

CPTnMD

CPnRIE

CPnFIE

 

 

CPnMD1

 

CPnMD0

Reset Decision Tree (Comprator 0 Only)

Figure 1.10. Comparator0 Block Diagram

Rev. 0.5

29

Page 29
Image 29
Silicon Laboratories C8051F344, C8051F347, C8051F346, C8051F341, C8051F343, C8051F340, C8051F345 Comparator0 Block Diagram