HELP! pot command for rev.d stamp
Archiver
Posts: 46,084
Hi all,
Can anyone help me with figuring out how to use the pot command with
the rev d stamp? I am trying to basically use it to speed up and slow
down a couple of flashing leds. The manuals demo program doesnt seem
to work for me and I could really use a simple schematic and program
to show me how the command works. Thanks very much.
My email is bodine08@y...
Can anyone help me with figuring out how to use the pot command with
the rev d stamp? I am trying to basically use it to speed up and slow
down a couple of flashing leds. The manuals demo program doesnt seem
to work for me and I could really use a simple schematic and program
to show me how the command works. Thanks very much.
My email is bodine08@y...
Comments
BS1. If you have a BS2, consider the RCtime command.
HTH,
Leroy
N8VRC
bodine08 wrote:
>
> Hi all,
>
> Can anyone help me with figuring out how to use the pot command with
> the rev d stamp? I am trying to basically use it to speed up and slow
> down a couple of flashing leds. The manuals demo program doesnt seem
> to work for me and I could really use a simple schematic and program
> to show me how the command works. Thanks very much.
>
> My email is bodine08@y...
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Read the subject line it tells you the type of stamp being used, it is a
rev.d which is a plastic version of the
BS1.
Have Fun !!
Dale Fleischmann
Leroy Hall wrote:
> Are you using a BS1 or a BS2? The 'pot' command was written for the
> BS1. If you have a BS2, consider the RCtime command.
>
> HTH,
>
> Leroy
> N8VRC
>
> bodine08 wrote:
> >
> > Hi all,
> >
> > Can anyone help me with figuring out how to use the pot command with
> > the rev d stamp? I am trying to basically use it to speed up and slow
> > down a couple of flashing leds. The manuals demo program doesnt seem
> > to work for me and I could really use a simple schematic and program
> > to show me how the command works. Thanks very much.
> >
> > My email is bodine08@y...
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
because I didn't connect 'REV D with stamp 1"? I mean really anybody
should have picked that up right away !!!
[noparse]:)[/noparse])))))))))))))))
Leroy (alias Larry)
Dale Fleischmann wrote:
>
> Hello Larry;
>
> Read the subject line it tells you the type of stamp being used, it is a
rev.d which is a plastic version of the
> BS1.
>
> Have Fun !!
> Dale Fleischmann
>
> Leroy Hall wrote:
>
> > Are you using a BS1 or a BS2? The 'pot' command was written for the
> > BS1. If you have a BS2, consider the RCtime command.
> >
> > HTH,
> >
> > Leroy
> > N8VRC
> >
> > bodine08 wrote:
> > >
> > > Hi all,
> > >
> > > Can anyone help me with figuring out how to use the pot command with
> > > the rev d stamp? I am trying to basically use it to speed up and slow
> > > down a couple of flashing leds. The manuals demo program doesnt seem
> > > to work for me and I could really use a simple schematic and program
> > > to show me how the command works. Thanks very much.
> > >
> > > My email is bodine08@y...
> > >
> > > To UNSUBSCRIBE, just send mail to:
> > > basicstamps-unsubscribe@yahoogroups.com
> > > from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
> > >
> > >
> > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
I have been reading this forum for quite awhile now. It seems that you
almost always come back with a question that
either tells us that you do not know what you are talking about (this is one
example), or you do not have enough
information to help solve the problem. But I do have to give you credit for
some of your answers or solutions for certain
problems. You should look at the manuals once and awhile they have most of the
answers to most of the problems.
I will not bring this up again in the near future.
Have Fun !!
Dale Fleischmann
Leroy Hall wrote:
> So are you going to help the guy with his problem or just flame me
> because I didn't connect 'REV D with stamp 1"? I mean really anybody
> should have picked that up right away !!!
>
> [noparse]:)[/noparse])))))))))))))))
>
> Leroy (alias Larry)
>
> Dale Fleischmann wrote:
> >
> > Hello Larry;
> >
> > Read the subject line it tells you the type of stamp being used, it is a
rev.d which is a plastic version of the
> > BS1.
> >
> > Have Fun !!
> > Dale Fleischmann
> >
> > Leroy Hall wrote:
> >
> > > Are you using a BS1 or a BS2? The 'pot' command was written for the
> > > BS1. If you have a BS2, consider the RCtime command.
> > >
> > > HTH,
> > >
> > > Leroy
> > > N8VRC
> > >
> > > bodine08 wrote:
> > > >
> > > > Hi all,
> > > >
> > > > Can anyone help me with figuring out how to use the pot command with
> > > > the rev d stamp? I am trying to basically use it to speed up and slow
> > > > down a couple of flashing leds. The manuals demo program doesnt seem
> > > > to work for me and I could really use a simple schematic and program
> > > > to show me how the command works. Thanks very much.
> > > >
> > > > My email is bodine08@y...
> > > >
> > > > To UNSUBSCRIBE, just send mail to:
> > > > basicstamps-unsubscribe@yahoogroups.com
> > > > from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
> > > >
> > > >
> > > > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> > >
> > > To UNSUBSCRIBE, just send mail to:
> > > basicstamps-unsubscribe@yahoogroups.com
> > > from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
> > >
> > >
> > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Wow!!!!!!!!!!! Can anybody get any help on this board or is it just
here to verbally abuse other members who are trying to help?? You know,
I looked back over what I said, and could not find any untruthful
statements. I asked a question and then made a comment. I think those
who can't add a POSITIVE note to what is said should keep their comments
to themselves!!!!!!!!!!!!
Leroy
Dale Fleischmann wrote:
>
> Sorry Leroy;
>
> I have been reading this forum for quite awhile now. It seems that you
almost always come back with a question that
> either tells us that you do not know what you are talking about (this is one
example), or you do not have enough
> information to help solve the problem. But I do have to give you credit for
some of your answers or solutions for certain
> problems. You should look at the manuals once and awhile they have most of
the answers to most of the problems.
>
> I will not bring this up again in the near future.
>
> Have Fun !!
> Dale Fleischmann
>
> Leroy Hall wrote:
>
> > So are you going to help the guy with his problem or just flame me
> > because I didn't connect 'REV D with stamp 1"? I mean really anybody
> > should have picked that up right away !!!
> >
> > [noparse]:)[/noparse])))))))))))))))
> >
> > Leroy (alias Larry)
> >
> > Dale Fleischmann wrote:
> > >
> > > Hello Larry;
> > >
> > > Read the subject line it tells you the type of stamp being used, it is
a rev.d which is a plastic version of the
> > > BS1.
> > >
> > > Have Fun !!
> > > Dale Fleischmann
> > >
> > > Leroy Hall wrote:
> > >
> > > > Are you using a BS1 or a BS2? The 'pot' command was written for the
> > > > BS1. If you have a BS2, consider the RCtime command.
> > > >
> > > > HTH,
> > > >
> > > > Leroy
> > > > N8VRC
> > > >
> > > > bodine08 wrote:
> > > > >
> > > > > Hi all,
> > > > >
> > > > > Can anyone help me with figuring out how to use the pot command with
> > > > > the rev d stamp? I am trying to basically use it to speed up and slow
> > > > > down a couple of flashing leds. The manuals demo program doesnt seem
> > > > > to work for me and I could really use a simple schematic and program
> > > > > to show me how the command works. Thanks very much.
> > > > >
> > > > > My email is bodine08@y...
> > > > >
> > > > > To UNSUBSCRIBE, just send mail to:
> > > > > basicstamps-unsubscribe@yahoogroups.com
> > > > > from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
> > > > >
> > > > >
> > > > > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> > > >
> > > > To UNSUBSCRIBE, just send mail to:
> > > > basicstamps-unsubscribe@yahoogroups.com
> > > > from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
> > > >
> > > >
> > > > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> > >
> > > To UNSUBSCRIBE, just send mail to:
> > > basicstamps-unsubscribe@yahoogroups.com
> > > from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
> > >
> > >
> > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
This is what my BASIC Stamp Manual 1.8 says about the pot command.
POT pin, scale, variable
Read a 5-50k potentiometer, thermistor, photocell, or other variable
resistance. The pin specified by POT
must be connected to one side of a resister, whose other side is connected
through a capacitor to ground. A
resistance measurement is taken by timing how long it takes to discharge the
capacitor through the resister. If
the pin is an input when POT executes, it will be change to output.
Pin is a variable/constant (0-7) that specifies the I/O pin to use.
Scale is a varible/constant (0-255) used to scale the instruction's internal
16-bit result. The 16-bit reading is
multiplied by (scale/256), so a scale value of 128 would reduce the range by
approximately 50%, a scale of 64
would reduce to 25%, and so on. The Alt-P option (explained below) provides a
means to find the best scale value
for a particular resistor.
Variable is used to store the final result of the reading. Internally, the POT
instruction calculates a 16-bit
value, which is scaled down to an 8-bit value. The amount by which the internal
value must be scaled varies with
the size of the resistor being used.
Finding the best POT scale value:
To find the best scale value, connect thermistor to be used with the POT
instruction to the Stamp, and connect the
stamp to the PC. (from I/O pin to resistor, then from resistor to capacitor
(example circuit uses a 0.1uF
capacitor)
Press Alt-P while running the Stamp's editor software. A special calibration
window appears, allowing you to find
the best value.
The window asks for the number of the I/O pin to which the resistor is
connected. Select the appropriate pin
(0-7).
The editor downloads a short program already stored in the Stamp (this
overwrites any program already stored in
the Stamp).
Another window appears, showing two numbers: scale and value. Adjust the
resistor until the smallest possible
number is shown for scale (we're assuming you can easily adjust the resistor, as
with a potentiometer).
Once you have found the smallest number for scale, you're done. This number
should be used for the scale in the
POT instruction.
Optionally, you can verify the scale number found above by pressing the
spacebar. This locks the scale and causes
the Stamp to read the resistor continuously. The window displays the value. If
the scale is good, you should be
able to adjust the resistor, achieving a 0-255 reading for the value (or as
close as possible). To change the
scale value repeat this step, just press the spacebar. Continue this process
until you find the best scale.
Sample Program:
abc:
POT 0, 100, b2 'Read potentiometer on pin 0.
serout 1, N300, (b2) 'Send potentiometer reading over
serial output.
goto abc
For the Stamp manual 2.0b and 2.0c here is some additional information not found
in Version 1.8.
Explanation
POT reads a variable resistor and returns a value (0-255) representing the
amount of time it took to discharge the
capacitor through the resistance. Pin must be connected to one side of the
variable resistance, whose other side
is connected through a capacitor to ground.
POT works by first setting the specified I/O pin to an output and setting its
state high. This step places +5
volts on one side of the capacitor and ground on the other side, which charges
the capacitor. POT waits for 10ms
then sets the I/O pin to an input mode and starts its timer. Initially the I/O
pin will see a high (1) that will
eventually drop to a low (0) when the capacitor discharges past the 1.4 volt
threshold. The timer stops once the
low is seen. The value of the variable resistor affects the time it takes to
discharge the capacitor from 5 volts
to approximately 1.4 volts.
Everything else, except the Demo Program is the same.
Demo Program (POT.bas)
'This program demonstrates the PAUSE command's time delays. Once a second, the
'program will put the message, "paused" on the screen.
'{$STAMP BS1} 'STAMP directive (specifies
a BS1)
Loop:
POT 0, 100, B2 'Read potentiometer on
pin 0
SEROUT 1, N300, (B2) 'Send potentiometer reading
over serial output.
GOTO Loop
I am not sure if the POT instruction is what you are looking for to solve your
problem, but try this first add the
LED between the resistor and the capacitor and see if this solves your problem.
Have Fun !!
Dale Fleischmann
bodine08 wrote:
> Hi all,
>
> Can anyone help me with figuring out how to use the pot command with
> the rev d stamp? I am trying to basically use it to speed up and slow
> down a couple of flashing leds. The manuals demo program doesnt seem
> to work for me and I could really use a simple schematic and program
> to show me how the command works. Thanks very much.
>
> My email is bodine08@y...
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
[noparse][[/noparse]Non-text portions of this message have been removed]