Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] 1-bit DAC on AVR with no PWM

2004-11-17 by Leon Heller

----- Original Message ----- 
From: alan_probandt
To: AVR-Chat@yahoogroups.com
Sent: Wednesday, November 17, 2004 11:59 PM
Subject: [AVR-Chat] 1-bit DAC on AVR with no PWM



Hello,
  I'm interested in implementing a super cheap DAC (1 or 2 resistors
and a capacitor) on an output pin of a Tiny 11 AVR.  This AVR has no
Pulse Width Modulation register/timer that would normally be used to
implement a pseudo-DAC like this.
  Any anyone done this?  Are there optimal resistor/capacitor values?
I'd like to make an adjustable very low frequency oscillator (0.1 to
5 Hz triangle or sine wave) between +2.5 and 4 volts.  I'd also like
to make its speed controllable by changing the external system clock
speed that is fed into the Tiny 11.
  I'm not even sure what keywords to use for a Google search on this
one.

Microchip has a PIC app. note (AN655) on this that you might find useful, 
with source code for sine wave generation. It's all done in software, so 
should be OK on the Tiny11. It's only a couple of pages so it would be quite 
easy to translate into AVR code.

Leon

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.