T48C510 ATMEL | Alldatasheet

Document overview

  • Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
  • PDF pages: 61

Technical content

Figure 1. Block diagram

Rev. A2, 26-Feb-01 Preliminary Information 2 (61)

Ordering Information

Extended Type Number Package Remarks T48C510 – ILS SSO44 Stick T48C510 – ILQ SSO44 Taped and reeled SCLIN BPC 0 BP00 BP12 BP11 BP10 OSCIN OSCOUT BP01 BP02 BP03 NRST V SS VDD BP43 BP42 BP41 BP40 BPB3 BPB2 BPB1 BPB0 BP70 BP71 BP72 BP73 BP53 BP52 BP51 BP50 TIM1 BPA3 BPA2 BPA1 BPA0 TE AVDD BP61 BP60 BPC1 BP13 PM BPC3 BPC2 T48C510 Figure 2. Pin connections SSO44-package

4 I/O lines of Port 0 – automatic nibblewise configurable / programmer interface

4 I/O lines of Port 1 – automatic nibblewise configurable

4 I/O lines of high current Port 5 – bitwise configurable

4 I/O lines of high current Port 7 – bitwise configurable

4 I/O lines of Port A – bitwise configurable, as inputs to a port monitor module and optional

4 I/O lines of Port B – bitwise configurable I/O and as inputs to a port monitor module

4 I/O lines of Port C – bitwise configurable I/O

2 I/O lines of Port 6 – bitwise configurable I/O or as external programmable interrupts

coded reset can cause a low pulse on this pin.

Rev. A2, 26-Feb-01 3 (61) Table of Contents

Rev. A2, 26-Feb-01 Preliminary Information 4 (61) Table of Contents (continued)

1 MARC4 Architecture

Figure 3. MARC4 core

1.1 General Description

gramming without any loss in efficiency or code density.

1.2 Components of MARC4 Core

1.2.1 EEPROM

predefining a maximum program bank size of 4 Kbytes.

Figure 4. EEPROM map of T48C510 figure 4. Look-up tables of constants can also be held in

1.2.2 RAM

the return stack and data memory for variables and arrays. address registers SP , RP , X and Y . for temporary storage of data. definable location and maximum depth.

1.2.3 Registers

TABLE instruction to fetch 8-bit wide constants.

Figure 5. RAM map access to any of the 256 RAM nibbles. postdecrements if an element is removed from the stack. to be initialized with “>RP FCh ”. in the RAM can be compared, filled or moved. data from the ALU, EEPROM, RAM or I/O bus. manipulation of the condition code register.

Figure 6. Programming model

1.2.4 ALU

Figure 7. ALU zero-address operations branch flag in the condition code register (CCR).

1.2.5 Instruction Set

1.2.6 I/O Bus

1.3 Interrupt Structure

interrupting module (see section “Peripheral Modules”).

0 Priority level

Figure 8. Interrupt handling rupt service routine is finished with the RTI instruction. then delayed until the interrupt-enable flag is set again. and interrupt active registers are all reset.

Rev. A2, 26-Feb-01 11 (61) Table 2 Interrupt priority table Interrupt Priority EEPROM Address Maskable Interrupt Opcode ÁÁÁÁ ÁÁÁÁ INT0 ÁÁÁÁÁ ÁÁÁÁÁ lowest ÁÁÁÁÁÁ ÁÁÁÁÁÁ 040h ÁÁÁÁÁ ÁÁÁÁÁ Yes ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ C8h (SCALL 040h) ÁÁÁÁ ÁÁÁÁ INT1 ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁ 080h ÁÁÁÁÁ ÁÁÁÁÁ Yes ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ D0h (SCALL 080h) ÁÁÁÁ ÁÁÁÁ INT2 ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁ 0C0h ÁÁÁÁÁ ÁÁÁÁÁ Yes ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ D8h (SCALL 0C0h) ÁÁÁÁ ÁÁÁÁ INT3 ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁ 100h ÁÁÁÁÁ ÁÁÁÁÁ Yes ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ E8h (SCALL 100h) ÁÁÁÁ ÁÁÁÁ INT4 ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁ 140h ÁÁÁÁÁ ÁÁÁÁÁ Yes ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ E8h (SCALL 140h) ÁÁÁÁ ÁÁÁÁ INT5 ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁ 180h ÁÁÁÁÁ ÁÁÁÁÁ Yes ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ F0h (SCALL 180h) ÁÁÁÁ ÁÁÁÁ INT6 ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁ 1C0h ÁÁÁÁÁ ÁÁÁÁÁ Yes ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ F8h (SCALL 1C0h) ÁÁÁÁ ÁÁÁÁ INT7 ÁÁÁÁÁ ÁÁÁÁÁ highest ÁÁÁÁÁÁ ÁÁÁÁÁÁ 1E0h ÁÁÁÁÁ ÁÁÁÁÁ Yes ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ FCh (SCALL 1E0h)

1.3.1 Hardware Interrupts

Table 3 Hardware interrupts Interrupt Possible Interrupt PrioritiesRST Interrupt Mask Function Source 0 1 2 3 4 5 6 7 Register Bit ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ NRST external ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ X ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ low level active ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Watchdog ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ 1/2 – 2 sec. time out ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Port A coded reset ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ level any inputs ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Port A monitor ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ PAIPR ÁÁÁ ÁÁÁ ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ any edge, any input ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Port B monitor ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ PBIPR ÁÁÁ ÁÁÁ ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ any edge, any input ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Port 60 external ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ P6CR ÁÁÁ ÁÁÁ 1,0 ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ any edge ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Port 61 external ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ P6CR ÁÁÁ ÁÁÁ 3,2 ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ any edge ÁÁÁÁÁÁÁ Á ÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Interval timer INTA ÁÁÁ Á Á Á ÁÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁÁ Á Á Á ÁÁÁ ÁÁÁ Á Á Á ÁÁÁ ÁÁÁÁÁ Á ÁÁÁ Á ÁÁÁÁÁ ITIPR ÁÁÁ Á Á Á ÁÁÁ ÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁ 1 of 8 frequencies (1 – 128 Hz) ÁÁÁÁÁÁÁ Á ÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Interval timer INTB ÁÁÁ Á Á Á ÁÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁÁ Á Á Á ÁÁÁ ÁÁÁ Á Á Á ÁÁÁ ÁÁÁÁÁ Á ÁÁÁ Á ÁÁÁÁÁ ITIPR ÁÁÁ Á Á Á ÁÁÁ ÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁ 1 of 8 frequencies (8 – 8192 Hz) ÁÁÁÁÁÁÁ Á ÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Timer 0 ÁÁÁ Á Á Á ÁÁÁ ÁÁ ÁÁ ÁÁ * ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ *ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ *ÁÁ ÁÁ ÁÁ ÁÁÁ Á Á Á ÁÁÁ * ÁÁÁ Á Á Á ÁÁÁ ÁÁÁÁÁ Á ÁÁÁ Á ÁÁÁÁÁ T0CR ÁÁÁ Á Á Á ÁÁÁ 0 ÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁ overflow/compare/ end measurement ÁÁÁÁÁÁÁ Á ÁÁÁÁÁ Á Timer 1 ÁÁÁ Á Á Á ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁ ÁÁÁ Á Á Á ÁÁÁ Á Á Á ÁÁÁÁÁ Á ÁÁÁ Á T1CR ÁÁÁ Á Á Á ÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁ Á compare X = hardwired (neither optional or software configurable) # = configurable option (see “Hardware Options”) * = software configurable (see “Peripheral Modules” section for further details) In the T48C510, there are eleven hardware interrupt sources which can be programmed to occupy a variety of priority levels. With the exception of the reset sources (RST), each source can be individually masked by mask bits in the corresponding control registers. An overview of the possible hardware configurations is shown in table 3.

1.3.2 Software Interrupts

The program can generate interrupts using the software interrupt instruction (SWI) which is supported in qFORTH by predefined macros named SWI0...SWI7. The software triggered interrupt operates in exactly the same way as any hardware triggered interrupt. The SWI instruction takes the top two elements from the expression stack and writes the corresponding bits via the I/O bus to the interrupt pending register. Thus, by using the SWI instruction, interrupts can be re-prioritized or lower priority processes scheduled for later execution.

1.4 Hardware Reset

the occurrence of a coded reset on Port A (see figure 9). vated pullup and pulldown transistors (see figure 10). peripheral configuration registers. momentarily below the minimum operating supply. a reset in the same way as the NRST pin. applies especially if the pins have a high capacitive load. timer register address (CWD). stimulus from any of the above sources. Figure 9. Reset configuration/ start-up sequence

No pullup/ pulldown New configurationOld config. Figure 10. Normal mode start-up

1.5 Clock Generation

1.5.1 Clock Module

in the SC-register and the CCS-bit in the CM-register. operating temperature and voltage range. could be caused by clock source switching.

Figure 11. Clock module

1.5.2 Oscillator Circuits and External

than ±50% over the full temperature and voltage range. Figure 12. RC-oscillator 1 Figure 13. External input clock

Rev. A2, 26-Feb-01 Preliminary Information 16 (61)

1.5.3 Clock Management Register (CM)

The clock management register (CM) controls the system clock divider chain, as well as the peripheral clock in the power-down modes. Auxiliary register address: ’E’hex Bit 3 Bit 2 Bit 1 Bit 0 ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ CM: ÁÁÁÁ ÁÁÁÁ NSTOP ÁÁÁÁ ÁÁÁÁ CCS ÁÁÁÁ ÁÁÁÁ CSS1 ÁÁÁÁ ÁÁÁÁ CSS0 ÁÁ ÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Reset value: 1111b ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁ ÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á ÁÁ Á Á ÁÁ Á ÁÁÁÁ NSTOP ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á Á ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ N ot STOP peripheral clock NSTOP = 0, stops the peripheral clock (SUBCL) when the core is in SLEEP mode. The 32-kHz crystal oscillator SUBCL clock cannot be stopped. NSTOP = 1, enables the peripheral clock (SUBCL) when the core in SLEEP mode ÁÁÁÁ Á ÁÁ Á Á ÁÁ Á Á ÁÁ Á ÁÁÁÁ CCS ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á Á ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á Á ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ C ore C lock Select CCS = 1, the internal RC-oscillator 1 generates SYSCL CCS = 0, the 4-MHz crystal oscillator, the 32-kHz crystal oscillator, an external clock source or the RC-oscillator 2 (with the external resistor) will generate SYSCL dependent on the setting of OS0 and OS1 in the system configuration register ÁÁÁÁ ÁÁÁÁ CSS[1:0] ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ C ore Speed Select These two bits control the system clock divider chain Auxiliary register address: ’E’hex ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ CSS1 CSS0 Divider Note ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ SYSCL max /8 ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ SYSCL max /4 ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ SYSCL max /2 ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Reset value = SYSCLmax ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ System Configuration Register (SC) Primary register address: ’E’hex Bit 3 Bit 2 Bit 1 Bit 0 ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ SC: write ÁÁÁÁ ÁÁÁÁ RC1 ÁÁÁÁ ÁÁÁÁ RC0 ÁÁÁÁ ÁÁÁÁ OS1 ÁÁÁÁ ÁÁÁÁ OS0 ÁÁ ÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Reset value: 1111b ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁ RC1, RC0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Internal RC oscillator 1 frequency select (SYSCLmax ) ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ RC1 RC0 SYSCLmax @ 25 °C, VDD = 5 V Note ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ

