Input pins usage!
Archiver
Posts: 46,084
Hey guys,
Is it possible to use the input pins of the basic stamp as voltage
comparators? If so, can u just tell me the command that will enable
me to do that, or is it just set to read the input voltages as a
high or a low?
Thank you
Is it possible to use the input pins of the basic stamp as voltage
comparators? If so, can u just tell me the command that will enable
me to do that, or is it just set to read the input voltages as a
high or a low?
Thank you
Comments
Bad news: The threshold is fixed!
In fact, there is some "sweet spot" that causes the pin to go from 0 to 1. I
have some info on this in my book and I think that maybe Dr. Allen has
something on his site about this as well.
However, that probably isn't what you want. A comparator IC is ideal. On the
other hand, if you are really scrimping and don't need a lot of flexibility,
you might be able to use a voltage divider.
For example, suppose the threshold is 2.2V (I don't remember what it really
is, but it is easy enough to measure with a pot and a really simple
program). You could compare voltages greater than 2.2V with a voltage
divider. That's assuming you are comparing to a fixed reference voltage. If
you want to compare two unknown voltages, you will want a comparator. You
probably want one anyway.
Of course, there are at least two problems with using a divider. First, the
PIC or SX on the Stamp is not made to be a comparator, so that 2.2V figure
(or whatever) is probably not closely controlled. You might have to
calibrate each chip. Also, real comparators usually have hysterisis on the
input to prevent oscillation at the threshold. The SX has this capability,
but I doubt that the SX-based Stamps use it (Jon?). The PIC doesn't have it
if I recall. So voltages right at the threshold may cause the comparator
output to oscillate.
So long story short: No. Go get a LM339 and remember the output is open
collector so you need a pull up resistor on it.
Regards,
Al Williams
AWC
* Easy RS232 Prototyping
http://www.al-williams.com/rs1.htm
Original Message
From: ll_deep_soul_ll [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=nu7IOH8rytUsx_c4302MFhKeycRoURHCNHYqNk85ObRYw2gAeKXWI2zOEMRO4lSZ0y4ohDMRFDx_voqjBsis78pjK38]ll_deep_soul_ll@y...[/url
Sent: Monday, January 12, 2004 8:54 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Input pins usage!
Hey guys,
Is it possible to use the input pins of the basic stamp as voltage
comparators? If so, can u just tell me the command that will enable
me to do that, or is it just set to read the input voltages as a
high or a low?
Thank you
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.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
voltage applied is below this threshold the pin will read as zero; at or
above this threshold the pin will read as one. This fact is used in
PBASIC functions such as RCTIME which actually monitors a discharging
capacitor.
-- Jon Williams
-- Parallax
Original Message
From: ll_deep_soul_ll [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=gbJzR6tABCcaUrCZ95-xUOL3Tbi7V6n623EbGQkdMYCOhoR9OIxV99d8rc3HTwgkX_oA4NQWeGXbPr9meJM-7Xg]ll_deep_soul_ll@y...[/url
Sent: Monday, January 12, 2004 8:54 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Input pins usage!
Hey guys,
Is it possible to use the input pins of the basic stamp as voltage
comparators? If so, can u just tell me the command that will enable
me to do that, or is it just set to read the input voltages as a
high or a low?
Thank you
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.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
in the Stamp. For digital circuit designs we usually try to pass through
that inherent threshold point as quickly as possible, to minimize jitter and
such. Of course, for a simple comparator demonstration it would work, but I
wouldn't want to count on its repeatability in the long run. Perhaps I'm a
bit gun-shy of this no-mans-land?
Mike Sokol
mike@f...
www.fitsandstarts.com
" One should not increase, beyond what is necessary,
the number of entities required to explain anything"...
-William of Occam-
Original Message
From: "Jon Williams" <jwilliams@p...>
To: <basicstamps@yahoogroups.com>
Sent: Monday, January 12, 2004 11:14 AM
Subject: RE: [noparse][[/noparse]basicstamps] Input pins usage!
> The Stamp pins have an input threshold of about 1.4 volts. If the
> voltage applied is below this threshold the pin will read as zero; at or
> above this threshold the pin will read as one. This fact is used in
> PBASIC functions such as RCTIME which actually monitors a discharging
> capacitor.
>
> -- Jon Williams
> -- Parallax
>
>
>
Original Message
> From: ll_deep_soul_ll [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=hvgwkpyWD9HhAtNAt8lJDRFHrv-SSsfOD_eKeVk6sHqR1mOStFuDfkqJXs1WYwxrQnP40WsGa5V6XjY2TbO8sRRjUw]ll_deep_soul_ll@y...[/url
> Sent: Monday, January 12, 2004 8:54 AM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Input pins usage!
>
>
> Hey guys,
> Is it possible to use the input pins of the basic stamp as voltage
> comparators? If so, can u just tell me the command that will enable
> me to do that, or is it just set to read the input voltages as a
> high or a low?
>
> Thank you
>
>
> 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.
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
> To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>
>
>
> This message has been scanned by WebShield. Please report SPAM to
> abuse@p....
>
>
> 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.
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
> To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>
>
>
threshold posted at this URL:
<http://www.emesys.com/BS2rct.htm#drift:>
-- Tracy Allen
http://www.emesystems.com
>I'm curious if this threshold voltage varies a lot with temperature changes
>in the Stamp. For digital circuit designs we usually try to pass through
>that inherent threshold point as quickly as possible, to minimize jitter and
>such. Of course, for a simple comparator demonstration it would work, but I
>wouldn't want to count on its repeatability in the long run. Perhaps I'm a
>bit gun-shy of this no-mans-land?
>
>Mike Sokol
>mike@f...
>www.fitsandstarts.com
>
>" One should not increase, beyond what is necessary,
>the number of entities required to explain anything"...
>-William of Occam-
>
>
>
Original Message
>From: "Jon Williams" <jwilliams@p...>
>To: <basicstamps@yahoogroups.com>
>Sent: Monday, January 12, 2004 11:14 AM
>Subject: RE: [noparse][[/noparse]basicstamps] Input pins usage!
>
>
>> The Stamp pins have an input threshold of about 1.4 volts. If the
>> voltage applied is below this threshold the pin will read as zero; at or
>> above this threshold the pin will read as one. This fact is used in
>> PBASIC functions such as RCTIME which actually monitors a discharging
>> capacitor.
>>
>> -- Jon Williams
>> -- Parallax
>>
>>
>>
Original Message
>> From: ll_deep_soul_ll [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=pznDL5cNMRrhzswmEJyMsWXCK-M6nNjn94XGHktz-xmxFa8ikpMl_VRMYzIeUUVUVOeu1E3PpeOOGaKe31M_25RRhA]ll_deep_soul_ll@y...[/url
>> Sent: Monday, January 12, 2004 8:54 AM
>> To: basicstamps@yahoogroups.com
>> Subject: [noparse][[/noparse]basicstamps] Input pins usage!
>>
>>
>> Hey guys,
>> Is it possible to use the input pins of the basic stamp as voltage
>> comparators? If so, can u just tell me the command that will enable
>> me to do that, or is it just set to read the input voltages as a
>> high or a low?
>>
>> Thank you
>>
>>
>> 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.
>>
>>
>> Yahoo! Groups Links
>>
>> To visit your group on the web, go to:
>> http://groups.yahoo.com/group/basicstamps/
>>
>> To unsubscribe from this group, send an email to:
>> basicstamps-unsubscribe@yahoogroups.com
>>
>> Your use of Yahoo! Groups is subject to:
>> http://docs.yahoo.com/info/terms/
>>
>>
>>
>>
>> This message has been scanned by WebShield. Please report SPAM to
>> abuse@p....
>>
>>
>> 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.
>>
>>
>> Yahoo! Groups Links
>>
>> To visit your group on the web, go to:
>> http://groups.yahoo.com/group/basicstamps/
>>
>> To unsubscribe from this group, send an email to:
>> basicstamps-unsubscribe@yahoogroups.com
>>
>> 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.
>
>
>Yahoo! Groups Links
>
>To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
>To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
>Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/