You Are Here: Home » AVR ATmega Projects » Controlling internal DAC AT90PWM3 using microcontroller

Controlling internal DAC AT90PWM3 using microcontroller




Part list

1x AT90PWM3-16SQ
2x SLO2016 LED display
1x 22uF/25V elco SMD
2x 0.1uF/16V tant. 1206
2x 10 kOhm 1206
3x 100n multilayer 1206
1x coil 10uH SMD
1x rotary encoder (Sharp)

 

Digital voltage control unit
his is how a value is stored into the DAC registers. First you have to set the voltage reference (REFS0=1 and REFS1=0 means internal reference), which is the same as the ADC reference, and then enable the DAC and the DAC output.

at 90 pwm3 dac

ldi temp, (1<<REFS0) sts ADMUX, temp
ldi temp, (1<<DAEN)|(1<<DAOE)
sts DACON, temp

Now you can set a 10-bit value in e.g. the Y registers and output on pin D2A of the AT90PWM3.

sts DACL, YL

sts DACH, YH

For more detail: Controlling internal DAC AT90PWM3 using microcontroller

Leave a Comment

You must be logged in to post a comment.

Read previous post:
Controlling SpeakJet with an AVR microcontroller using ATmega88 microcontroller

Core Features: · Programmable, 5 channel synthesizer. · Natural phonetic speech synthesis. · DTMF and other sound effects. · Programmable...

Close
Scroll to top