7.0 MHz (fiRC0)

ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ

3.0 MHz (fiRC1)

ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ

2.0 MHz (fiRC2)

ÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ

0.8 MHz (fiRC3)

ÁÁÁÁÁÁ ÁÁÁÁÁÁ Reset value ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁ OS1, OS0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Oscillator selection bits (in conjunction with the CCS-bit) ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Á CCS OS1 OS0 SUBCL System Oscillator Selection ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ External input clock at SCLIN Á ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ SYSCL max /64 ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ RC-oscillator 2 with Rext Á ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ 4-MHz crystal oscillator Á ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ 32 kHz ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ 32-kHz crystal oscillator Á ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ x ÁÁÁ ÁÁÁ x ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ SYSCL max /64 or 32 kHz ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ RC-oscillator 1 Á ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Á Á If CCS = 0 in the CM-register, the RC-oscillator 1 is stopped.

1.5.4 Power-down Modes

(Standby Mode) or they can also be halted (Halt Mode). merely controller static leakage current.

1.5.5 Clock Monitor Mode

Figure 17. Clock monitoring

Rev. A2, 26-Feb-01 Preliminary Information 18 (61)

2 Peripheral Modules

2.1 Addressing Peripherals

Accessing the peripheral modules takes place via the I/O bus (see figure 18). The IN or OUT instructions allow direct addressing of up to 16 I/O modules. A dual register addressing scheme has been adopted which addresses the “primary register” directly. To address the “auxiliary reg- ister”, the access must be switched with an “auxiliary switching module”. Thus, a single IN (or OUT) to the module address will read (or write) into the module pri- mary register. Accessing the auxiliary register is performed with the same instruction preceded by writing the module address into the auxiliary switching module. Byte-wide registers are accessed by multiple IN (or OUT) instructions. Extended addressing is used for more com- plex peripheral modules, with a larger number of registers. In this case, a bank of up to 16 subport registers are indirectly addressed with the subport address being initially written into the auxiliary register. Please refer to the ’HARDC510.SCR ’ hardware interface file as a pro- gramming guideline.

Prim._Data = data to be written into Primary Register. Figure 18. Example of I/O addressing

Rev. A2, 26-Feb-01 Preliminary Information 20 (61) Table 7 T48C510 Peripheral addresses Port Address Name Write /Read Reset V alue Register Function Module Type See Page ÁÁÁ ÁÁÁÁ ÁÁÁÁ P0DA T ÁÁÁ W/R ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port 0 – data register/input data ÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ P1DA T ÁÁÁ ÁÁÁ W/R ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port 1 – data register/input data ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ PAIPR ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port A – interrupt priority register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ Aux. ÁÁÁÁ ÁÁÁÁ PAICR ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port A – interrupt control register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ CWD ÁÁÁ ÁÁÁ R ÁÁÁÁÁ ÁÁÁÁÁ –––– ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Watchdog timer reset ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ PBIPR ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port B – interrupt priority register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ Aux. ÁÁÁÁ ÁÁÁÁ PBICR ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port B – interrupt control register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ P4DA T ÁÁÁ W/R ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port 4 – data register/pin data ÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ Aux. ÁÁÁÁ ÁÁÁÁ P4DDR ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port 4 – data direction register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ P5DA T ÁÁÁ ÁÁÁ W/R ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port 5 – data register/pin data ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ Aux. ÁÁÁÁ ÁÁÁÁ P5DDR ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port 5 – data direction register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ P6DA T ÁÁÁ ÁÁÁ W/R ÁÁÁÁÁ ÁÁÁÁÁ 0011b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port 6 – data register/pin data ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ Aux ÁÁÁÁ ÁÁÁÁ P6CR ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port 6 – control register (byte) ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ P7DA T ÁÁÁ ÁÁÁ W/R ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port 7 – data register/pin data ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ Aux. ÁÁÁÁ ÁÁÁÁ P7DDR ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port 7 – data direction register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ASW ÁÁÁ W ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ Auxiliary switch register ÁÁÁ ASW ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ TCM ÁÁÁ ÁÁÁ W/R ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Data to/from subport addressed by TCSUB ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ Aux. ÁÁÁÁ ÁÁÁÁ T0SR ÁÁÁ ÁÁÁ R ÁÁÁÁÁ ÁÁÁÁÁ 0000b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 interrupt status register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ TCSUB ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer/counter subport address pointer ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Subport address ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁÁÁ ÁÁÁÁ T0MO ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 mode register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁÁÁ ÁÁÁÁ T0CR ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 control register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁÁÁ ÁÁÁÁ T1MO ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 mode register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁ ÁÁÁÁ T1CR ÁÁÁ W ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 control register ÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁÁÁ ÁÁÁÁ TCMO ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer/counter mode register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁÁÁ ÁÁÁÁ TCIOR ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer/counter I/O control register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁÁÁ ÁÁÁÁ TCCR ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer/counter control register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁÁÁ ÁÁÁÁ TCIP ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer/counter interrupt priority ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁÁÁ ÁÁÁÁ T1CP ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ xxxx xxxxb ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 compare register (byte) ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁÁÁ ÁÁÁÁ T1CA ÁÁÁ ÁÁÁ R ÁÁÁÁÁ ÁÁÁÁÁ xxxx xxxxb ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 capture register (byte) ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁ ÁÁ ÁÁÁÁ ÁÁÁÁ T0CP ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ xxxx xxxxb ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 compare register (byte) ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁ ÁÁÁÁ T0CA ÁÁÁ R ÁÁÁÁÁ xxxx xxxxb ÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 capture register (byte) ÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁ ÁÁ A ÁÁÁÁ ÁÁÁÁ BZCR ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Buzzer control register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ B-F ÁÁÁÁÁ ÁÁÁÁÁ –––– ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Reserved ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁ A ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ PADA T ÁÁÁ ÁÁÁ W/R ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port A – data register/pin data ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ Aux. ÁÁÁÁ ÁÁÁÁ PADDR ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port A – data direction register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ B ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ PBDA T ÁÁÁ ÁÁÁ W/R ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port B – data register/pin data ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ Aux. ÁÁÁÁ ÁÁÁÁ PBDDR ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port B – data direction register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ C ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ PCDA T ÁÁÁ ÁÁÁ W/R ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port C – data register/pin data ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁÁ Aux. ÁÁÁÁ PCDDR ÁÁÁ W ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ Port C – data direction register ÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ D ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ––– ÁÁÁ ÁÁÁ ––– ÁÁÁÁÁ ÁÁÁÁÁ –––– ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Reserved ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁ E ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ SC ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ System configuration register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ Aux. ÁÁÁÁ ÁÁÁÁ CM ÁÁÁ ÁÁÁ W/R ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Clock management register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ F ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ITFSR ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Interval timer frequency select register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ Aux. ÁÁÁÁ ÁÁÁÁ ITIPR ÁÁÁ ÁÁÁ W ÁÁÁÁÁ ÁÁÁÁÁ 1111b ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ Interval timer interrupt priority register ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ

Rev. A2, 26-Feb-01 21 (61)

2.2 Bidirectional Ports

Table 8 Overview of Port Features Port Address 0 1 4 5 6 7 A B C Number of bits 4 4 4 4 2 4 4 4 4 Bitwise programmable direction no no yes yes yes yes yes yes yes Output drivers configurable no 2) yes yes yes yes yes yes yes yes Dynamic pullup/ down typ. (Ohm) 500k 500k 500k 500k 500k 500k 500k 500k 500k Static pullup/ down typ. (Ohm) none none 30k 30k 4k 30k 30k 30k 30k Schmitt trigger inputs yes yes yes no yes no yes yes no Additional functions Timer 0 External interrupt Port monitor/ coded reset Port monitor 1) Either ”open drain down”, ”open drain up” or CMOS output configuration. 2) This output must always be CMOS. 3) The Dynamic pullup/down transistors are configurable and if selected, are only activated when the associated complementry driver transistor is off. ie. A dynamic pull up transistor is only active when the port is either in input mode (both drivers off) or when a logical 1 is written to the port pad (low driver off) in output mode. (figure 20) 4) The Static Pullup/down transitors are configurable and if selected, are always active independant of the port direction or driven state. (figure 20) For further data see section 3.2 . All Ports (0, 1, 4, 5, 7, A, B and C with the exception of Port 6) are 4 bits wide. Port 6 has a data width of 2 bits (bit 0 and bit 1) only. The ports may be used for data input or output. All ports that can either directly or indirectly gen- erate an interrupt are equipped with Schmitt-trigger inputs. A variety configurable options are available such as open drain, open source and full complementary out- puts as well as different types of pull-up and pull-down transistors. All Port Data Registers (PxDA T) are I/O mapped to the primary address register of the respective port address, and the Port Data Direction Register (PxDDR) to the corresponding auxiliary register. All bidirectional ports except Port 0 and Port 1, include a bitwise- programmable Data Direction Register (PxDDR) which allows the individual programming of each port bit as input or output. It is also possible to read the pin condition when in output mode. This is a useful feature for self testing and for collision detection on wired-OR bus systems. There are five different types of bidirectional ports: /C0068Ports 0 and 1 – 4-bit wide, bidirectional ports with au- tomatic full bus width direction switching. /C0068Port 4 – 4-bit wide, bitwise programmable bidirec- tional port also provides the I/O interface to Timer 0 and the Buzzer. /C0068Ports 5, 7 and C – 4-bit wide, bitwise programmable high drive I/O port. /C0068Port 6 – 2-bit wide, bitwise programmable bidirec- tional ports with optional static (4 k/C0087) pull-up/-down and programmable interrupt logic. /C0068Ports A and B – 4-bit wide, bitwise programmable bidirectional ports with optional port monitor func- tion. Port Data Register (PxDAT) Primary register address: ’Port address’hex ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁÁ ÁÁÁÁÁ Bit 1 ÁÁÁÁÁ ÁÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁ PxDAT ÁÁÁÁÁ ÁÁÁÁÁ PxDAT3 ÁÁÁÁ ÁÁÁÁ PxDAT2 ÁÁÁÁÁ ÁÁÁÁÁ PxDAT1 ÁÁÁÁÁ ÁÁÁÁÁ PxDAT0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Reset value: 1111b ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Bit 3 → MSB, bit 0 → LSB, x → Port address

