XC912BC32CFU8 Motorola Semiconductor Products, XC912BC32CFU8 Datasheet - Page 166
XC912BC32CFU8
Manufacturer Part Number
XC912BC32CFU8
Description
M68HC12B Family Data Sheet
Manufacturer
Motorola Semiconductor Products
Datasheet
1.XC912BC32CFU8.pdf
(362 pages)
- Current page: 166 of 362
- Download datasheet (5Mb)
Standard Timer Module (TIM)
12.5 Using the Output Compare Function to Generate a Square Wave
12.5.1 Sample Calculation to Obtain Period Counts
12.5.2 Equipment
Data Sheet
166
This timer exercise is intended to utilize the output compare function to generate a
square wave of predetermined duty cycle and frequency.
The program generates a square wave, 50 percent duty cycle, on output
compare 2 (OC2). The signal will be measured by the HC11 on the UDLP1 board.
It assumes a 8.0 MHz operating frequency for the E clock. The control registers are
initialized to disable interrupts, configure for proper pin control action and also the
TC2H register for desired compare value. The appropiate count must be calculated
to achieve the desired frequency and duty cycle. For example: for a 50 percent
duty, 1 KHz signal each period must consist of 2048 counts or 1024 counts high
and 1024 counts low. In essence a $0400 is added to generate a frequency of
1 kHz.
The sample calculation to obtain period counts is:
For this exercise, use the M68HC912B32EVB emulation board.
•
•
Square wave frequency 1000 Hz, duty cycle 50%
For 1000 Hz frequency:
–
–
–
For a 1 KHz, 50 percent duty cycle:
–
–
E-clock = 8 MHz
IC/OC resolution factor = 1/(E-clock/Prescaler)
If the Prescaler = 4, then output compare resolution is 0.5 µs
1/F = T = 1/1000 = 1 ms
F for output compare = prescaler/E clock = 2 MHz
Standard Timer Module (TIM)
1 ms
Figure 12-30. Example Waveform
0.5 ms
NUMBER OF CLOCKS = F * D
THEREFORE,
#CLOCKS = (2 MHz) * (0.5 ms) = 1024 = $0400
M68HC12B Family — Rev. 8.0
MOTOROLA
Related parts for XC912BC32CFU8
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Triacs
Manufacturer:
Motorola Semiconductor Products
Datasheet:
Part Number:
Description:
Triacs
Manufacturer:
Motorola Semiconductor Products
Datasheet:
Part Number:
Description:
6367254 Motorola SC (xstrs/r F)
Manufacturer:
Motorola Semiconductor Products
Datasheet:
Part Number:
Description:
50 Amperes NPN Silicon Power Darlington Transistor 850 Volts 250 Watts
Manufacturer:
Motorola Semiconductor Products
Datasheet:
Part Number:
Description:
DUAL GATE Mosfet VHF Amplifier
Manufacturer:
Motorola Semiconductor Products
Datasheet:
Part Number:
Description:
DUAL GATE Mosfet VHF Amplifier
Manufacturer:
Motorola Semiconductor Products
Datasheet:
Part Number:
Description:
NPN Darlington Silicon Power Transistor 10 Amperes 80 Volts 20 Watts
Manufacturer:
Motorola Semiconductor Products
Datasheet:
Part Number:
Description:
Integrated Circuits
Manufacturer:
Motorola Semiconductor Products
Datasheet:
Part Number:
Description:
Low Skew CMOS Clock Driver
Manufacturer:
Motorola Semiconductor Products
Datasheet:
Part Number:
Description:
Low Skew CMOS Clock Driver With Reset
Manufacturer:
Motorola Semiconductor Products
Datasheet:
Part Number:
Description:
Manufacturer:
Motorola Semiconductor Products
Datasheet:
Part Number:
Description:
Low-cost 16-bit DSP with DDR Controller and 10/100 Mbps Ethernet MAC
Manufacturer:
Motorola Semiconductor Products
Datasheet:
Part Number:
Description:
Fast Recovery Power Rectifiers
Manufacturer:
Motorola Semiconductor Products
Datasheet:
Part Number:
Description:
Fast Recovery Power Rectifiers
Manufacturer:
Motorola Semiconductor Products
Datasheet: