Using PING and Digital Pot at same time.
TonyA
Posts: 226
Hi,
Could the BS2 read input from the PING and also control a digital pot at the same time?
I'm trying to have the value of the PING control the output of a digital pot.
PULSIN PING
Distance = x
x = digital pot output in k Ohms
Thanks for any info.
Tony
Could the BS2 read input from the PING and also control a digital pot at the same time?
I'm trying to have the value of the PING control the output of a digital pot.
PULSIN PING
Distance = x
x = digital pot output in k Ohms
Thanks for any info.
Tony
Comments
·· It wouldn't be at the same exact time (The BS2 is single-tasking), but you could take the data from the PING))) and use it to adjust the Digital POT.· It may require some scaling of the data.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Would it be as fast as if I used an analog pot (as an input to the BS2 using RCTIME) to adjust the output of a digital pot?
Tony
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
·· The speed of the updates to your digital POT will be directly related to the distance from the PING))) sensor, since things farther away take longer to return a pulse.· You will find the closer something is to the PING))) the quicker it returns the pulse.· But the there's the interface to the digital POT.· If it's synchronous serial (SPI) then you will have to SHIFOUT the data to it, whereas if it's a pulse up or pulse down type, then you have to generate the correct number of pulses.· This also takes time.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Ok, I understand, Thank you.
Tony