This can be done with a pulse (square-wave) obtained simply by turning a port on and off with time delays I guess, but from where and how do we obtain the maximum voltage?
You run the square wave through a low pass filter. The simplest one-pole low pass filter is a series R and a parallel C. The voltage on the capacitor is the integral of the on voltage times the time, plus the off voltage times the time divided by the period. Another way of saying that is to say the voltage is the average of the two voltages.
If the duty cycle is 100% then the voltage across the capacitor C will asymptotically approach Vcc. If the corenr frequency is low enough it could take a very long time to get there.
If the duty cycle is 100% then the voltage across the capacitor C will asymptotically approach Vcc. If the corenr frequency is low enough it could take a very long time to get there.
Could always make a cheap and nasty dac with the old 2r ladder design ... and give it some pins (more pins more bits) ... it is a no brainer to do and cheap too... just some resistors and some pins ... cant say its perfect but I am throwing it in the mix ....
Could always make a cheap and nasty dac with the old 2r ladder design ... and give it some pins (more pins more bits) ... it is a no brainer to do and cheap too... just some resistors and some pins ... cant say its perfect but I am throwing it in the mix ....
I came across a PIC with built-in D/A converter some time ago. You simply load a special register with an 8-bit value and it produces the analog output. I've never seen the D/A module on a flash-based PIC though.
Could always make a cheap and nasty dac with the old 2r ladder design ... and give it some pins (more pins more bits) ... it is a no brainer to do and cheap too... just some resistors and some pins ... cant say its perfect but I am throwing it in the mix ....