Philips Semiconductors

User’s Manual - Preliminary -

 

 

 

 

 

 

TIMERS 0 AND 1

P89LPC901/902/903

 

 

Mode 3

 

 

When Timer 1 is in Mode 3 it is stopped. The effect is the same as setting TR1 = 0.

Timer 0 in Mode 3 establishes TL0 and TH0 as two separate 8-bit counters. The logic for Mode 3 on Timer 0 is shown in Figure 5-7. TL0 uses the Timer 0 control bits: TR0 and TF0. TH0 is locked into a timer function (counting machine cycles) and takes over the use of TR1 and TF1 from Timer 1. Thus, TH0 now controls the “Timer 1” interrupt.

Mode 3 is provided for applications that require an extra 8-bit timer.

Note: When Timer 0 is in Mode 3, Timer 1 can be turned on and off by switching it into and out of its own Mode 3. It can still be used by the serial port as a baud rate generator (P89LPC903 only), or in any application not requiring an interrupt.

Mode 6 - P89LPC901

In this mode, Timer 0 can be changed to a PWM with a full period of 256 timer clocks (see Figure 5-8). Its structure is similar to mode 2, except that:

TF0 is set and cleared in hardware;

The low period of the TF0 is in TH0, and should be between 1 and 254, and;

The high period of the TF0 is always 256-TH0.

Loading TH0 with 00h will force the T0 pin high, loading TH0 with FFh will force the T0 pin low.

Note that an interrupt can still be enabled on the low to high transition of TF0, and that TF0 can still be cleared in software as in any other modes.

TCON

 

7

6

5

4

3

2

 

1

0

 

Address: 88h

 

 

TF1

TR1

TF0

TR0

-

-

 

-

-

 

Bit addressable

 

 

 

 

 

 

 

 

 

 

 

 

Reset Source(s): Any reset

 

 

 

 

 

 

 

 

 

 

 

Reset Value: 00000000B

 

 

 

 

 

 

 

 

 

 

 

BIT

SYMBOL

FUNCTION

 

 

 

 

 

 

 

 

 

TCON.7

TF1

Timer 1 overflow flag. Set by hardware on Timer overflow. Cleared by hardware when the

 

 

interrupt is processed, or by software.

 

 

 

 

 

 

TCON.6

TR1

Timer 1 Run control bit. Set/cleared by software to turn Timer 1 on/off.

 

 

TCON.5

TF0

Timer 0 overflow flag. Set by hardware on Timer/Counter overflow. Cleared by hardware

 

 

when the processor vectors to the interrupt routine, or by software. (except in mode 6, see

 

 

above, when it is cleared in hardware)

 

 

 

 

 

 

TCON.4

TR0

Timer 0 Run control bit. Set/cleared by software to turn Timer/Counter 0 on/off.

TCON.3

-

Reserved for future use. Should not be set to 1 by user programs.

 

 

 

TCON.2

-

Reserved for future use. Should not be set to 1 by user programs.

 

 

 

TCON.1

-

Reserved for future use. Should not be set to 1 by user programs.

 

 

 

TCON.0

-

Reserved for future use. Should not be set to 1 by user programs.

 

 

 

Figure 5-3: Timer/Counter Control register (TCON)

2003 Dec 8

47

Page 47
Image 47
Philips P89LPC902, P89LPC903 user manual P89LPC901/902/903 Mode, Mode 6 P89LPC901, Tcon

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.