Searching \ for '[SX] sx used as a comparator?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/ubicom/devices.htm?key=sx
Search entire site for: 'sx used as a comparator?'.

Exact match. Not showing close matches.
PICList Thread
'[SX] sx used as a comparator?'
2007\02\14@131813 by infinkcn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, infinkc wrote:

can the sx be used as a comparator(LM339)? any code examples? i have an input that is around 2.5v and want that to compare with +5v and output a low signal.

TIA!

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=172239
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\02\14@132539 by Chris Savagen/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Chris Savage wrote:

The SX48 has a built-in comparator which could be used for this function.  Unlike the LM339 it only has the one comparator though.  You can read about this in the datasheet.  I hope this helps.  Take care.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=172239#m172241
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\02\14@135706 by g_daubachn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote:

To compare an input that is around 2.5V, you would feed this signal into one of the comparator inputs with the other comparator input fed from a reference voltage. If 2.5V is the "critical" voltage, the reference voltage would also need to be 2.5V. If your 5V Vdd supply voltage is stable enough, a voltage-divider network made of two resistors of equal values (say 10 kOhm each) would be fine to generate the reference voltage. For increased precision, you may use a 2.5V Z-Diode-resistor network between Vdd and Vss to generate the reference voltage.

The RB1 and RB2 port pins can be configured as comparator input pins, and the RB0 port pin can optionally be configured as the comparator putput pin (see the SX data sheets for more details).

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=172239#m172247
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\02\14@155026 by beann/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote:

If you are running the SX from 5 volts, then you can trigger an input at 2.5V by setting it to CMOS input levels.

Bean.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=172239#m172271
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\02\14@193532 by Peter Van der Zeen/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Peter Van der Zee wrote:

Hi All;
And of course you also could configue an R/C digital to analog onverter on the SX, and let that be one of the comarator inputs. Then with very simple software you can chose the trigger level anywhere from 0 to 5 volts.

In fact, if you wanted to get cute, you could even use the one comparator input AS the DAC. Done this a number of times.

Cheers,
Peter (pjv)
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=172239#m172314
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\02\15@092342 by infinkcn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, infinkc wrote:

[Quoting: "Bean (Hitt Consulting)"]
If you are running the SX from 5 volts, then you can trigger an input at 2.5V by setting it to CMOS input levels.

Bean.

is there an example how to do this? would it be a problem if the signal rests at +5, the goes to 2.5 when active?

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=172239#m172424
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\02\15@095706 by beann/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote:

If you are using SX/B just do
MyPin PIN RB.0 INPUT CMOS
This will set the threshold voltage to 2.5 (if running at 5V), so if the voltage goes from 5 to 2.5 you might or might-not get a change in the input.

It would be better to run the voltage into a voltage divider (two resistors) to get the levels down.

Bean.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=172239#m172433
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...