Hyundai GMS90X52C Timer / Counter 0, Timer/Counter 0 and 1 Operating Modes Description, Tmod

Page 22

HYUNDAI MicroElectronics

GMS90X5XC Series

TIMER / COUNTER 0 AND 1

Timer/Counter 0 and 1 can be used in four operating modes as listed in Table 4:

Table 4. Timer/Counter 0 and 1 Operating Modes

Mode

Description

 

 

TMOD

 

Input Clock

 

 

 

 

 

 

 

 

 

 

Gate

C/T

 

M1

M0

internal

external (Max.)

 

 

 

 

 

 

 

 

 

0

8-bit timer/counter with a

X

X

 

0

0

fOSC ÷(12×32)

fOSC ÷(24×32)

 

divide-by-32 prescaler

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

16-bit timer/counter

X

X

 

0

1

fOSC ÷12

fOSC ÷24

2

8-bit timer/counter with

X

X

 

1

0

fOSC ÷12

fOSC ÷24

 

8-bit auto-reload

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

Timer/counter 0 used as

X

X

 

1

1

fOSC ÷12

fOSC ÷24

 

one 8-bit timer/counter and

 

 

 

 

 

 

 

 

 

one 8-bit timer Timer 1

 

 

 

 

 

 

 

 

 

stops

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

In the "timer" function (C/T = "0") the register is incremented every machine cycle. Therefore the count rate is fOSC/12.

In the "counter" function the register is incremented in response to a 1-to-0 transition at its corresponding exter- nal input pin (P3.4/T0, P3.5/T1). Since it takes two machine cycles to detect a falling edge the max. count rate is fOSC/24. External inputs INT0 and INT1 (P3.2, P3.3) can be programmed to function as a gate to facilitate pulse width measurements. Figure 4 illustrates the input clock logic.

fOSC

 

 

÷ 12

 

 

 

 

 

 

C/T

TMOD

0

P3.4/T0

 

 

 

 

 

 

 

 

 

 

 

 

P3.5/T1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

Max. fOSC/24

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TR0 / 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TCON

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Gate

 

=1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TMOD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

P3.2 /

INT0

 

 

 

 

 

 

 

 

 

 

 

 

 

P3.3 / INT1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

&

fOSC ÷ 12

Timer 0/1 Input Clock

Figure 4. Timer/Counter 0 and 1 Input Clock Logic

18

Jan. 2001 Ver 1.0

Image 22
Contents GMS90X51C GMS90X52C GMS90X54C Page Mask Block Diagram GMS90C51CGMS90C52C/54C GMS90L52C/54CLow voltage versions PIN Configuration Plcc Pin Configuration top viewPdip Pin Configuration top view EA / VPP ALE / ProgMqfp Pin Configuration top view Logic Symbol PIN Definitions and Functions XTAL2Reset Symbol FunctionProgram Store Enable Pin NumberCircuit ground potential Address Latch EnableNo connection Block Diagram of the GMS90X5XC series Functional DescriptionCPU Special Function Register PSWSpecial Function Registers FFH D8H C0HD0H E0HF0H Contents of SFRs, SFRs in Numeric Order Address RegisterE0H D0HGF1 GF0 PDE Idle C8H T2CON TF2 EXF2 Rclk Tclk EXEN2 TR2 CP/RL2 X2 Mode Clock Generation DiagramMode Swithcing Waveforms Tmod Timer / Counter 0Timer/Counter 0 and 1 Operating Modes Description Input ClockP1.1 Remarks Input Clock TimerTimer/Counter 2 Operating Modes T2EXBaudrate Description Serial Interface UsartUsart Operating Modes SM0 SM1Interrupt System Interrupt Request SourcesInterrupt Priority-Within-Level Interrupt Source Power Saving Modes Electrical Characteristics Absolute Maximum RatingsParameter Symbol Limit Values Unit Test Conditions Min DC Characteristics for GMS90C51C/52C/54CPower supply current Hyundai MicroElectronics DC Characteristics for GMS90L51C/52C/54C VCC= 3.3V + 0.3V, -0.6V VSS=0V TA= 0C to 70CAC Characteristics for GMS90X5XC series 12MHz version Explanation of the AC SymbolsExternal Program Memory Characteristics GMS90X5XC Series Advance Information 12MHz External Clock Drive AC Characteristics for GMS90X5XC series 16MHz version Advance Information 16MHz External Clock Drive AC Characteristics for GMS90X5XC series 24MHz version Advance Information 24MHz External Clock Drive AC Characteristics for GMS90X5XC series 33MHz version Advance Information 33MHz External Clock Drive AC Characteristics for GMS90X5XC series 40MHz version Advance Information 40MHz External Clock Drive External Program Memory Read Cycle External Data Memory Read Cycle AC Testing Input, Output Waveforms Oscillator Circuit Plastic Package P-LCC-44 44PLCCPlastic Package P-DIP-40 Plastic Package P-MPQF-44 GMS90X5XC Series GMS90X5XC-GC ROM Protection