Teatimer2

by Martin Clausen (mc AT rotgradpsi DOT de)

This is a short time timer made with an P89LPC92X. It is supporting times from 1 minute to 16 minutes.

You have been a lazy bone and now you have to work all night. So there is a need for strong tea. You start to make the tea, but you forget the time and it tastes: brrrr ...

Table of contents:

Usage

Simply press a key and the selected time is running. At the start it makes one beep, after the selected time there are three beeps.

Principle of Operation

The start button is effectively a reset button. After reset the MCU reads the status of the input pins to determ the requested time. The common connection of the code switch is pulled low to read only. A permanent connection to ground would cause a relatively huge current flow all the time because of the pull up resistor inside the MCU. A beep is performed to show activity. According to the jumper setting the number of cyles for this time is determed. A cycle is the time, that is necassary for Timer 0 to roll over, while working as a 13 stages counter. At 7.3728MHz with a DIVM of 450 60 cycles are one minute. During each cycle the MCU first flashes an LED (optional) and then goes into idel mode to reduce power consumption (about 1mW at 3V). Only Timer 0 and the oscillator are running. After all necassary cycles three beeps are performed and the MCU enters total power down mode until the next reset. The current consumtion is typically 1ľA. However, to reach this level all pins have to be at a defined high or low level. Therefore all pins have their internal pull-ups enabled and P1.2 and P1.3 are wired to P1.4 to share the pull-up of P1.4. Do not use an open drain output for the LED, because the LED limits the voltage level at the port pin during off time to about 1.3V leading to an increased power consumtion of the input circuit of that port pin.

Parts

Download of Program and Circuit

The part description in schematics is read as follows:
part type + value in exponential form + package description + subpart number in package
for example: C1040805,1 means Capacitor, 100nF, package SMD 0805, first subpart in package

Disclaimer: No warranty at all!
Copyright by Martin Clausen, Germany.
Contact the author: mc AT rotgradpsi DOT de
Impressum