8XC196MC, MD, MH USER’S MANUAL

10.5.4 Generating Analog Outputs

PWM modules can generate a rectangular pulse train that varies in duty cycle and period. Filter- ing this output will create a smooth analog signal. To make a signal swing over the desired analog range, first buffer the signal and then filter it with either a simple RC network or an active filter. Figure 10-7 is a block diagram of the type of circuit needed to create the smooth analog signal.

MCS®96

Buffer

Filter

Power

 

Microcontroller

to Make

(Passive

Amp

 

PWM

Output Swing

or

 

Analog

Rail

Active)

(Optional)

Output

 

to

 

 

 

 

Rail

(Optional)

 

 

 

 

 

 

A2391-01

Figure 10-7. D/A Buffer Block Diagram

Figure 10-8 shows a sample circuit used for low output currents (less than 100 μA). Consider temperature and power-supply drift when selecting components for the external D/A circuitry. With proper components, a highly accurate 8-bit D/A converter can be made using the PWM.

PWM

MCS®96

Microcontroller

R

74ACxxx

Buffer

C

-

+

Op Amp

Analog Output

Consider both ripple and response time requirements when selecting R and C.

A2390-02

Figure 10-8. PWM to Analog Conversion Circuitry

10-10

Page 237
Image 237
Intel 8XC196MD, 8XC196MH, 8XC196MC manual Generating Analog Outputs, D/A Buffer Block Diagram