Pulsout with digital pot
rtmorris
Posts: 31
In WAM 2.2 page 279, a program is introduced that is confusing.·· Within the chapter
the digial pot is pulsed on some pin for 2 microsecond:
pulsout 6, 1
However on pg. 279, a program is introduced that pulses the pin for 5 microseconds:
LOW UdPin ' Set U/D pin for Down.
FOR counter = 0 TO 128 ' Set tap to lowest position.
PULSOUT 6,5
PAUSE 1
NEXT
Why did the pulsout time period suddenly change, why not go by ones?
Also, I will be teaching this to High School Students, do you think that they will be able to come up with the exercise in the end on their own??· It seems a bit
tough to come up with the program to make the led respond to the light·in the room on their own.
-Rob Morris
Al
the digial pot is pulsed on some pin for 2 microsecond:
pulsout 6, 1
However on pg. 279, a program is introduced that pulses the pin for 5 microseconds:
LOW UdPin ' Set U/D pin for Down.
FOR counter = 0 TO 128 ' Set tap to lowest position.
PULSOUT 6,5
PAUSE 1
NEXT
Why did the pulsout time period suddenly change, why not go by ones?
Also, I will be teaching this to High School Students, do you think that they will be able to come up with the exercise in the end on their own??· It seems a bit
tough to come up with the program to make the led respond to the light·in the room on their own.
-Rob Morris
Al
Comments
·· You may notice the PAUSE value also changed between the examples.· The width of the pulse is only one component of controlling the digital pot.· Another factor is speed of the pulses, and when the pulse width is shorter a longer pause is being used.· When the pulse was increased the pause was decreased.· At the speed of the BS2 the pulse width will have little effect on the pot except to increase the time it takes to pulse the line.· The pause however will directly affect the speed of the changes.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com