SAB80C517-M16 SIEMENS [Siemens Semiconductor Group], SAB80C517-M16 Datasheet - Page 258

no-image

SAB80C517-M16

Manufacturer Part Number
SAB80C517-M16
Description
8-Bit CMOS Single-Chip Microcontroller
Manufacturer
SIEMENS [Siemens Semiconductor Group]
Datasheet
Explanation of a Few Terms
– Pulse width modulation
In our case the PWM is used to synthesize a sine-wave. This means that a digital output signal is
periodically varied in the length of its high or low time (= duty cycle). One high and one low time
together make up a sample point of the sine-wave to be synthesized. The generation of the sine-
wave out of the modulated digital signal is done by a low-pass filter.
– PWM frequency
In this example the switching frequency of the PWM signal is fixed. The frequency is determined by
the reload value (
– 8-bit resolution
This means that only eight bits of the 16-bit wide timer and compare circuitry are used to generate
the PWM signal (
256 steps. Each step represents a quantum of one machine state or 166.6 ns at
(256 x 166.6 ns = 42.649 s; 1/42.649 s = 23.4 kHz)
Configuration of the CCU
To generate a sine-wave, the duty cycle of a PWM signal must be varied periodically, as mentioned
above. One PWM period (or one sample point) is represented by a full compare timer period. The
high-to-low transition of the PWM signal takes place upon every compare timer overflow, the low-
to-high transition is programmable and takes place when the timer count matches the contents of
the compare register (
contents of the compare register must be reloaded in every compare timer period.
– Compare timer setup
Input clock
The input clock is set to
the timer is incremented every machine cycle (166.6 ns at 12 MHz).
Reload
The reload register CTREL H (high byte) is set to 0FF H , CTRELL (low byte) must contain 00 H . Thus
the timer counts from 0FF00 H to 0FFFF H (= 8-bit reload
Semiconductor Group
resolution) and the input clock of the timer.
faster PWM frequency). Thus the duty cycle of the signal is programmable in
compare mode 0). In the worst case (maximum sine-wave frequency), the
f
OSC
/2. This can be done in special function register CTCON. In this case
259
256 steps).
Application Examples
f
OSC
= 12 MHz

Related parts for SAB80C517-M16