2.2.1 Bidirectional Port 0 and Port 1

condition of the associated pins. the output data register rather than the external input state. input and the DROP removes the first invalid nibble. The second IN reads the valid pin state. /C0068Use an OUT instruction followed by an IN instruction. Figure 19. Bidirectional Ports 0 and 1

2.2.2 Bidirectional Port 5, Port 7 and Port C

of the pin condition in output mode. Port B are equipped with the same standard I/O logic. put currents should not exceed 100 mA. Figure 20. Bidirectional Ports 5, 7, A, B and C

2.2.3 Bidirectional Port A and Port B with Port Monitor Function

Figure 21. Port monitor module of Port A and Port B tinuously polling for port activity.

Rev. A2, 26-Feb-01 Preliminary Information 24 (61) the interrupt edge and programming of the interrupt priority levels. When programming or reprogramming ei- ther of the port monitor control registers, any previously generated interrupt on that port which has not yet been ac- knowledged by the CPU or an interrupt generated by the reprogramming itself is automatically cleared. Port A can also be used for a configurable coded reset. For more in- formation see section 1.4 ’Hardware Reset’. The Port Interrupt Priority Registers PAIPR and PBIPR are I/O mapped to the the primary address registers of the Port Monitor Module addresses ’2’h and ’3’h respec- tively. The Port Interrupt Control Registers PAICR and PBICR are mapped to the corresponding auxiliary registers. Port Monitor Interrupt Priority Register (PxIPR) x = ’A’ (Port A) or ’B ’ (Port B) (Port A) Primary register address: ’2’hex (Port B) Primary register address: ’3’hex ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁÁ ÁÁÁÁÁ Bit 1 ÁÁÁÁÁ ÁÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁ PxIPR ÁÁÁÁÁ ÁÁÁÁÁ IMx ÁÁÁÁ ÁÁÁÁ ITRx ÁÁÁÁÁ ÁÁÁÁÁ PRx2 ÁÁÁÁÁ ÁÁÁÁÁ PRx1 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Reset value: 1111b ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ IMx – Interrupt Mask ITRx – Interrupt Transition PRx2..1 – Interrupt Priority code Table 10 Port Monitor Interrupt Priority Register (PxIPR) Code 3 2 1 0 Function ÁÁÁÁÁ ÁÁÁÁÁ x x 0 0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Port monitor interrupt priority 7 ÁÁÁÁÁ ÁÁÁÁÁ x x 0 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Port monitor interrupt priority 5 ÁÁÁÁÁ ÁÁÁÁÁ x x 1 0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Port monitor interrupt priority 3 ÁÁÁÁÁ ÁÁÁÁÁ x x 1 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Port monitor interrupt priority 1 ÁÁÁÁÁ ÁÁÁÁÁ x 0 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Port monitor interrupt on falling edge ÁÁÁÁÁ ÁÁÁÁÁ x 1 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Port monitor interrupt on rising edge ÁÁÁÁÁ ÁÁÁÁÁ 0 x x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Port monitor interrupt enabled ÁÁÁÁÁ ÁÁÁÁÁ 1 x x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Port monitor interrupt disabled Port Monitor Interrupt Control Register (PxICR) x = ’A’ (Port A) or ’B ’ (Port B) (Port A) Auxiliary register address: ’2’hex (Port B) Auxiliary register address: ’3’hex ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁÁ ÁÁÁÁÁ Bit 1 ÁÁÁÁÁ ÁÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁ PxICR ÁÁÁÁÁ ÁÁÁÁÁ ENx3 ÁÁÁÁ ÁÁÁÁ ENx2 ÁÁÁÁÁ ÁÁÁÁÁ ENx1 ÁÁÁÁÁ ÁÁÁÁÁ ENx0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Reset value: 1111b ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ ENx3 ... 0 port monitor input ENable code Table 11 Port Monitor Interrupt Control Register (PxICR) Code 3 2 1 0 Function x x x 0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Bit 0 can generate an interrupt x x x 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Bit 0 cannot generate an interrupt x x 0 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Bit 1 can generate an interrupt x x 1 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Bit 1 cannot generate an interrupt x 0 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Bit 2 can generate an interrupt x 1 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Bit 2 cannot generate an interrupt 0 x x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Bit 3 can generate an interrupt 1 x x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Bit 3 cannot generate an interrupt

2.2.4 Bidirectional Port 6

Figure 22. Bidirectional Port 6 vides an internal bus pull-up for serial bus applications. as the output transistor is switched off. respective port address with an OUT instruction. (see section 2.1 “Addressing peripherals”).

Rev. A2, 26-Feb-01 Preliminary Information 26 (61) Port 6 Data Register (P6DAT) Primary register address: ’6’hex ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁÁ ÁÁÁÁÁ Bit 1 ÁÁÁÁÁ ÁÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁ P6DAT ÁÁÁÁÁ ÁÁÁÁÁ not used ÁÁÁÁ ÁÁÁÁ not used ÁÁÁÁÁ ÁÁÁÁÁ P6DAT1 ÁÁÁÁÁ ÁÁÁÁÁ P6DAT0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Reset value: xx11b ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ The unused bits 2 and 3 are ’0’, if read. Port 6 Control Register (P6CR) Auxiliary register address: ’6’hex ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁ ÁÁÁÁ Bit 1 ÁÁÁÁ ÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁ P6CR ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ First write cycle ÁÁÁÁ ÁÁÁÁ P61IM2 ÁÁÁÁ ÁÁÁÁ P61IM1 ÁÁÁÁ ÁÁÁÁ P60IM2 ÁÁÁÁ ÁÁÁÁ P60IM1 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Reset value: 1111b ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ Bit 7 ÁÁÁÁ ÁÁÁÁ Bit 6 ÁÁÁÁ ÁÁÁÁ Bit 5 ÁÁÁÁ ÁÁÁÁ Bit 4 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Second write cycle ÁÁÁÁ ÁÁÁÁ P61PR2 ÁÁÁÁ ÁÁÁÁ P61PR1 ÁÁÁÁ ÁÁÁÁ P60PR2 ÁÁÁÁ ÁÁÁÁ P60PR1 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Reset value: 1111b ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁÁÁ P6xIM2, P6xIM1 – Port 6x Interrupt mode/direction code P6xPR2, P6xPR1 – BP6x Interrupt priority code Table 12 Port 6 control register (P6CR) Auxiliary Address: ’6’hex First Write Cycle Second Write Cycle ÁÁÁÁ ÁÁÁÁ Code 3 2 1 0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Function Á Á ÁÁÁÁ ÁÁÁÁ Code 3 2 1 0 ÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ Function ÁÁÁÁ ÁÁÁÁ x x 1 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ BP60 in input mode – interrupt disabled Á Á ÁÁÁÁ ÁÁÁÁ x x 1 1 ÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ BP60 set to priority 1 ÁÁÁÁ ÁÁÁÁ x x 0 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ BP60 in input mode – rising edge interrupt Á Á ÁÁÁÁ ÁÁÁÁ x x 1 0 ÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ BP60 set to priority 3 ÁÁÁÁ ÁÁÁÁ x x 1 0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ BP60 in input mode – falling edge interrupt Á Á ÁÁÁÁ ÁÁÁÁ x x 0 1 ÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ BP60 set to priority 5 ÁÁÁÁ ÁÁÁÁ x x 0 0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ BP60 in output mode – interrupt disabled Á Á ÁÁÁÁ ÁÁÁÁ x x 0 0 ÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ BP60 set to priority 7 ÁÁÁÁ ÁÁÁÁ 1 1 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ BP61 in input mode – interrupt disabled Á Á ÁÁÁÁ ÁÁÁÁ 1 1 x x ÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ BP61 set to priority 0 ÁÁÁÁ ÁÁÁÁ 0 1 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ BP61 in input mode – rising edge interrupt Á Á ÁÁÁÁ ÁÁÁÁ 1 0 x x ÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ BP61 set to priority 2 ÁÁÁÁ ÁÁÁÁ 1 0 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ BP61 in input mode – falling edge interrupt Á Á ÁÁÁÁ ÁÁÁÁ 0 1 x x ÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ BP61 set to priority 4 ÁÁÁÁ ÁÁÁÁ 0 0 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ BP61 in output mode – interrupt disabled Á Á ÁÁÁÁ ÁÁÁÁ 0 0 x x ÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁ BP61 set to priority 6

Figure 23. Port 6 external interrupts

2.2.5 Bidirectional Port 4

internal interfaces to Port 4. Figure 24. Bidirectional Port 4

2.2.6 TIM1 – Dedicated Timer 1 I/O Pin

Figure 25. Bidirectional pin TIM1

2.3 Interval Timers / Prescaler

programming independence of each interrupt channel. Timer Interrupt Priority Register (ITIPR). Figure 26. Interval timers / prescaler

Rev. A2, 26-Feb-01 29 (61)

2.3.1 Interval Timer Registers

