mg84fl54b Megawin Technology, mg84fl54b Datasheet - Page 29
mg84fl54b
Manufacturer Part Number
mg84fl54b
Description
Full-speed Usb Micro-controller
Manufacturer
Megawin Technology
Datasheet
1.MG84FL54B.pdf
(94 pages)
- Current page: 29 of 94
- Download datasheet (2Mb)
10.2.4. Programmable Clock Output from Timer 2
Timer 2 has a Clock-Out Mode (while CP/-RL2=0 & T2OE=1). In this mode, Timer 2 operates as a
programmable clock generator with 50% duty-cycle. The generated clocks come out on P1.0. The input clock,
Fosc/2, increments the 16-bit timer [TH2, TL2], where Fosc is the system clock. The timer repeatedly counts to
overflow from a loaded value. Once overflows occur, the contents of [RCAP2H, RCAP2L] are loaded into [TH2,
TL2] for the consecutive counting. Note that the Timer 2 overflow flag, TF2, will always not be set in this mode.
The following formula gives the clock-out frequency:
Fosc
=
Clock
-
out
Frequency
4
x
(65536
-
[RCPA2H,
RCAP2L])
(For a 12 MHz system clock, Timer 2 has a programmable output frequency range of 45.7 Hz to 3 MHz.)
How to Program Timer 2 as Its Clock-out Mode
• Set T2OE bit in T2MOD register.
• Clear C/T2 bit in T2CON register.
• Determine the 16-bit reload value from the formula and enter it in the [RCAP2H, RCAP2L] registers.
• Enter the same reload value as the initial value in the [TH2, TL2] registers.
• Set TR2 bit in T2CON register to start the Timer 2.
In the Clock-Out mode, Timer 2 rollovers will not generate an interrupt. This is similar to when Timer 2 is used
as a baud-rate generator. It is possible to use Timer 2 as a baud rate generator and a clock generator
simultaneously. Note, however, in this configuration, the baud rates and clock frequencies are not independent
since both functions use the same reload values in the [RCAP2H, RCAP2L] registers.
MEGAWIN
MG84FL54B Data sheet
29
Related parts for mg84fl54b
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
8 Bit Micro-Controller with Voice Synthesizer and Melody
Manufacturer:
Megawin Technology Co., Ltd.
Part Number:
Description:
8-bit micro-controller
Manufacturer:
Megawin Technology
Datasheet:
Part Number:
Description:
8-bit micro-controller
Manufacturer:
Megawin Technology
Datasheet:
Part Number:
Description:
8-bit micro-controller
Manufacturer:
Megawin Technology
Datasheet:
Part Number:
Description:
8-bit micro-controller
Manufacturer:
Megawin Technology
Datasheet:
Part Number:
Description:
1-channel 350v, 50ma/80ma Constant Current Dc Led Driver
Manufacturer:
Megawin Technology
Datasheet:
Part Number:
Description:
Universal Pwm Type Led Driver
Manufacturer:
Megawin Technology
Datasheet:
Part Number:
Description:
8 Bits Microcontroller
Manufacturer:
Megawin Technology
Datasheet:
Part Number:
Description:
8-bit Micro-controller
Manufacturer:
Megawin Technology
Datasheet:
Part Number:
Description:
A Single-chip Microcontroller Based On A High Performance 1-t Architecture 80c51
Manufacturer:
Megawin Technology
Datasheet:
Part Number:
Description:
8-bit Microcontroller
Manufacturer:
Megawin Technology
Datasheet:
Part Number:
Description:
Full-speed Usb Micro-controller
Manufacturer:
Megawin Technology
Datasheet:
Part Number:
Description:
8-bit Micro-controller
Manufacturer:
Megawin Technology
Datasheet:
Part Number:
Description:
8-bit Micro-controller
Manufacturer:
Megawin Technology
Datasheet: