Oki MSM83C154S, MSM80C154S manual Special Function Registers Timer mode register Tmod, Gate

Page 11

¡ Semiconductor

MSM80C154S/83C154S

Special Function Registers

Timer mode register (TMOD)

NAME

ADDRESS

MSB

 

 

 

 

 

 

 

 

 

LSB

7

6

5

4

 

3

 

2

1

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TMOD

89H

GATE

C/T

M1

M0

 

GATE

 

C/T

M1

 

M0

 

 

 

 

 

 

 

 

 

 

 

 

BIT LOCATION

FLAG

 

 

 

FUNCTION

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TMOD.0

M0

M1

M0

Timer/counter 0 mode setting

 

 

 

 

 

 

0

0

8-bit timer/counter with 5-bit prescalar.

 

 

 

 

 

0

1

16-bit timer/counter.

 

 

 

 

 

 

 

 

1

0

8-bit timer/counter with 8-bit auto reloading.

 

 

 

 

 

Timer/counter 0 separated into TLO (8-bit) timer/counter

TMOD.1

M1

1

1

 

 

 

 

and TH0 (8-bit) timer/counter. TF0 is set by TL0 carry, and

 

 

 

 

TF1 is set by TH0 carry.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TMOD.2

C/T

Timer/counter 0 count clock designation control bit.

 

 

 

 

 

 

XTAL1•2 divided by 12 clocks is the input applied to timer/counter 0 when

 

 

 

C/T = "0".

 

 

 

 

 

 

 

 

 

 

 

 

The external clock applied to the T0 pin is the input applied to timer/counter 0

 

 

when C/T = "1".

 

 

 

 

 

 

 

 

 

TMOD.3

GATE

When this bit is "0", the TR0 bit of TCON (timer control register) is used to

 

 

 

control the start and stop of timer/counter 0 counting.

 

 

 

 

 

 

If this bit is "1", timer/counter 0 starts counting when both the TR0 bit of TCON

 

 

and INT0 pin input signal are "1", and stops counting when either is changed

 

 

to "0".

 

 

 

 

 

 

 

 

 

 

TMOD.4

M0

M1

M0

Timer/counter 1 mode setting

 

 

 

 

 

 

0

0

8-bit timer/counter with 5-bit prescalar.

 

 

 

 

 

0

1

16-bit timer/counter

 

 

 

 

 

 

 

 

1

0

8-bit timer/counter with 8-bit auto reloading.

 

TMOD.5

M1

 

1

1

Timer/counter 1 operation stopped.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TMOD.6

C/T

Timer/counter 1 count clock designation control bit.

 

 

 

 

 

 

XTAL1•2 divided by 12 clocks is the input applied to timer/counter 1 when

 

 

 

C/T = "0".

 

 

 

 

 

 

 

 

 

 

 

 

The external clock applied to the T1 pin is the input applied to timer/counter 1

 

 

when C/T = "1".

 

 

 

 

 

 

 

 

 

TMOD.7

GATE

When this bit is "0", the TR1 bit of TCON is used to control the start and stop of

 

 

timer/counter 1 counting.

 

 

 

 

 

 

 

 

 

 

If this bit is "1", timer/counter 1 starts counting when both the TR1 bit of TCON

 

 

and INT1 pin input signal are "1", and stops counting when either is changed

 

 

to "0".

 

 

 

 

 

 

 

 

 

 

269

Image 11
Contents Cmos 8-bit Microcontroller FeaturesGeneral Description ¡SemiconductorSemiconductor MSM80C154S/83C154S¡ Semiconductor MSM80C154S/83C154SAddress Decoder SignalTIMER/COUNTER 0 Interrupt 2PORTPsen PIN Configuration TOP ViewPin Plastic DIP 25 P2.7 24 P2.6 23 P2.5 P2.4 ResetPin Plastic QFP 44 P1.4 P1.5 P1.6 P1.7Pin Plastic Tqfp XTAL1 XTAL2 19 P3.7/RD 18 P3.6/WR Pin Plastic QFJ35 EA P3.0/RXD 34 NC 33 ALE P3.1/TXD ALE PIN DescriptionsMSM80C154S/83C154S¡ Semiconductor XTAL2 ¡ SemiconductorMSM80C154S/83C154SXTAL1 Registers Diagram of Special Function RegistersGate Special Function Registers Timer mode register TmodCPU is reset Power control register PconInterrupt signal TR1 TF0 TR0 IE1 IT1 IE0 IT0 Timer control register TconInterrupt request flag for external interrupt TconMode Serial port control register SconREN Overall interrupt control bit Interrupt enable register IEInterrupt control bit for serial port Reserved bit. The output data is 1 if the bit is readPCT PT2 PT1 PX1 PT0 PX0 Priority is assigned when bit isInterrupt priority register IP Priority interrupt circuit control bitBank Received at a serial port When this bit is set toControl register Iocon IZCTimer 2 control register T2CON Program Area Memory MapsBANK2 HEX 0FF AddressingindirectregisterBIT RAM BANK30FH MSM80C154S/83C154S Diagram of Internal Data Memory RAM0FFH 2FHRecommended Operating Conditions Absolute Maximum RatingsPort 0, ALE, Psen Electrical CharacteristicsDC Characteristics Maximum power supply current idle mode ICC mA Maximum power supply current normal operation ICC mAVO=0.1 Port 1, 2 Logical 1 to 0 Transition Output High Voltage Port 1, 2Logical 0 Input Current VI=0.1 Logical 1 Output Current 285 Output Measuring circuitsInput To ALE Falling Edge Address Hold Time ALE Signal WidthAddress Setup Time Falling Edge Psen Signal WidthInstr External program memory read cyclePORT0 External data memory access AC characteristics External data memory write cycle External data memory read cycleParameter Symbol Min Max Unit Serial port I/O Extension Mode AC characteristicsInput Data ALE Shift ClockExternal Clock Drive Waveform AC Characteristics Measuring ConditionsExternal Oscillator Signal XTAL1 external clock input waveform conditions294 Basictiming TimingDiagram