November 23, 2024, 08:23:13 AM

News:

Be sure to checkout our Vixen interfaces in the Library forum -- if you want PC automation at near zero cost, EFX-TEK and Vixen is a great combination of tools.


Pot function using prop-1

Started by imagineerdan, June 08, 2009, 02:20:34 PM

Previous topic - Next topic

imagineerdan

June 08, 2009, 02:20:34 PM Last Edit: June 09, 2009, 05:10:34 PM by imagineerdan
I wanted to clarify this a little more...

Using the pot function I want to make an adustible really really fast strobe for leds.

What the code and wiring look like to create a potentiometer controlled prop-1 variable speed "funtion generator" I know this wouldnt be a true funtion generator but something that could output a blinking pin from say 5 ms to 200 ms?

Thanks soo much :)

JonnyMac

You'll find the circuit in the BASIC Stamp Editor help file under the POT function -- it's simple, just a potentiometer and a capacitor in series between the pin and ground.

Details: You need to remove the ULN influence from any pin using the POT command.  POT makes the pin an output and high for 10ms to charge the capacitor before going into the discharge/check cycle so your minimum time is going to be 10ms+.  I suggest you use a 5K pot and a 0.01 cap so that the discharge time is fast.  Remember to run the Scaling program from the run menu to scale the pot command so that you get a 0 to 255 value back.
Jon McPhalen
EFX-TEK Hollywood Office