Philips Semiconductors

User’s Manual - Preliminary -

 

 

 

 

 

 

ANALOG COMPARATORS

P89LPC901/902/903

 

 

10. ANALOG COMPARATORS

 

 

One analog comparator is provided on the P89LPC901 and two analog comparators are provided on both the P89LPC902 and P89LPC903 . Comparator operation is such that the output is a logical one when the positive input is greater than the negative input (selectable from a pin or an internal reference voltage). Otherwise the output is a zero. The output may be read in a register. On the P89LPC902 the output may also be routed to a pin. The comparator(s) may be configured to cause an interrupt when the output value changes.

The connections to the comparator(s) are shown in Figure 10-2 - Figure 10-4. The comparator functions to VDD = 2.4V.

When the comparator is first enabled, the comparator output and interrupt flag are not guaranteed to be stable for 10 microseconds. The comparator interrupt should not be enabled during that time, and the comparator interrupt flag must be cleared before the interrupt is enabled in order to prevent an immediate interrupt service.

Comparator Configuration

The comparator(s) have a control register(s), CMPn, and is shown in Figure 10-1. The possible configurations for the comparator are shown in Figure 10-5.

CMPn

 

 

 

 

 

 

 

 

 

 

 

 

Address: ACh

 

7

6

 

5

4

3

2

1

0

 

Not bit addressable

 

-

-

 

CEn

-

CNn

OEn

COn

CMFn

 

Reset Source(s): Any reset

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Reset Value: xx000000B

 

 

 

 

 

 

 

 

 

 

 

BIT

SYMBOL

FUNCTION

 

 

 

 

 

 

 

 

 

CMP.7, 6

-

Reserved for future use.

 

 

 

 

 

 

 

CMP.5

CEn

Comparator enable. When set, the comparator function is enabled. Comparator output is

 

 

stable 10 microseconds after CEn is set.

 

 

 

 

 

CMP.4

-

Reserved for future use.

 

 

 

 

 

 

 

CMP.3

CNn

Comparator negative input select. When 0, the comparator reference pin CMPREF is

 

 

selected as the negative comparator input. When 1, the internal comparator reference,

 

 

Vref, is selected as the negative comparator input.

 

 

 

 

CMP.2

OEn

Output enable. When 1, the comparator output is connected to the CMPn pin if the

 

 

comparator is enabled (CEn = 1). This output is asynchronous to the CPU clock.

CMP.1

COn

Comparator output, synchronized to the CPU clock to allow reading by software.

CMP.0

CMFn

Comparator interrupt flag. This bit is set by hardware whenever the comparator output

 

 

COn changes state. This bit will cause a hardware interrupt if enabled. Cleared by

 

 

software.

 

 

 

 

 

 

 

 

 

Figure 10-1: Comparator Control Registers (CMP1 and CMP2)

2003 Dec 8

75

Page 75
Image 75
Philips P89LPC901, P89LPC903, P89LPC902 user manual Comparator Configuration, CMPn

P89LPC903, P89LPC902, P89LPC901 specifications

The Philips P89LPC901, P89LPC902, and P89LPC903 are a series of 8-bit microcontrollers designed for embedded system applications. These models, which belong to the LPC900 series, are notable for their affordability and versatility, making them an attractive choice for both hobbyists and professional developers.

One of the core features of the P89LPC901, P89LPC902, and P89LPC903 microcontrollers is their powerful 8-bit architecture. Operating at clock speeds up to 20 MHz, they deliver efficient performance suited for a range of tasks. Each model includes a comprehensive instruction set that supports various data manipulation and arithmetic functions, enabling extensive programming capabilities.

These microcontrollers come with built-in memory, with configurations that vary among the three models. The P89LPC901 typically features 4 KB of Flash memory and 256 bytes of RAM, while the P89LPC902 and P89LPC903 offer enhanced memory options. This Flash memory allows for reprogrammability, making it easier to update and modify applications as needed.

Another significant characteristic of the LPC900 series is their integrated peripherals. These models are equipped with a variety of I/O ports, allowing for easy interfacing with other devices and components. The P89LPC901 supports up to 32 I/O pins, while the P89LPC902 and P89LPC903 provide additional features such as analog-to-digital converters (ADCs), timers, and serial communication interfaces. This broad range of peripherals empowers developers to design complex applications without needing extra hardware.

Power consumption is also a key consideration for microcontroller applications. The P89LPC901, P89LPC902, and P89LPC903 are designed with low power consumption in mind, making them ideal for battery-operated devices and energy-efficient projects. They can operate in various power modes, allowing for greater flexibility in deployment.

In terms of technology, these microcontrollers utilize advanced CMOS technology, ensuring high reliability and durability. Their design offers a robust solution for numerous applications, including consumer electronics, industrial controls, and automation systems.

In summary, the Philips P89LPC901, P89LPC902, and P89LPC903 microcontrollers present an attractive combination of performance, integrated peripherals, low power consumption, and versatility. Their features cater to a wide array of applications, keeping them relevant in a rapidly evolving technology landscape. For hobbyists and professionals alike, these microcontrollers represent a reliable foundation for embedded system development.