Hello Guest it is April 16, 2024, 12:29:16 PM

Author Topic: Can the Pokeys PWM outputs be used to emulate a DAC?  (Read 3735 times)

0 Members and 1 Guest are viewing this topic.

Can the Pokeys PWM outputs be used to emulate a DAC?
« on: November 01, 2012, 01:56:47 PM »
The subject says it all really.

Will the PWM outputs, with a suitable series resistance and load (with a capacitor to provide smoothing) give me the equivalent of a DAC output?  I just want an easy way to drive a 200mV digital meter to use it to display a value generated by my pokeys56e.

Further to that can I read an A2D input and feed the result out to one of the PWM outputs using the supplied software?

Offline NeoTO

*
  •  504 504
    • View Profile
    • PoLabs
Re: Can the Pokeys PWM outputs be used to emulate a DAC?
« Reply #1 on: November 16, 2012, 01:59:20 AM »
Apparently I missed this topic, so this is coming a little bit late...

Yes, you can use PWM outputs with an appropriate RC low-pass filter to simulate analog inputs. You can even try to hook up a digital meter directly to PWM outputs as some of the meters already have a low-pass filtering built-in.

You can assign a value of the analog input to an unused Mach3 DRO register and use the same register as the duty cycle of the selected PWM output.
www.poscope.com home of PoKeys USB HID, IO, USB, Ethernet controler and PoScope USB PC oscilloscope