I'm using a 12-bit Linear LTC2631 DAC, and wish to convert my PWM signal to an analog one via I2C. I am currently not able to come up with an algorithm, and how would the the DAC need to programmed to take in the PWM input and then generate an output. I'm using a Pro Micro 3.3V board.
Any help would be appreciated, including stuff over the internet which I could read up?
Thanks!
If you're going to use an I2C DAC IC like the LTC2631 you don't need PWM at all. You just pass a binary value to the IC via I2C and it will be converted to an analog voltage. If you want to use PWM to generate an analog signal you might want to filter the output so it doesn't look all square. Take a look at: http://interface.khm.de/index.php/lab/experiments/arduino-dds-sinewave-generator/ and: http://www.avdweb.nl/arduino/hardware-interfacing/super-simple-dac.html
Best.