The Interval Timer Frequency Select Register (ITFSR) is I/O mapped to the primary address register of the pre- scaler/ interval timer address (’F’hex) and the Interval Timer Interrupt Priority Register (ITIPR) to the corre- sponding auxiliary register. The interrupt masks MIA and MIB enable interrupt masking of INTA and INTB respec- tively. Each interrupt source can be programmed with PRA and PRB to one of two interrupt priority levels. Dis- abling both interrupts resets the interval timer. Interval Timer Interrupt Priority Register (ITIPR) Auxiliary register address (write only): ’F’hex ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁÁ ÁÁÁÁÁ Bit 1 ÁÁÁÁÁ ÁÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁ ITIPR ÁÁÁÁÁ ÁÁÁÁÁ PRB ÁÁÁÁ ÁÁÁÁ PRA ÁÁÁÁÁ ÁÁÁÁÁ MIB ÁÁÁÁÁ ÁÁÁÁÁ MIA ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Reset value: 1111b ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ PRB – Priority select Interval Timer Interrupt INTB PRA – Priority select Interval Timer Interrupt INTA MIB – Mask Interval Timer Interrupt INTB MIA – Mask Interval Timer Interrupt INTA Table 13 Interval Timer Interrupt Priority Register (ITIPR) Code 3 2 1 0 Function ÁÁÁÁÁ ÁÁÁÁÁ x x 1 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Reset prescaler and halt ÁÁÁÁÁ ÁÁÁÁÁ x x x 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Interrupt A disabled ÁÁÁÁÁ ÁÁÁÁÁ x x x 0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Interrupt A enabled ÁÁÁÁÁ ÁÁÁÁÁ x x 1 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Interrupt B disabled ÁÁÁÁÁ ÁÁÁÁÁ x x 0 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Interrupt B enabled ÁÁÁÁÁ ÁÁÁÁÁ x 1 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Interrupt A => priority 1 ÁÁÁÁÁ ÁÁÁÁÁ x 0 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Interrupt A => priority 5 ÁÁÁÁÁ ÁÁÁÁÁ 1 x x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Interrupt B => priority 2 ÁÁÁÁÁ ÁÁÁÁÁ 0 x x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Interrupt B => priority 6 Interval Timer Frequency Select Register (ITFSR) Primary register address (write only): ’F’hex ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁÁ ÁÁÁÁÁ Bit 1 ÁÁÁÁÁ ÁÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁ ITFSR ÁÁÁÁÁ ÁÁÁÁÁ FS3 ÁÁÁÁ ÁÁÁÁ FS2 ÁÁÁÁÁ ÁÁÁÁÁ FS1 ÁÁÁÁÁ ÁÁÁÁÁ FS0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Reset value: 1111b ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ FS3 ... 0 – Frequency select code ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Table 14 Interval Timer Frequency Select Register (ITFSR) Code 3 2 1 0 Function SUBCL divide by SUBCL = 32 kHz Code 3 2 1 0 Function SUBCL divide by SUBCL = 32 kHz ÁÁÁÁ ÁÁÁÁ 0 0 0 0 ÁÁÁÁ ÁÁÁÁ INTA ÁÁÁÁ ÁÁÁÁ 215 ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Select 1 Hz Á Á ÁÁÁÁÁ ÁÁÁÁÁ 1 0 0 0 ÁÁÁÁ ÁÁÁÁ INTB ÁÁÁÁ ÁÁÁÁ 212 ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Select 8 Hz ÁÁÁÁ ÁÁÁÁ 0 0 0 1 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ 214 ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Select 2 Hz Á Á ÁÁÁÁÁ ÁÁÁÁÁ 1 0 0 1 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ 211 ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Select 16 Hz ÁÁÁÁ ÁÁÁÁ 0 0 1 0 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ 213 ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Select 4 Hz Á Á ÁÁÁÁÁ ÁÁÁÁÁ 1 0 1 0 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Select 64 Hz ÁÁÁÁ ÁÁÁÁ 0 0 1 1 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ 212 ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Select 8 Hz Á Á ÁÁÁÁÁ ÁÁÁÁÁ 1 0 1 1 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Select 256 Hz ÁÁÁÁ ÁÁÁÁ 0 1 0 0 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ 211 ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Select 16 Hz Á Á ÁÁÁÁÁ ÁÁÁÁÁ 1 1 0 0 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Select 1024 Hz ÁÁÁÁ ÁÁÁÁ 0 1 0 1 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ 210 ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Select 32 Hz Á Á ÁÁÁÁÁ ÁÁÁÁÁ 1 1 0 1 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Select 2048 Hz ÁÁÁÁ ÁÁÁÁ 0 1 1 0 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Select 64 Hz Á Á ÁÁÁÁÁ ÁÁÁÁÁ 1 1 1 0 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Select 4096 Hz ÁÁÁÁ ÁÁÁÁ 0 1 1 1 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ 28 ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Select 128 Hz Á Á ÁÁÁÁÁ ÁÁÁÁÁ 1 1 1 1 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ 22 ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Select 8192 Hz The control bit FS3 determines whether the INTA or the INTB buffer register is loaded with the select code (FS2–FS0). This allows independent programming of interval times for INTA and INTB.

2.4 Watchdog Timer

Figure 27. Watchdog timer lowed by a DROP to flush the data from the stack.

2.5 Timer/Counter Module (TCM)

and Pulse Density Modulated (PDM) output signals.

Figure 28. Timer/counter module

Rev. A2, 26-Feb-01 Preliminary Information 32 (61)

2.5.1 General Timer/Counter Control Registers

With the exception of the Timer 0 Interrupt Status Regis- ter (T0SR), all the timer/counter registers are indirectly addressed using extended addressing as described in the section “Addressing peripherals”. An overview of all reg- ister and subport addresses is shown in table 7. The Timer/Counter auxiliary register (TCSUB) holds the sub- port address of the particular register about to be accessed. Care has to be taken to ensure that this subport access se- quence is not interrupted. Please refer to the ’HARDC510.SCR ’ hardware interface file as a program- ming guideline. Timer/Counter Clock Control Register (TCCR) Subport address (indirect write access): ’6‘hex of Port address ’9‘hex ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁÁ ÁÁÁÁÁ Bit 1 ÁÁÁÁÁ ÁÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁ TCCR ÁÁÁÁÁ ÁÁÁÁÁ T1CL2 ÁÁÁÁ ÁÁÁÁ T1CL1 ÁÁÁÁÁ ÁÁÁÁÁ T0CL2 ÁÁÁÁÁ ÁÁÁÁÁ T0CL1 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Reset value: 1111b ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ T0CL2, T0CL1 – Timer 0 Clock source select T1CL2, T1CL1 – Timer 1 Clock source select Table 15 Timer/Counter Clock Control Register (TCCR) Code 3 2 1 0 Function Direction (TDir) BP40* TIM1 ÁÁÁÁÁ Á ÁÁÁ Á x x 0 0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á Timer 0 clock = SUBCL ÁÁÁÁ Á ÁÁ Á out ÁÁÁÁÁ Á ÁÁÁ Á x ÁÁÁÁÁ Á ÁÁÁ Á x x 0 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á Timer 0 clock = SYSCL ÁÁÁÁ Á ÁÁ Á out ÁÁÁÁÁ Á ÁÁÁ Á x ÁÁÁÁÁ ÁÁÁÁÁ x x 1 0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 clock = Timer1 output (T1OUT connected internally) ÁÁÁÁ ÁÁÁÁ out ÁÁÁÁÁ ÁÁÁÁÁ x ÁÁÁÁÁ ÁÁÁÁÁ x x 1 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 clock = T0IN0 ( BP40*) ÁÁÁÁ ÁÁÁÁ in ÁÁÁÁÁ ÁÁÁÁÁ x ÁÁÁÁÁ ÁÁÁÁÁ 0 0 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 clock = SUBCL ÁÁÁÁ ÁÁÁÁ x ÁÁÁÁÁ ÁÁÁÁÁ out ÁÁÁÁÁ ÁÁÁÁÁ 0 1 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 clock = SYSCL ÁÁÁÁ ÁÁÁÁ x ÁÁÁÁÁ ÁÁÁÁÁ out ÁÁÁÁÁ ÁÁÁÁÁ 1 0 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 clock = Timer 0 output (T0OUT0 connected internally) ÁÁÁÁ ÁÁÁÁ x ÁÁÁÁÁ ÁÁÁÁÁ out ÁÁÁÁÁ ÁÁÁÁÁ 1 1 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 clock = TIM1 ÁÁÁÁ ÁÁÁÁ x ÁÁÁÁÁ ÁÁÁÁÁ in * if TCIO0 = low (connects Timer 0 to Port 4) The Timer/Counter Clock Control Register (TCCR) controls the clock source to both Timer 0 and Timer 1 prescalers. If an external clock source (on BP40 or TIM1) is selected, then the corresponding port direction is automatically switched to input mode (see figure 27). Note: The TCIO0 bit must be set low for the BP40 external timer/counter access.

