Pwmout

zanger

New Member
Hi all,

To perform DA conversion I often use Pwmout,255,xxxx. Vwish/Vsupply = xxxx/1023 and easy to calculate. Outputs to a simple RC network f.e. R=10k and C=4.7uf. One has to buffer the output. I' am using a LM358 (dual opamp). It's output ranges from 0 to Vsupply - ca. 1.5V. When powering the LM358 at an at least 2Volt higher level then the PicAxe, one gets DA conversion over the full range of the voltage of the PicAxe.
Once the Pwmout command is executed the PicAxe is free to continue it's program.
I have used it to multimeterdisplay all kinds of calculations, like temperature, linear position etc.

Regards
 
AN LMC622 is pin for pin compatible with an LM358, draws 100 - 200 ua for power and will swing to within a hundred or so millivolts of either rail. The LM358 will not go more than 1.2 - 1.5 V above the negative rail (or ground) and that might require a schmidt trigger input to properly sense a fast pulse train accurately, It was a change I found on another project many years ago and now the only time I use a '358 is for exact replacement. Many circuits that use the '358 just will not work properly with the additional 2.4 volts (min) added output swing.

Robert K. Johnson sr.
 
Top