The PWM filter

Started by ricinecwh July 28, 2006
Somebody tell me the PWM can be used in the Digital to analog
conversion, and it is the best way to convert the digital output of the
basicX microcontroller.
do anybody have the knowledge about the PWM code of the basic?
Thank you very much
Look up the "DACPin" command (or the PutDAC command.) It puts out a
brief PWM signal on the specified pin. To get an analog signal you would
put a resistor and a capacitor in series to ground; and you take the Analog
signal off the top of the capacitor (between the resistor and
capacitor.) You might start with values of 1K and 1uF and make adjustments
from there.

BasicX pin ------\/\/\/\/\------+-----||------Ground

You may have to buffer this signal with an OpAmp if you have a low
impedance load.

Note that you have to keep refreshing this to keep the capacitor
charged; ie. have the main loop of you program call the DACPin/PutDAC
command every so often.

(On the BasicX Web Site they have example programs running PWM in the
background; better once working, but more complicated to get working than
just refreshing the DAC command evey so often.)
Good Luck!
Ken_S.

At 05:14 AM 7/28/2006, you wrote:
>Somebody tell me the PWM can be used in the Digital to analog
>conversion, and it is the best way to convert the digital output of the
>basicX microcontroller.
>do anybody have the knowledge about the PWM code of the basic?
>Thank you very much
Thank you very much!
However, i am also confused about the DACPIn and PWM ,as i am the
new users of the Basic.

Is that the DAC method can also generete the PWM signal or
it is the other mehtod for the DAC conversion?
Would you mind giving more detail about the DACPin for the DAC
conversion?

Thank you
--- In b..., Robotics_Job_Search
wrote:
> Look up the "DACPin" command (or the PutDAC command.) It
puts out a
> brief PWM signal on the specified pin. To get an analog signal you
would
> put a resistor and a capacitor in series to ground; and you take the
Analog
> signal off the top of the capacitor (between the resistor and
> capacitor.) You might start with values of 1K and 1uF and make
adjustments
> from there.
>
> BasicX pin ------\/\/\/\/\------+-----||------Ground
>
> You may have to buffer this signal with an OpAmp if you have a
low
> impedance load.
>
> Note that you have to keep refreshing this to keep the capacitor
> charged; ie. have the main loop of you program call the
DACPin/PutDAC
> command every so often.
>
> (On the BasicX Web Site they have example programs running
PWM in the
> background; better once working, but more complicated to get
working than
> just refreshing the DAC command evey so often.)
> Good Luck!
> Ken_S.
>
> At 05:14 AM 7/28/2006, you wrote:
> >Somebody tell me the PWM can be used in the Digital to analog
> >conversion, and it is the best way to convert the digital output of the
> >basicX microcontroller.
> >do anybody have the knowledge about the PWM code of the basic?
> >Thank you very much
> >
> >
> >
> >
> >
> >
> >
> >