Rev. A2, 26-Feb-01 33 (61) Timer/Counter Interrupt Priority Register (TCIP) The Timer/Counter Interrupt Priority register (TCIP) is used to configure the Timer 0 and Timer 1 interrupt priority levels. Subport address (indirect write access): ’7’hex of Port address ’9‘hex ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁÁ ÁÁÁÁÁ Bit 1 ÁÁÁÁÁ ÁÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁ TCIP ÁÁÁÁÁ ÁÁÁÁÁ T1IP2 ÁÁÁÁ ÁÁÁÁ T1IP11 ÁÁÁÁÁ ÁÁÁÁÁ T0IP2 ÁÁÁÁÁ ÁÁÁÁÁ T0IP1 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Reset value: 1111b ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ T0IP2, T0IP1 – Timer 0 Interrupt Priority code T1IP2, T1IP1 – Timer 1 Interrupt Priority code Table 16 Timer/Counter Interrupt Priority Register (TCIP) Code 3 2 1 0 Function ÁÁÁÁÁ ÁÁÁÁÁ x x 1 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 interrupt priority 1 ÁÁÁÁÁ ÁÁÁÁÁ x x 1 0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 interrupt priority 3 ÁÁÁÁÁ ÁÁÁÁÁ x x 0 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 interrupt priority 5 ÁÁÁÁÁ ÁÁÁÁÁ x x 0 0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 interrupt priority 7 ÁÁÁÁÁ ÁÁÁÁÁ 1 1 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 interrupt priority 0 ÁÁÁÁÁ ÁÁÁÁÁ 1 0 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 interrupt priority 2 ÁÁÁÁÁ ÁÁÁÁÁ 0 1 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 interrupt priority 4 ÁÁÁÁÁ ÁÁÁÁÁ 0 0 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 interrupt priority 6 Timer/Counter I/O Control Register (TCIOR) Subport address (indirect write access): ’5’hex of Port adddress ’9‘hex ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁÁ ÁÁÁÁÁ Bit 1 ÁÁÁÁÁ ÁÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ TCIOR ÁÁÁÁÁ TCIO3 ÁÁÁÁ TCIO2 ÁÁÁÁÁ TCIO1 ÁÁÁÁÁ TCIO0 ÁÁÁÁÁÁÁÁÁÁÁÁ Reset value: 1111b ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ TCIO3...0 – Timer / Counter I/0 mode select Table 17 Timer/Counter I/O Control Register (TCIOR) Code 3 2 1 0 Function x x x 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ BP40 – standard port mode x x x 0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ BP40 – Timer 0 clock input (T0IN0) or Timer 0 output (T0OUT0) x x 1 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ BP41 – standard port mode x x 0 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ BP41 – Timer 0 gate input (T0IN1) or Timer 0 output (T0OUT1) x 1 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ BP42 – standard port mode x 0 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ BP42 – Buzzer output (BUZ) 1 x x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ BP43 – standard port mode 0 x x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ BP43 – Buzzer output (NBUZ) By using the Timer/Counter I/O Control Register (TCIOR) the program can configure the respective Port 4 pins as either standard data I/O ports or as external signal ports for the Timer 0 and Buzzer. The Timer 1 uses a dedi- cated I/O pin TIM1, whose direction is controlled solely by the TCCR (see figure 29). It should be noted that if a TCIOR bit is set low, then the corresponding port data direction register (P4DDR) bit no longer influences the port direction. In the case of BP40 and BP41, the port direction is then controlled entirely by the timer/counter configuration registers (TCCR,T0MO), while pins BP42 and BP43 become unidirectional buzzer outputs.

Figure 29. Timer/counter and buzzer external interface

2.5.2 Timer/Counter in 16-bit Mode

Figure 30. 16-bit mode signal and a compare interrupt (if unmasked). Timer 0 and Timer 1 compare registers.

2.5.3 Timer 0 Modes

Rev. A2, 26-Feb-01 Preliminary Information 36 (61) Timer 0 Mode Register (T0MO) Subport address (indirect write access): ’0’hex of Port adress ’9’hex ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁÁ ÁÁÁÁÁ Bit 1 ÁÁÁÁÁ ÁÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁ T0MO ÁÁÁÁÁ ÁÁÁÁÁ T0MO3 ÁÁÁÁ ÁÁÁÁ T0MO2 ÁÁÁÁÁ ÁÁÁÁÁ T0MO1 ÁÁÁÁÁ ÁÁÁÁÁ T0MO0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Reset value: 1111b ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ T0MO3 ... 0 – Timer 0 Mode Code Table 19 Timer 0 Mode Register (T0MO) Code 3 2 1 0 Function Assuming TCIOR1=TCIOR0=low Interrupt set / T0SR affected ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ BP40 (*3) ÁÁÁÁÁ ÁÁÁÁÁ BP41 ÁÁÁ ÁÁÁ cmp ÁÁÁ ÁÁÁ ofl ÁÁÁ ÁÁÁ eom ÁÁÁÁ ÁÁÁÁ 0 0 0 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ reserved ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ 0 0 0 1 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ reserved ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ 0 0 1 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Modulated melody mode ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Envelope (out) ÁÁÁÁÁ ÁÁÁÁÁ Tone (out) ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ n/n ÁÁÁÁ ÁÁÁÁ 0 0 1 1 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Melody mode ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Tone (out) ÁÁÁÁÁ ÁÁÁÁÁ Tone (out) ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ n/n ÁÁÁÁ ÁÁÁÁ 0 1 0 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Counter-auto reload (50% duty cycle) ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Toggle (out) /Clock (in) ÁÁÁÁÁ ÁÁÁÁÁ Toggle (out) ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ n/n ÁÁÁÁ ÁÁÁÁ 0 1 0 1 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Counter-free running (50% duty cycle) ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Toggle (out) /Clock (in) ÁÁÁÁÁ ÁÁÁÁÁ Toggle (out) ÁÁÁ ÁÁÁ n/y ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ n/n ÁÁÁÁ ÁÁÁÁ 0 1 1 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Pulse density modulation ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ PDM (out) /Clock (in) ÁÁÁÁÁ ÁÁÁÁÁ PDM (out) ÁÁÁ ÁÁÁ n/y ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ n/n ÁÁÁÁ ÁÁÁÁ 0 1 1 1 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Pulse width modulation ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ PWM (out) /Clock (in) ÁÁÁÁÁ ÁÁÁÁÁ PWM (out) ÁÁÁ ÁÁÁ n/y ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ n/n ÁÁÁÁ ÁÁÁÁ 1 0 0 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Phase measurement ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Signal 1 (in) ÁÁÁÁÁ ÁÁÁÁÁ Signal 2 (in) ÁÁÁ ÁÁÁ n/n ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ y/y ÁÁÁÁ ÁÁÁÁ 1 0 0 1 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Position measurement ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Signal 1 (in) ÁÁÁÁÁ ÁÁÁÁÁ Signal 2 (in) ÁÁÁ ÁÁÁ (*1) ÁÁÁ ÁÁÁ (*2) ÁÁÁ ÁÁÁ n/n ÁÁÁÁ ÁÁÁÁ 1 0 1 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Low pulse width measurement ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Clock (in) ÁÁÁÁÁ ÁÁÁÁÁ Signal (in) ÁÁÁ ÁÁÁ n/y ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ y/y ÁÁÁÁ ÁÁÁÁ 1 0 1 1 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ High pulse width measurement ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Clock (in) ÁÁÁÁÁ ÁÁÁÁÁ Signal (in) ÁÁÁ ÁÁÁ n/y ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ y/y ÁÁÁÁ ÁÁÁÁ 1 1 0 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Counter- auto reload (strobe) ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Strobe (out) /Clock (in) ÁÁÁÁÁ ÁÁÁÁÁ Strobe (out) ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ n/y ÁÁÁÁ ÁÁÁÁ 1 1 0 1 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Counter-free running (strobe) ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Strobe (out) /Clock (in) ÁÁÁÁÁ ÁÁÁÁÁ Strobe (out) ÁÁÁ ÁÁÁ n/y ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ n/y ÁÁÁÁ ÁÁÁÁ 1 1 1 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Period measurement (rising edge) ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Clock (in) ÁÁÁÁÁ ÁÁÁÁÁ Signal (in) ÁÁÁ ÁÁÁ n/y ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ y/y ÁÁÁÁ ÁÁÁÁ 1 1 1 1 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Period measurement (falling edge) ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Clock (in) ÁÁÁÁÁ ÁÁÁÁÁ Signal (in) ÁÁÁ ÁÁÁ n/y ÁÁÁ ÁÁÁ y/y ÁÁÁ ÁÁÁ y/y *1 Note: The compare interrupt/status flag can only be set when counting up. *2 Note: The overflow interrupt/status flag is set on both an overflow or an underflow. *3 Note: The BP40 signals can be inverted if T0NINV=0 (TCMO register) Timer 0 Interrupt Status Register (T0SR) Auxiliary register address (read access): ’9’hex ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁÁ ÁÁÁÁÁ Bit 1 ÁÁÁÁÁ ÁÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁ T0SR ÁÁÁÁÁ ÁÁÁÁÁ not used ÁÁÁÁ ÁÁÁÁ T0EOM ÁÁÁÁÁ ÁÁÁÁÁ T0OFL ÁÁÁÁÁ ÁÁÁÁÁ T0CMP ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Reset value: x000b ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Note: The status register is reset automatically when read and also when Timer 0 is reset. T0EOM – Timer 0 End Of Measurement status flag T0OFL – Timer 0 OverFLow status flag T0CMP – Timer 0 CoMPare status flag

Rev. A2, 26-Feb-01 37 (61) Table 20 Timer 0 Interrupt Status Register (T0SR) Code 3 2 1 0 Function ÁÁÁÁÁÁ ÁÁÁÁÁÁ x x x 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 compare has occurred (Timer 0 = T0CP) ÁÁÁÁÁÁ ÁÁÁÁÁÁ x x 1 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 overflow or underflow has occurred ÁÁÁÁÁÁ ÁÁÁÁÁÁ x 1 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 measurement completed The interrupt flags will be set whenever the associated condition occurs irrespective of whether the corresponding inter- rupt is triggered. Therefore, the status flags are still set if the interrupt condition occurs when the interrupt is masked. To see exactly when the flags are set, see T0MO control code table 18. Reading from the timer/counter auxiliary register will access the Timer 0 Interrupt Status Register (T0SR). Timer 0 Control Register (T0CR) The T0CR is responsible for the predivision of the selected Timer 0 input clock (see TCCR). It can be divided or used directly as clock for the up/down counter. Bit 0 is the mask bit for the Timer 0 interrupt. Subport address (indirect write access): ’1’hex of Port address ’9‘hex ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁÁ ÁÁÁÁÁ Bit 1 ÁÁÁÁÁ ÁÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁ T0CR ÁÁÁÁÁ ÁÁÁÁÁ T0FS3 ÁÁÁÁ ÁÁÁÁ T0FS2 ÁÁÁÁÁ ÁÁÁÁÁ T0FS1 ÁÁÁÁÁ ÁÁÁÁÁ T0IM ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Reset value: 1111b ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ T0FS3 ... 1 – Timer 0 prescaler division factor code T0IM – Timer 0 Interrupt Mask Table 21 Timer 0 Control Register (T0CR) Code 3 2 1 0 Function ÁÁÁÁÁ ÁÁÁÁÁ x x x 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 interrupt disabled ÁÁÁÁÁ ÁÁÁÁÁ x x x 0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 interrupt enabled ÁÁÁÁÁ ÁÁÁÁÁ 0 0 0 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 prescaler divide by 256 ÁÁÁÁÁ ÁÁÁÁÁ 0 0 1 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 prescaler divide by 128 ÁÁÁÁÁ ÁÁÁÁÁ 0 1 0 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 prescaler divide by 64 ÁÁÁÁÁ ÁÁÁÁÁ 0 1 1 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 prescaler divide by 32 ÁÁÁÁÁ ÁÁÁÁÁ 1 0 0 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 prescaler divide by 16 ÁÁÁÁÁ ÁÁÁÁÁ 1 0 1 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 prescaler divide by 8 ÁÁÁÁÁ ÁÁÁÁÁ 1 1 0 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 prescaler divide by 4 ÁÁÁÁÁ ÁÁÁÁÁ 1 1 1 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 0 prescaler bypassed

