There are three countdown timers in the 83+ SE. They are based on a 32.768 kHz crystal. Each one consists of three ports. Refer to the following table: On/off port Loop control Counter Timer1 30 31 32 Timer2 33 34 35 Timer3 36 37 38 Each timer is independent of the others. You can either activate the timer in an endless counting, or set it a number to countdown and stop. Speed values: 40h - 10922.67 Hz (32768 Hz / 3) 41h - 933 Hz (32768 Hz / 33) 42h - 100 Hz (32768 Hz / 328) 43h - 10 Hz (32768 Hz / 3277) 44h - 32768 Hz 45h - 2048 Hz (32768 Hz / 16) 46h - 128 Hz (32768 Hz / 256) 47h - 8 Hz (32768 Hz / 4096) 80h - CPU clock speed 81h - CPU clock / 2 82h - CPU clock / 4 84h - CPU clock / 8 88h - CPU clock / 16 90h - CPU clock / 32 A0h - CPU clock / 64 To start the timer: There are three steps: First pick a timer 1-3...this will determine what three consecutive ports you will use (30-32h, 33-35h, 36-38h). 1. To the on/off port (30,33,36) output a speed value from the table above. 2. To the loop control port output a value depending on the desired behavior: 00h - Countdown and stop when the counter reaches zero. 01h - Countsdown, but when the counter hits zero, loops back to FFh and continues. 02h - When it reaches zero, an interrupt is generated. This interrupt is viewable in the upper three bits of port 4 (the interrupt port). You must clear the interrupt by writing to this loop control port (31,34,37) again. 03h - Same as 02h except acts like 01h (02h is like 00h, since bit 0 is whether the timer restarts, and bit 1 is whether it triggers interrupts). Bit 3 of the port will be set if an interrupt was missed (i.e. two interrupts have occured since you didn't clear the interrupt after the first one). 3. Now that you've set up the timer's parameters, output the value to start counting down from. This goes to the counter port (32,35,38). The highest value is obviously 0FFh, if you wanted 255 'ticks' until the time reaches zero.