Oki MSM83C154S, MSM80C154S manual Timer 2 control register T2CON

Page 19

¡ Semiconductor

 

 

 

 

 

MSM80C154S/83C154S

Timer 2 control register (T2CON)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

NAME

ADDRESS

MSB

 

 

 

 

 

 

 

 

 

 

LSB

7

6

5

 

4

3

 

2

 

1

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T2CON

0C8H

TF2

EXF2

RCLK

 

TCLK

EXEN2

 

TR2

 

C/T2

 

CP/RL2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BIT LOCATION

FLAG

 

 

 

 

FUNCTION

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T2CON.0

CP/RL2

Capture mode is set when TCLK + RCLK = "0" and CP/RL2 = "1".

 

 

 

 

 

16-bit auto reload mode is set when TCLK + RCLK = "0" and CP/RL2 = "0".

 

 

CP/RL2 is ignored when TCLK + RCLK = "1".

 

 

 

 

 

 

 

 

 

 

 

 

 

T2CON.1

C/T2

Timer/counter 2 count clock designation control bit.

 

 

 

 

 

 

 

The internal clocks (XTAL1•2 ÷ 12, XTAL1•2 ÷ 2) are used when this bit is "0",

 

 

and the external clock applied to the T2 pin is passed to timer/counter 2 when

 

 

the bit is "1".

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T2CON.2

TR2

Timer/counter 2 counting start and stop control bit.

 

 

 

 

 

 

 

Timer/counter 2 commences counting when this bit is "1" and stops counting

 

 

when "0".

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T2CON.3

EXEN2

T2EX timer/counter 2 external control signal control bit.

 

 

 

 

 

Input of the T2EX signal is disabled when this bit is "0", and enabled when "1".

 

 

 

 

 

 

 

 

T2CON.4

TCLK

Serial port transmit circuit drive clock control bit.

 

 

 

 

 

 

 

Timer/counter 2 is switched to baud rate generator mode when this bit is "1",

 

 

and the timer/counter 2 carry signal becomes the serial port transmit clock.

 

 

Note, however, that the serial ports can only use the timer/counter 2 carry signal

 

 

in serial port modes 1 and 3.

 

 

 

 

 

 

 

 

T2CON.5

RCLK

Serial port receive circuit drive clock control bit.

 

 

 

 

 

 

 

Timer/counter 2 is switched to baud rate generator mode when this bit is "1",

 

 

and the timer/counter 2 carry signal becomes the serial port transmit clock.

 

 

Note, however, that the serial ports can only use the timer/counter 2 carry signal

 

 

in serial port modes 1 and 3.

 

 

 

 

 

 

 

 

T2CON.6

EXF2

Timer/counter 2 external flag.

 

 

 

 

 

 

 

 

 

 

This bit is set to "1" when the T2EX timer/counter 2 external control signal level

 

 

is changed from "1" to "0" while EXEN2 = "1".

 

 

 

 

 

 

 

This flag serves as the timer interrupt 2 request signal. If an interrupt is

 

 

 

generated, EXF2 must be reset to "0" by software.

 

 

 

 

 

T2CON.7

TF2

Timer/counter 2 carry flag.

 

 

 

 

 

 

 

 

 

 

This bit is set to "1" by a carry signal when timer/counter 2 is in 16-bit auto

 

 

reload mode or in capture mode.

 

 

 

 

 

 

 

 

 

 

This flag serves as the timer interrupt 2 request signal. If an interrupt is

 

 

 

generated, TF2 must be reset to "0" by software.

 

 

 

 

 

277

Image 19
Contents Cmos 8-bit Microcontroller FeaturesGeneral Description ¡SemiconductorSemiconductor MSM80C154S/83C154S¡ Semiconductor MSM80C154S/83C154SAddress Decoder SignalTIMER/COUNTER 0 Interrupt 2PORTPin Plastic DIP PIN Configuration TOP ViewPsen 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 35 EA P3.0/RXD 34 NC 33 ALE P3.1/TXD Pin Plastic QFJXTAL1 XTAL2 19 P3.7/RD 18 P3.6/WR MSM80C154S/83C154S¡ Semiconductor PIN DescriptionsALE XTAL1 ¡ SemiconductorMSM80C154S/83C154SXTAL2 Registers Diagram of Special Function RegistersGate Special Function Registers Timer mode register TmodInterrupt signal Power control register PconCPU is reset TR1 TF0 TR0 IE1 IT1 IE0 IT0 Timer control register TconInterrupt request flag for external interrupt TconREN Serial port control register SconMode Overall interrupt control bit Interrupt enable register IEInterrupt control bit for serial port Reserved bit. The output data is 1 if the bit is read PCT PT2 PT1 PX1 PT0 PX0 Priority is assigned when bit is Interrupt 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 RatingsDC Characteristics Electrical CharacteristicsPort 0, ALE, Psen Maximum power supply current idle mode ICC mA Maximum power supply current normal operation ICC mALogical 0 Input Current VI=0.1 Logical 1 Output Current Output High Voltage Port 1, 2VO=0.1 Port 1, 2 Logical 1 to 0 Transition 285 Input Measuring circuitsOutput To ALE Falling Edge Address Hold Time ALE Signal WidthAddress Setup Time Falling Edge Psen Signal WidthPORT0 External program memory read cycleInstr 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