Rev. A2, 26-Feb-01 Preliminary Information 38 (61) Timer 0 Compare Register (T0CP) – Byte Write Subport address (indirect write access): ’9’hex of Port address ’9‘hex ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁ ÁÁÁÁ Bit 1 ÁÁÁÁ ÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁ T0CP ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ First write cycle ÁÁÁÁ ÁÁÁÁ T0CP3 ÁÁÁÁ ÁÁÁÁ T0CP2 ÁÁÁÁ ÁÁÁÁ T0CP1 ÁÁÁÁ ÁÁÁÁ T0CP0 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Reset value: xxxxb ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ Bit 7 ÁÁÁÁ ÁÁÁÁ Bit 6 ÁÁÁÁ ÁÁÁÁ Bit 5 ÁÁÁÁ ÁÁÁÁ Bit 4 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Second write cycle ÁÁÁÁ ÁÁÁÁ T0CP7 ÁÁÁÁ ÁÁÁÁ T0CP6 ÁÁÁÁ ÁÁÁÁ T0CP5 ÁÁÁÁ ÁÁÁÁ T0CP4 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Reset value: xxxxb ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ T0CP3 ... T0CP0 – Timer 0 Compare Register Data (low nibble) – first write cycle T0CP7 ... T0CP4 – Timer 0 Compare Register Data (high nibble) – second write cycle The compare register T0CP is 8-bit wide and must be accessed as byte wide subport (see section ”Addressing Peripher- als). First of all, the data is written low nibble and is then followed by the high nibble. Any timer interrupts are automatically suppressed until the complete compare value has been transferred. Timer 0 Capture Register (T0CA) – Byte Read Subport address (indirect read access): ’9’hex of Port address ’9‘hex ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ Bit 7 ÁÁÁÁ ÁÁÁÁ Bit 6 ÁÁÁÁ ÁÁÁÁ Bit 5 ÁÁÁÁ ÁÁÁÁ Bit 4 ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁ T0CA ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ First read cycle ÁÁÁÁ ÁÁÁÁ T0CA7 ÁÁÁÁ ÁÁÁÁ T0CA6 ÁÁÁÁ ÁÁÁÁ T0CA5 ÁÁÁÁ ÁÁÁÁ T0CA4 ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ Reset value: xxxxb ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁ ÁÁÁÁ Bit 1 ÁÁÁÁ ÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Second read cycle ÁÁÁÁ ÁÁÁÁ T0CA3 ÁÁÁÁ ÁÁÁÁ T0CA2 ÁÁÁÁ ÁÁÁÁ T0CA1 ÁÁÁÁ ÁÁÁÁ T0CA0 ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ Reset value: xxxxb ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ T0CA7. .. T0CA4 – Timer 0 Capture Register Data (high nibble) – first read cycle T0CA3 ... T0CA0 – Timer 0 Capture Register Data (low nibble) – second read cycle Note: If the timer is read (in PDM mode only) the bit order will appear reversed, so that T0CA0 =MSB, The 8-bit capture register T0CA is read as byte wide subport. Note, however, unlike the writing to the compare register, the high nibble is read first followed by the low nibble. The 8-bit timer state is captured on reading the first nibble and held until the complete byte has been read. During this transfer, the timer is free to continue counting.

Rev. A2, 26-Feb-01 Preliminary Information 44 (61)

2.5.4 Timer 1 Modes

The Timer 1 is aimed at performing event counting and timing functions (see figure 28). It has, unlike the Timer 0, no gated clock or externally triggered capture modes. The counter counts up with an internal or external clock, depending on the state of the Timer 1 Control Reg- ister (T1CR) and the Timer/Counter Clock Control Register (TCCR) and generates a compare interrupt whenever the counter matches the Timer 1 compare regis- ter. This is the only Timer 1 interrupt source. Masking can be performed using the mask bit in the Timer 1 Control Register (T1CR) and priority can be defined in the Timer/ Counter Interrupt Priority Register (TCIP). The TIM1 pin is used by the Timer 1 either as clock/event input or timer output. I/O control of the Timer 1 pin TIM1 is controlled entirely by the hardware, therefore if the TIM1 is selected as an external clock or event source (in the TCCR), there can be no Timer 1 signal output. In this case, the timer would be used solely to generate interrupts. In autostop operation, the Timer 1 will halt both itself and Timer 0 whenever the Timer 1 compare value is reached. This feature can be used for example to generate an exact burst of pulses. Both timers will remain stopped until restarted. Restarting is performed in the normal way by setting the appropriate control bits in the Timer/Counter Mode Register (TCM0). Timer 1 Mode Register (T1MO) Subport address (indirect write address): ’2’hex of Port address ’9‘hex ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁÁ ÁÁÁÁÁ Bit 1 ÁÁÁÁÁ ÁÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁ T1MO ÁÁÁÁÁ ÁÁÁÁÁ T1MO3 ÁÁÁÁ ÁÁÁÁ T1MO2 ÁÁÁÁÁ ÁÁÁÁÁ T1MO1 ÁÁÁÁÁ ÁÁÁÁÁ T1MO0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Reset value: 1111b ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ T1MO3 ... 0 – Timer 1 Mode Control Table 22 Timer 1 Mode Register (T1MO) Code 3 2 1 0 Function Compare Interrupt ÁÁÁÁÁ ÁÁÁÁÁ x x 0 0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Counter free running (50% duty cycle) ÁÁÁÁÁ ÁÁÁÁÁ yes ÁÁÁÁÁ ÁÁÁÁÁ x x 0 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Counter auto reload (50% duty cycle) ÁÁÁÁÁ ÁÁÁÁÁ yes ÁÁÁÁÁ ÁÁÁÁÁ x x 1 0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Pulse width modulation ÁÁÁÁÁ ÁÁÁÁÁ yes ÁÁÁÁÁ ÁÁÁÁÁ x x 1 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Counter auto-reload (strobe output) ÁÁÁÁÁ ÁÁÁÁÁ yes ÁÁÁÁÁ ÁÁÁÁÁ x 0 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Increment on falling edge of clock ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ x 1 x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Increment on rising edge of clock ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ 1 x x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Normal operation (no autostop) ÁÁÁÁÁ ÁÁÁÁÁ yes ÁÁÁÁÁ ÁÁÁÁÁ 0 x x x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Autostop operation (Timer 1 stops Timer 2) ÁÁÁÁÁ ÁÁÁÁÁ yes Timer 1 Control Register (T1CR) The T1CR is responsible for the predivision of the selected Timer 1 input clock (see TCCR). It can be divided or used directly as clock for the up counter. Bit 0 is the mask bit for the Timer 1 interrupt. Subport address (indirect write access): ’3’hex of Port adress ’9‘hex ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁÁ ÁÁÁÁÁ Bit 1 ÁÁÁÁÁ ÁÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁ T1CR ÁÁÁÁÁ ÁÁÁÁÁ T1FS3 ÁÁÁÁ ÁÁÁÁ T1FS2 ÁÁÁÁÁ ÁÁÁÁÁ T1FS1 ÁÁÁÁÁ ÁÁÁÁÁ T1IM ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ Reset value: 1111b ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁ T1FS3 ... 1 – Timer 1 Prescaler Division Factor Code T1IM – Timer 1 Interrupt Mask

Rev. A2, 26-Feb-01 45 (61) Table 23 Timer 1 Control Register (T1CR) Code 3 2 1 0 Function ÁÁÁÁÁ ÁÁÁÁÁ x x x 1 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 interrupt disabled ÁÁÁÁÁ ÁÁÁÁÁ x x x 0 ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 interrupt enabled ÁÁÁÁÁ ÁÁÁÁÁ 0 0 0 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 prescaler divide by 256 ÁÁÁÁÁ ÁÁÁÁÁ 0 0 1 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 prescaler divide by 128 ÁÁÁÁÁ ÁÁÁÁÁ 0 1 0 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 prescaler divide by 64 ÁÁÁÁÁ ÁÁÁÁÁ 0 1 1 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 prescaler divide by 32 ÁÁÁÁÁ ÁÁÁÁÁ 1 0 0 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 prescaler divide by 16 ÁÁÁÁÁ ÁÁÁÁÁ 1 0 1 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 prescaler divide by 8 ÁÁÁÁÁ ÁÁÁÁÁ 1 1 0 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 prescaler divide by 4 ÁÁÁÁÁ ÁÁÁÁÁ 1 1 1 x ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Timer 1 prescaler bypassed Timer 1 Compare Register (T1CP) – Byte Write Subport address (indirect write access): ’8’hex of Port address ’9‘hex ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁ ÁÁÁ Bit 1 ÁÁÁÁ ÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁ T1CP ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ First write cycle ÁÁÁÁ ÁÁÁÁ T1CP3 ÁÁÁÁ ÁÁÁÁ T1CP2 ÁÁÁ ÁÁÁ T1CP1 ÁÁÁÁ ÁÁÁÁ T1CP0 ÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁ Reset value: xxxxb ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ Bit 7 ÁÁÁÁ ÁÁÁÁ Bit 6 ÁÁÁ ÁÁÁ Bit 5 ÁÁÁÁ ÁÁÁÁ Bit 4 ÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Second write cycle ÁÁÁÁ ÁÁÁÁ T1CP7 ÁÁÁÁ ÁÁÁÁ T1CP6 ÁÁÁ ÁÁÁ T1CP5 ÁÁÁÁ ÁÁÁÁ T1CP4 ÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁ Reset value: xxxxb ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁ ÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁ T1CP3 ... T1CP0 – Timer 1 Compare Register Data (low nibble) – first write cycle T1CP7. .. T1CP4 – Timer 1 Compare Register Data (high nibble) – second write cycle The compare register T1CP is 8 bits wide and must be accessed as byte wide subport (see section “Addressing Peripher- als”). The data is written low nibble first, followed by high nibble. Any timer interrupts are automatically suppressed until the complete compare value has been transferred. Timer 1 Capture Register (T1CA) – Byte Read Subport address (indirect read access): ’8’hex of Port address ’9‘hex ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ Bit 7 ÁÁÁÁ ÁÁÁÁ Bit 6 ÁÁÁÁ ÁÁÁÁ Bit 5 ÁÁÁÁÁ ÁÁÁÁÁ Bit 4 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁ T1CA ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ First read cycle ÁÁÁÁ ÁÁÁÁ T1CA7 ÁÁÁÁ ÁÁÁÁ T1CA6 ÁÁÁÁ ÁÁÁÁ T1CA5 ÁÁÁÁÁ ÁÁÁÁÁ T1CA4 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Reset value: xxxxb ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ Bit 3 ÁÁÁÁ ÁÁÁÁ Bit 2 ÁÁÁÁ ÁÁÁÁ Bit 1 ÁÁÁÁÁ ÁÁÁÁÁ Bit 0 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁ Second read cycle ÁÁÁÁ ÁÁÁÁ T1CA3 ÁÁÁÁ ÁÁÁÁ T1CA2 ÁÁÁÁ ÁÁÁÁ T1CA1 ÁÁÁÁÁ ÁÁÁÁÁ T1CA0 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Reset value: xxxxb ÁÁÁÁÁ ÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ T1CA7 ... T1CA4 – Timer 1 Capture Register Data (high nibble) – first read cycle T1CA3 ... T1CA0 – Timer 1 Capture Register Data (low nibble) – second read cycle The 8-bit capture register T1CA is read as byte-wide subport. Note, however, unlike the writing to the compare register, the high nibble is read first followed by low nibble. The 8-bit timer state is captured on reading the first nibble and held until the complete byte has been read. During this transfer, the timer is free to continue counting. The previous capture value will be held until the timer is restarted again.

