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

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top