Looking for Simple DAC and ADC Spin2 Examples
Duane Degn
Posts: 10,588
in Propeller 2
I really enjoyed reading JonnyMac's Nuts&Volts article. It really helped me understand the PWM mode of the Smartpins. Are there similar examples on how to use the Propeller 2's Smartpins in DAC and ADC modes?
I've been trying to catch up on all the relevant P2 threads hoping to make sense of DAC and ADC modes but I'm going to cry "Uncle" and ask for help.
I don't need fast response times for either the DAC or the ADC. I'm hoping for an example similar to Jon's PWM code:
Ideally an example I can use with the Propeller Tool.
I've been trying to catch up on all the relevant P2 threads hoping to make sense of DAC and ADC modes but I'm going to cry "Uncle" and ask for help.
I don't need fast response times for either the DAC or the ADC. I'm hoping for an example similar to Jon's PWM code:
pub start(pin, duty, hz) | x ‘’ Configure smart pin for DMX-compatible PWM ‘’ -- pin - output pin (0..55) ‘’ -- duty - duty cycle of output 0 to 255 (100%) ‘’ -- hz - pwm output frequency if (hz > 0) pp := pin x.word[1] := 255 x.word[0] := 1 #> ((clkfreq / 255) / hz) <# $FFFF pinstart(pin, P_OE | P_PWM_SAWTOOTH, x, duty)
Ideally an example I can use with the Propeller Tool.
Comments
And one deleted.
Thanks kwinn but I'm looking for Propeller 2 Smartpin examples.
-- https://github.com/parallaxinc/propeller/tree/master/libraries/community/p2/All/jm_ez_analog
Instead of: ... you should be able to do this...
I didn't read the details well enough when I saw that earlier. I erroneously assumed it was just a quadrature encoder example. Thank for help on this.
I really appreciate all the help you provide here.
http://forums.parallax.com/discussion/comment/1496551/#Comment_1496551
Andy
https://mailchi.mp/0010e3d4a682/propeller-2-live-forum-three-new-presentations-scheduled-4492952
Thanks
For some reason I thought I had missed it already. Thanks, I'm watching now.