a repetition period of 256 clock periods, an interrupt (if unmasked) being generated on every compare event. Figure 43. Timer 1 pulse width modulation

2.6 Buzzer Module

same logical state. This is controlled by the BZOP bit of the BZCR. Figure 44. Buzzer module

Figure 45. Buzzer waveform

2.7 MTP Programming

Figure 46. Programmer System equipped with 2 on-chip EEPROM memory blocks. tem programming) via the TPI flat band cable.

1 PM Programming Mode Input

2 VDD +5 volt Supply

3 BP02 Port02 (Clock) Input

4 BP01 Port01 (Data ) Input

5 BP00 Port00 (Data ) Output

6 VSS Ground Supply

will appear to be full of F hex . to the default “standard drive” strength.

downs transitors deactivated. Figure 47. In-system programming

2.8 Noise Considerations

chance of picking up or transmitting unwanted signals.

2.8.1 Noise Immunity

pullup or pulldown option on these pins. spacing from other on board noise generating sources.

Rev. A2, 26-Feb-01 51 (61) /C0068PCB ’s should where economically possible be equipped with adequate ground planes. /C0068The microcontroller power supply should be decoupled with an electrolytic capacitance (approx. 10 /C0109F) in parallel with a ceramic capacitance (approx.100 nF) situated as close to the micro- controller device as possible.

2.8.2 Electromagnetic Emission

Electromagnetic emmision is caused by rapidly changing electrical current (dI/dt) in long antenna like connection lines and cables. This can result in electrical interference on other telecommunication devices. These current spikes are more often than not present in the system power supply lines and driver signal lines. The following guide will help to reduce EME: /C0068Keep the length of PCB current switching signal tracks to a minimum.. /C0068Adopt a PCB star power routing system connected at one point. /C0068Many of the microcontroller port outputs can be con- figured with several drive strengths. This means that a high drive output will switch a signal faster than for example standard drive output. The resulting change in current in the signal and power lines will also in- crease, causing an increase in EME. So wherever speed and drive current is not necessary the ports should be configured with the lowest drive possible. /C0068If possible, write the application program to avoid multiple outputs switching at any instant. /C0068Cables can be equipped with ferrite rings to slow cur- rent spikes or the system can be encased in a grounded conducting casing.

3 Electrical Characteristics

3.1 Absolute Maximum Ratings

V oltages are given relative to VSS . Parameters Symbol V alue Unit ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Supply voltage ÁÁÁÁÁ ÁÁÁÁÁ V DD ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ –0.3 to + 7.0 ÁÁÁÁÁ ÁÁÁÁÁ V ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Input voltage (on any pin) ÁÁÁÁÁ ÁÁÁÁÁ V IN ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ V SS –0.3 /C0020V IN /C0020V DD +0.3 ÁÁÁÁÁ ÁÁÁÁÁ V ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Output short circuit duration ÁÁÁÁÁ ÁÁÁÁÁ tshort ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ indefinite ÁÁÁÁÁ ÁÁÁÁÁ s ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Operating temperature range ÁÁÁÁÁ ÁÁÁÁÁ Tamb ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ –40 to +85 ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Storage temperature range ÁÁÁÁÁ ÁÁÁÁÁ Tstg ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ –65 to +150 ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Thermal resistance (SSO44) ÁÁÁÁÁ ÁÁÁÁÁ R thJA ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ 110 ÁÁÁÁÁ ÁÁÁÁÁ K/W ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Soldering temperature (t ≤ 10 s) ÁÁÁÁÁ ÁÁÁÁÁ Tsld ÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁ 260 ÁÁÁÁÁ ÁÁÁÁÁ Stresses greater than those listed under absolute maximum ratings may cause permanent damage to the device. This is a stress rating only and functional operation of the device at any condition above those indicated in the operational section of these specification is not implied. Exposure to absolute maximum rating condition for an extended period may affect device reliability. All inputs and outputs are protected against high electrostatic voltages (4kV , HBM) or electric fields. However, precautions to minimize the build-up of electrostatic charges during handling are recommended. Reliability of operation is enhanced if unused inputs are connected to an appropriate logic voltage level (e.g. V DD ).

3.2 DC Operating Characteristics

Supply voltage VDD = 5 V , VSS = 0 V , Tamb = –40 to 85°C unless otherwise specified. Typical values relate to VDD = 5 V , Tamb = 25°C and are for reference only. Parameters Test Conditions / Pins Symbol Min. Typ. Max. Unit ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Power supply ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Supply voltage ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ V DD ÁÁÁÁ ÁÁÁÁ 2.2 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ 6.2 ÁÁÁÁ ÁÁÁÁ V ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Active current ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ CPU running TestROM @SYSCL_iRC3 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ IDD ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 200 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 500 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ /C0109A

Rev. A2, 26-Feb-01 Preliminary Information 52 (61) UnitMax.Typ.Min.SymbolTest Conditions / PinsParameters ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Quotient IDD /SYSCL_iR3 ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ CPU running TestROM @SYSCL_iRC3 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ IDDQ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 0.25 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 0.5 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ µA/kHz ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Halt current ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ CPU in sleep mode, NSTOP = 0 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ IHalt ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 0.1 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 0.5 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ /C0109A ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Power-on reset threshold voltage ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ POR threshold voltage ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁ ÁÁÁÁ V POR ÁÁÁÁ ÁÁÁÁ 0.8 ÁÁÁÁ ÁÁÁÁ 1.0 ÁÁÁÁ ÁÁÁÁ 1.5 ÁÁÁÁ ÁÁÁÁ V ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Schmitt-trigger input voltage: (all inputs except Port 5, 7 and C) ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Negative-going threshold voltage ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ V DD = 2.4 to 6.2 V ÁÁÁÁ ÁÁÁÁ V T– ÁÁÁÁ ÁÁÁÁ V SS ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ 0.4×V DD ÁÁÁÁ ÁÁÁÁ V ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Positive-going threshold voltage ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ V DD = 2.4 to 6.2 V ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ V T+ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 0.55× V DD ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ V DD ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ V ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Hysteresis (VT+ – VT–) ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ V DD = 2.4 to 6.2 V ÁÁÁÁ ÁÁÁÁ V H ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ 0.1×V DD ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Input Pins: NRST and TE ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Input voltage LOW ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ V DD = 2.4 to 6.2 V ÁÁÁÁ ÁÁÁÁ V IL ÁÁÁÁ ÁÁÁÁ V SS ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ 0.2/C0032V DD ÁÁÁÁ ÁÁÁÁ V ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Input voltage HIGH ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ V DD = 2.4 to 6.2 V ÁÁÁÁ ÁÁÁÁ V IH ÁÁÁÁ ÁÁÁÁ 0.8/C0032V DD ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ V DD ÁÁÁÁ ÁÁÁÁ V ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Input NRST with pull-up resistor ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Input LOW current ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ V DD = 2.4 V , VIL= VSS V DD = 5.0 V ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ IIL ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ –1.0 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ –1.5 –10 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ –3.0 –18 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ µA µA ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Input TE with pull-down resistor ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Input HIGH current ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ V DD = 5.0 V ÁÁÁÁ ÁÁÁÁ IIH ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ 1.4 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ mA ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ All Bidirectional Ports and TIM1 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Input voltage LOW ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ V DD = 2.4 to 6.2 V ÁÁÁÁ ÁÁÁÁ V IL ÁÁÁÁ ÁÁÁÁ V SS ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ 0.2/C0032V DD ÁÁÁÁ ÁÁÁÁ V ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Input voltage HIGH ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ V DD = 2.4 to 6.2 V ÁÁÁÁ ÁÁÁÁ V IH ÁÁÁÁ ÁÁÁÁ 0.8/C0032V DD ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ V DD ÁÁÁÁ ÁÁÁÁ V ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Dynamic input LOW cur- rent (pull-up) ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ V DD = 2.4 V , VIL= VSS V DD = 5.0 V ÁÁÁÁ ÁÁÁÁ IIL ÁÁÁÁ ÁÁÁÁ –1.0 ÁÁÁÁ ÁÁÁÁ –1.5 –10 ÁÁÁÁ ÁÁÁÁ –3.0 –18 ÁÁÁÁ ÁÁÁÁ µA µA ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Dynamic input HIGH cur- rent (pull-down) ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ V DD = 2.4 V , VIH = VDD V DD = 5.0 V ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ IIH ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 1.0 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 1.5 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 2.5 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ µA µA ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Output LOW current ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ V DD = 2.4 V V OL = 0.2*VDD V DD = 5.0 V ÁÁÁÁ Á ÁÁ Á Á ÁÁ Á ÁÁÁÁ IOL ÁÁÁÁ Á ÁÁ Á Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á Á ÁÁ Á ÁÁÁÁ mA mA ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Output HIGH current ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ V DD = 2.4 V V OH = 0.8*VDD V DD = 5.0 V ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ IOH ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ –13 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ mA mA ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Bidirectional Port BP4, BP5, BP7, BPA, BPB and BPC ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Input LOW current Static pull-up (30 k/C0087) ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ V DD = 2.4 V V DD = 5.0 V ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ IIL IIL ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ –15 –100 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ –25 –150 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ –45 –220 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ µA µA ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Input HIGH current static pull-down (30 k/C0087) ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ V DD = 2.4 V V DD = 5.0 V ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ IIH IIH ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 100 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 150 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 220 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ µA µA ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Bidirectional Port BP60 and BR61 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Input LOW current static pull-up (4 k/C0087) ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ V DD = 2.4 V V DD = 5.0 V ÁÁÁÁ ÁÁÁÁ IIL IIL ÁÁÁÁ ÁÁÁÁ –0.2 ÁÁÁÁ ÁÁÁÁ –0.3 –1.35 ÁÁÁÁ ÁÁÁÁ –0.5 ÁÁÁÁ ÁÁÁÁ mA mA ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Input HIGH current static pull-down (4 k/C0087) ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ V DD = 2.4 V , VIL = V SS V DD = 5.0 V ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ IIH IIH ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 0.15 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 0.25 1.4 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 0.5 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ mA mA Note: The total sum of all port static output currents must not exceed 100 mA. The sum of all port currents switched at any instant (dI/ dt) must not exceed 30 mA.

