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

no-image

SAB80C517-M16

Manufacturer Part Number
SAB80C517-M16
Description
8-Bit CMOS Single-Chip Microcontroller
Manufacturer
SIEMENS [Siemens Semiconductor Group]
Datasheet
The same calculation must be performed when register CC1 has had its match and has caused an
interrupt for PWM channel 1. But this is done independently from channel 2 since both channels
have their own interrupt request flags.
When either of the two count values of T
channel 1 is first) then the corresponding interrupt routine polls the user flag and is informed that a
new PWM cycle is to be generated. It therefore calculates the next compare value to:
T
where T
10.1.2 Sine-Wave Generation with a CMx Registers/Compare Timer Configuration
The following example of a PWM generation demonstrates the use of some important features of
the SAB 80C517´s CCU:
The above features allow:
The following paragraphs do not contain a basic description of PWM generation with
microcontrollers but rather should give an idea of how to use the CCU of the SAB 80C517 in this
kind of applications. Please refer to other literature for a general description of the pulse width
modulation.
The example in the following uses typical parameters: a PWM frequency above the audible range
(23.4 kHz), with 8-bit resolution. The PWM may, for instance, be used to generate a sine-wave via
a low-cost RC filter.
To simplify matters, just one PWM channel is used in this example. The SAB 80C517, however, can
drive up to eight channels with the fast compare timer.
Semiconductor Group
CCnext
– flexibly programmable compare timer with 16-bit reload and 8 selectable input clocks (
– "TOC-loading" mechanism to reduce interrupt load of the CPU
– PWM generation for digital-to-analog conversion with extremely low external hardware costs
– output frequencies from less than 1 Hz (16-bit reload, timer input clock of
to
(simple passive RC filter or any other integrating device)
(2-bit reload, timer input clock of
= T
CCduty
f
OSC
CCact
/256)
may be a new value for the duty cycle calculated in another task of the program.
+ T
CCduty
f
OSC
/2)
CCnext
258
has been reached by timer 2 (in our example,
Application Examples
f
OSC
/256) to 3 MHz
f
OSC
/2

Related parts for SAB80C517-M16