Texas Instruments MSC1210 manual This can be expressed in code as

Models: MSC1210

1 324
Download 324 pages 20.97 Kb
Page 131
Image 131

PWM Generator

This can be expressed in code as:

PWMCON = 0x10; // Sel PWM Duty Register

PWM = 128−1; // PWM toggle at a count of 128

PWMCON = 0x09; // Sel PWM Period access, SysClk rate, PWM mode PWM = 512−1; // 11.0592MHz/512=21.6KHz PWM Freq, Period=512 counts

Note:

The port pin used for PWM (P3.3) must be configured as either standard 8051 or CMOS output for the tone generator/PWM to function.

Pulse Width Modulator/Tone Generator

11-7

 

Page 131
Image 131
Texas Instruments MSC1210 manual This can be expressed in code as