Rev. A2, 26-Feb-01 53 (61)

3.3 AC Characteristics

Supply voltage VDD = 2.4 to 6.2 V , VSS = 0 V , Tamb = –40 to 85°C unless otherwise specified. Typical values relate to VDD = 5 V , Tamb = 25°C and are for reference only. Parameters Test Conditions / Pins Symbol Min. Typ. Max. Unit ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Reset timing ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á Power-on reset delay ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á V DD /C0117 V POR ÁÁÁÁ Á ÁÁ Á tPOR ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ Á ÁÁ Á ms ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á NRST input LOW time ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁ Á ÁÁ Á tNRST ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ Á ÁÁ Á µs ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á Interrupt request input timing ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á Int. request LOW time ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁ Á ÁÁ Á tIRL ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ Á ÁÁ Á ns ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á Int. request HIGH time ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁ Á ÁÁ Á tIRH ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ Á ÁÁ Á ns ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Internal RC oscillator (for additional characteristics see figures 55 to 57) ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Standby current of iRC0 ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ CPU in SLEEP mode, SC = 0011b, CM = 1100b ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ IiRC0 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 300 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 500 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ /C0109A ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ SYSCL_iRC0 ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ CPU active, SC = 0011b, CM = 1100b ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ fSYSCL ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 3.5 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 7.0 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 10.5 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ MHz ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Standby current of iRC1 ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ CPU in SLEEP mode, SC = 0111b, CM = 1101b ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ IiRC1 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 150 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 250 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ /C0109A ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ SYSCL_iRC1 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ CPU active, SC = 0111b, CM = 1101b ÁÁÁÁ ÁÁÁÁ fSYSCL ÁÁÁÁ ÁÁÁÁ 1.9 ÁÁÁÁ ÁÁÁÁ 3.0 ÁÁÁÁ ÁÁÁÁ 4.5 ÁÁÁÁ ÁÁÁÁ MHz ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Standby current of iRC2 ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ CPU in SLEEP mode, SC = 1011b, CM = 1110b ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ IiRC2 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 100 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 150 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ /C0109A ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ SYSCL_iRC2 ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ CPU active, SC = 1011b, CM = 1110b ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ fSYSCL ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 1.4 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 2.0 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 3.0 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ MHz ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Standby current of iRC3 ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ CPU in SLEEP mode, SC = 1111b, CM = 1111b ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ IiRC3 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ /C0109A ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ SYSCL_iRC3 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ CPU active, SC = 1111b, CM = 1111b ÁÁÁÁ ÁÁÁÁ fSYSCL ÁÁÁÁ ÁÁÁÁ 0.60 ÁÁÁÁ ÁÁÁÁ 0.80 ÁÁÁÁ ÁÁÁÁ 1.3 ÁÁÁÁ ÁÁÁÁ MHz ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Stability ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ /C0068V DD = 5 V /C0034 20 % ÁÁÁÁ ÁÁÁÁ df/f0 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ System clock crystal/ceramic oscillator (for additional characteristics see figures 49) ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Standby current ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ CPU in SLEEP mode, 4-MHz crystal active ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ Ixtal ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 125 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ /C0109A ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Start-up time ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ V DD = 2.4 V ÁÁÁÁ ÁÁÁÁ tstartup ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ms ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Stability ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ /C0068V DD = 3 V to 5.5 V ÁÁÁÁ ÁÁÁÁ df/f0 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ 0.3 ÁÁÁÁ ÁÁÁÁ 0.5 ÁÁÁÁ ÁÁÁÁ ppm ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ RC oscillator – external resistor (for additional characteristics see figures 52 to 54) ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ Standby current ÁÁÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁ Á ÁÁÁÁÁÁÁÁÁ CPU in SLEEP mode, R ext = 150 k/C0087 (/C0034/C0049 /C0037/C0041 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ IxRC ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ 125 ÁÁÁÁ Á ÁÁ Á ÁÁÁÁ /C0109A ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Frequency ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ CPU active, Rext = 150 k/C0087 ÁÁÁÁ ÁÁÁÁ fSYSCL ÁÁÁÁ ÁÁÁÁ 1.8 ÁÁÁÁ ÁÁÁÁ 2.0 ÁÁÁÁ ÁÁÁÁ 2.2 ÁÁÁÁ ÁÁÁÁ MHz ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Stability ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ V DD = 2.4 V to 5.5 V ÁÁÁÁ ÁÁÁÁ df/f0 ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ ”10 ÁÁÁÁ ÁÁÁÁ

4 Device Information

4.1 Pad Layout

Figure 62. Pad layout

4.2 Packaging

Figure 63. Pin connections SSO44-package

Rev. A2, 26-Feb-01 59 (61)

5 Hardware Options

The following list shows all the T48C510 hardware options that can be programmed into the configuration EEPROM. SPD –> strong static pull-down, SPU –> strong static pull-up Port 0 Output Standard drive BP00 CMOS Pull-up BP01 CMOS Pull-up BP02 CMOS Pull-up BP03 CMOS Pull-up Port 1 Output Standard drive BP10 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P] BP11 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P] BP12 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P] BP13 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P] Port 4 Output Standard drive BP40 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BP41 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BP42 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BP43 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) Port 5 Output Standard drive BP50 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BP51 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BP52 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BP53 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) Port 7 Output Standard drive BP70 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BP71 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BP72 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BP73 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) Port 6 Output Standard drive BP60 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (4 k/C0087) /C0045 SPD (4 k/C0087) BP61 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (4 k/C0087) /C0045 SPD (4 k/C0087)

Rev. A2, 26-Feb-01 Preliminary Information 60 (61) Port A Output Standard Drive BPA0 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BPA1 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BPA2 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BPA3 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) Port B Output Standard Drive BPB0 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BPB1 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BPB2 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BPB3 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) TIM1 Output /C0045 Standard /C0045 Drive /C0045 CMOS /C0045 Open drain [N]/C0045Pull-up /C0045 Open drain [P]/C0045Pull-down Port C Output Standard Drive BPC0 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BPC1 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BPC2 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BPC3 /C0045 CMOS /C0045 Pull-up /C0045 Open drain [N]/C0045 Pull-down /C0045 Open drain [P]/C0045 SPU (30 k/C0087) /C0045 SPD (30 k/C0087) BPA-Reset /C0045 No /C0045 BPA0 & BPA1 = low /C0045 BPA0 & BPA1 & BPA2 = low /C0045 BPA0 & BPA1 & BPA2 & BPA3 = low /C0045 BPA0 & BPA1 = high /C0045 BPA0 & BPA1 & BPA2 = high /C0045 BPA0 & BPA1 & BPA2 & BPA3 = high Watchdog /C0045 1/2 s /C0045 Disabled /C0045 1 s /C0045 2 s OSCIN No integrated capacitance OSCOUT No intergrated capacitance

Rev. A2, 26-Feb-01 61 (61) Ozone Depleting Substances Policy Statement It is the policy of Atmel Germany GmbH to 1. Meet all present and future national and international statutory requirements. 2. Regularly and continuously improve the performance of our products, processes, distribution and operating systems with respect to their impact on the health and safety of our employees and the public, as well as their impact on the environment. It is particular concern to control or eliminate releases of those substances into the atmosphere which are known as ozone depleting substances (ODSs). The Montreal Protocol (1987) and its London Amendments (1990) intend to severely restrict the use of ODSs and forbid their use within the next ten years. V arious national and international initiatives are pressing for an earlier ban on these substances. Atmel Germany GmbH has been able to use its policy of continuous improvements to eliminate the use of ODSs listed in the following documents. 1. Annex A, B and list of transitional substances of the Montreal Protocol and the London Amendments respectively 2. Class I and II ozone depleting substances in the Clean Air Act Amendments of 1990 by the Environmental Protection Agency (EPA) in the USA 3. Council Decision 88/540/EEC and 91/690/EEC Annex A, B and C (transitional substances) respectively. Atmel Germany GmbH can certify that our semiconductors are not manufactured with ozone depleting substances and do not contain such substances. 10. We reserve the right to make changes to improve technical design and may do so without further notice. Parameters can vary in different applications. All operating parameters must be validated for each customer application by the customer. Should the buyer use Atmel Wireless & Microcontrollers products for any unintended or unauthorized application, the buyer shall indemnify Atmel Wireless & Microcontrollers against all claims, costs, damages, and expenses, arising out of, directly or indirectly, any claim of personal damage, injury or death associated with such unintended or unauthorized use. Data sheets can also be retrieved from the Internet: http://www.atmel–wm.com Atmel Germany GmbH, P .O.B. 3535, D-74025 Heilbronn, Germany Telephone: 49 (0)7131 67 2594, Fax number: 49 (0)7131 67 2423