MAX 1270 A to D chip
Archiver
Posts: 46,084
Hi All,
I recently got a Maxim MAX1270 A to D chip and have interfaced it
with my BS2SX. However I'm having difficulty interpreting the
results. I'm used to the MAX186 which has limited input range of
4.096V and the 12 bit number returned is always the exact voltage at
the input channel.
The MAX1270 has selectable input ranges which can go as high as +10V.
It's still however only 12 bits. For example when selecting the 0 to
+10V range, 10V comes in as 111111111111. Still 4096 in base 10.
Perhaps I'm not understanding the data encoding that's being used. I
was under the impression that this device would automatically handle
this. How do I get the Stamp to display the proper voltage on the
DEBUG terminal when using these extended ranges? Thanks for any help.
-Dave
I recently got a Maxim MAX1270 A to D chip and have interfaced it
with my BS2SX. However I'm having difficulty interpreting the
results. I'm used to the MAX186 which has limited input range of
4.096V and the 12 bit number returned is always the exact voltage at
the input channel.
The MAX1270 has selectable input ranges which can go as high as +10V.
It's still however only 12 bits. For example when selecting the 0 to
+10V range, 10V comes in as 111111111111. Still 4096 in base 10.
Perhaps I'm not understanding the data encoding that's being used. I
was under the impression that this device would automatically handle
this. How do I get the Stamp to display the proper voltage on the
DEBUG terminal when using these extended ranges? Thanks for any help.
-Dave
Comments
I *think* that is how it should work. The extended range allows higher
inputs, but it doesn't change the bits, so it will always be a number
between 0-4096.
I don't have a data sheet for that chip, but does it allow a Vref greater
than 5V? If not, you will need to do math to figure the higher voltage.
Jonathan
www.madlabs.info
Original Message
From: "nuclearspin2000" <nuclearspin2000@y...>
To: <basicstamps@yahoogroups.com>
Sent: Saturday, January 03, 2004 10:12 PM
Subject: [noparse][[/noparse]basicstamps] MAX 1270 A to D chip
> Hi All,
>
> I recently got a Maxim MAX1270 A to D chip and have interfaced it
> with my BS2SX. However I'm having difficulty interpreting the
> results. I'm used to the MAX186 which has limited input range of
> 4.096V and the 12 bit number returned is always the exact voltage at
> the input channel.
>
> The MAX1270 has selectable input ranges which can go as high as +10V.
> It's still however only 12 bits. For example when selecting the 0 to
> +10V range, 10V comes in as 111111111111. Still 4096 in base 10.
>
> Perhaps I'm not understanding the data encoding that's being used. I
> was under the impression that this device would automatically handle
> this. How do I get the Stamp to display the proper voltage on the
> DEBUG terminal when using these extended ranges? Thanks for any help.
>
> -Dave
>
>
> 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/
>
>
>
>
you convert from the raw reading to millivolts. We use the MAX1270 in
the Stamp PLC -- the docs and code examples for that device will show
how to use the MAX1270 in different ranges. Here's a link:
<http://www.parallax.com/detail.asp?product_id=30064>
-- Jon Williams
-- Parallax
Original Message
From: nuclearspin2000 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=2_KreELmdtSRgKRuOQRw8__OgV_EN6ankoAR38qG9RM8XJgczBpAPmH4IIEtAksG1_vuZVMharSwX2gRWyxLy680mNY]nuclearspin2000@y...[/url
Sent: Sunday, January 04, 2004 12:13 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] MAX 1270 A to D chip
Hi All,
I recently got a Maxim MAX1270 A to D chip and have interfaced it
with my BS2SX. However I'm having difficulty interpreting the
results. I'm used to the MAX186 which has limited input range of
4.096V and the 12 bit number returned is always the exact voltage at
the input channel.
The MAX1270 has selectable input ranges which can go as high as +10V.
It's still however only 12 bits. For example when selecting the 0 to
+10V range, 10V comes in as 111111111111. Still 4096 in base 10.
Perhaps I'm not understanding the data encoding that's being used. I
was under the impression that this device would automatically handle
this. How do I get the Stamp to display the proper voltage on the
DEBUG terminal when using these extended ranges? Thanks for any help.
-Dave
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....
The math is easy enough but unfortunately it requires floating point
math as far as I can tell which Stamps don't do. I'm still scouring
through the Stamp PLC manual that Jon suggested trying to find out
exactly what parallax is doing.
-Dave
--- In basicstamps@yahoogroups.com, "Jonathan Peakall"
<jpeakall@p...> wrote:
> Dave,
>
> I *think* that is how it should work. The extended range allows
higher
> inputs, but it doesn't change the bits, so it will always be a
number
> between 0-4096.
>
> I don't have a data sheet for that chip, but does it allow a Vref
greater
> than 5V? If not, you will need to do math to figure the higher
voltage.
>
> Jonathan
>
> www.madlabs.info
>
>
>
>
Original Message
> From: "nuclearspin2000" <nuclearspin2000@y...>
> To: <basicstamps@yahoogroups.com>
> Sent: Saturday, January 03, 2004 10:12 PM
> Subject: [noparse][[/noparse]basicstamps] MAX 1270 A to D chip
>
>
> > Hi All,
> >
> > I recently got a Maxim MAX1270 A to D chip and have interfaced it
> > with my BS2SX. However I'm having difficulty interpreting the
> > results. I'm used to the MAX186 which has limited input range of
> > 4.096V and the 12 bit number returned is always the exact voltage
at
> > the input channel.
> >
> > The MAX1270 has selectable input ranges which can go as high as
+10V.
> > It's still however only 12 bits. For example when selecting the 0
to
> > +10V range, 10V comes in as 111111111111. Still 4096 in base 10.
> >
> > Perhaps I'm not understanding the data encoding that's being
used. I
> > was under the impression that this device would automatically
handle
> > this. How do I get the Stamp to display the proper voltage on the
> > DEBUG terminal when using these extended ranges? Thanks for any
help.
> >
> > -Dave
> >
> >
> > 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/
> >
> >
> >
> >
I bet it can be done with integer math. If anyone can do it on this list, it
is Tracy Allen. He also has a great page about integer math on his site:
http://www.emesystems.com/BS2index.htm
Scroll down a little, and you will see a bunch of Stamp math stuff.
Hope this helps!
Jonathan
www.madlabs.info
Original Message
From: "nuclearspin2000" <nuclearspin2000@y...>
To: <basicstamps@yahoogroups.com>
Sent: Sunday, January 04, 2004 7:17 PM
Subject: [noparse][[/noparse]basicstamps] Re: MAX 1270 A to D chip
> Hi Jonathan,
>
> The math is easy enough but unfortunately it requires floating point
> math as far as I can tell which Stamps don't do. I'm still scouring
> through the Stamp PLC manual that Jon suggested trying to find out
> exactly what parallax is doing.
>
> -Dave
>
> --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
> <jpeakall@p...> wrote:
> > Dave,
> >
> > I *think* that is how it should work. The extended range allows
> higher
> > inputs, but it doesn't change the bits, so it will always be a
> number
> > between 0-4096.
> >
> > I don't have a data sheet for that chip, but does it allow a Vref
> greater
> > than 5V? If not, you will need to do math to figure the higher
> voltage.
> >
> > Jonathan
> >
> > www.madlabs.info
> >
> >
> >
> >
Original Message
> > From: "nuclearspin2000" <nuclearspin2000@y...>
> > To: <basicstamps@yahoogroups.com>
> > Sent: Saturday, January 03, 2004 10:12 PM
> > Subject: [noparse][[/noparse]basicstamps] MAX 1270 A to D chip
> >
> >
> > > Hi All,
> > >
> > > I recently got a Maxim MAX1270 A to D chip and have interfaced it
> > > with my BS2SX. However I'm having difficulty interpreting the
> > > results. I'm used to the MAX186 which has limited input range of
> > > 4.096V and the 12 bit number returned is always the exact voltage
> at
> > > the input channel.
> > >
> > > The MAX1270 has selectable input ranges which can go as high as
> +10V.
> > > It's still however only 12 bits. For example when selecting the 0
> to
> > > +10V range, 10V comes in as 111111111111. Still 4096 in base 10.
> > >
> > > Perhaps I'm not understanding the data encoding that's being
> used. I
> > > was under the impression that this device would automatically
> handle
> > > this. How do I get the Stamp to display the proper voltage on the
> > > DEBUG terminal when using these extended ranges? Thanks for any
> help.
> > >
> > > -Dave
> > >
> > >
> > > 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/
>
>
>
>
time. The Stamp, in fact, has two operators that allow one to multiply
by a fractional value: the */ operator and the ** operator. Yes, the
results are integers, but that can be overcome as well.
Let me correct my suggestion: Look a the StampPLC "template" code.
Also, the January issue of Nuts & Volts magazine has an article
explaining that code and the Javelin version as well.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: nuclearspin2000 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=w5DnYLhLjb6PvRW9DRFCiUAfhQVa-WMmag6VYK5VKf1fpenPV0Q7WfFhQYY0lVVtLwmWYzKoSVnHYXiSrHJ-]nuclearspin2000@y...[/url
Sent: Sunday, January 04, 2004 9:18 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Re: MAX 1270 A to D chip
Hi Jonathan,
The math is easy enough but unfortunately it requires floating point
math as far as I can tell which Stamps don't do. I'm still scouring
through the Stamp PLC manual that Jon suggested trying to find out
exactly what parallax is doing.
-Dave
--- In basicstamps@yahoogroups.com, "Jonathan Peakall"
<jpeakall@p...> wrote:
> Dave,
>
> I *think* that is how it should work. The extended range allows
higher
> inputs, but it doesn't change the bits, so it will always be a
number
> between 0-4096.
>
> I don't have a data sheet for that chip, but does it allow a Vref
greater
> than 5V? If not, you will need to do math to figure the higher
voltage.
>
> Jonathan
>
> www.madlabs.info
>
>
>
>
Original Message
> From: "nuclearspin2000" <nuclearspin2000@y...>
> To: <basicstamps@yahoogroups.com>
> Sent: Saturday, January 03, 2004 10:12 PM
> Subject: [noparse][[/noparse]basicstamps] MAX 1270 A to D chip
>
>
> > Hi All,
> >
> > I recently got a Maxim MAX1270 A to D chip and have interfaced it
> > with my BS2SX. However I'm having difficulty interpreting the
> > results. I'm used to the MAX186 which has limited input range of
> > 4.096V and the 12 bit number returned is always the exact voltage
at
> > the input channel.
> >
> > The MAX1270 has selectable input ranges which can go as high as
+10V.
> > It's still however only 12 bits. For example when selecting the 0
to
> > +10V range, 10V comes in as 111111111111. Still 4096 in base 10.
> >
> > Perhaps I'm not understanding the data encoding that's being
used. I
> > was under the impression that this device would automatically
handle
> > this. How do I get the Stamp to display the proper voltage on the
> > DEBUG terminal when using these extended ranges? Thanks for any
help.
> >
> > -Dave
> >
> >
> > 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/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
being used in some of the example code. As for the Nuts & Volts
article, good thing I subscribe. I'll check that out as well.
-Dave
--- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
wrote:
> Engineers have done fractional math without FP routines for a very
long
> time. The Stamp, in fact, has two operators that allow one to
multiply
> by a fractional value: the */ operator and the ** operator. Yes,
the
> results are integers, but that can be overcome as well.
>
> Let me correct my suggestion: Look a the StampPLC "template" code.
> Also, the January issue of Nuts & Volts magazine has an article
> explaining that code and the Javelin version as well.
>
> -- Jon Williams
> -- Applications Engineer, Parallax
> -- Dallas Office
>
>
>
Original Message
> From: nuclearspin2000 [noparse][[/noparse]mailto:nuclearspin2000@y...]
> Sent: Sunday, January 04, 2004 9:18 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Re: MAX 1270 A to D chip
>
>
> Hi Jonathan,
>
> The math is easy enough but unfortunately it requires floating
point
> math as far as I can tell which Stamps don't do. I'm still scouring
> through the Stamp PLC manual that Jon suggested trying to find out
> exactly what parallax is doing.
>
> -Dave
>
> --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
> <jpeakall@p...> wrote:
> > Dave,
> >
> > I *think* that is how it should work. The extended range allows
> higher
> > inputs, but it doesn't change the bits, so it will always be a
> number
> > between 0-4096.
> >
> > I don't have a data sheet for that chip, but does it allow a Vref
> greater
> > than 5V? If not, you will need to do math to figure the higher
> voltage.
> >
> > Jonathan
> >
> > www.madlabs.info
> >
> >
> >
> >
Original Message
> > From: "nuclearspin2000" <nuclearspin2000@y...>
> > To: <basicstamps@yahoogroups.com>
> > Sent: Saturday, January 03, 2004 10:12 PM
> > Subject: [noparse][[/noparse]basicstamps] MAX 1270 A to D chip
> >
> >
> > > Hi All,
> > >
> > > I recently got a Maxim MAX1270 A to D chip and have interfaced
it
> > > with my BS2SX. However I'm having difficulty interpreting the
> > > results. I'm used to the MAX186 which has limited input range
of
> > > 4.096V and the 12 bit number returned is always the exact
voltage
> at
> > > the input channel.
> > >
> > > The MAX1270 has selectable input ranges which can go as high as
> +10V.
> > > It's still however only 12 bits. For example when selecting the
0
> to
> > > +10V range, 10V comes in as 111111111111. Still 4096 in base 10.
> > >
> > > Perhaps I'm not understanding the data encoding that's being
> used. I
> > > was under the impression that this device would automatically
> handle
> > > this. How do I get the Stamp to display the proper voltage on
the
> > > DEBUG terminal when using these extended ranges? Thanks for any
> help.
> > >
> > > -Dave
> > >
> > >
> > > 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/
>
>
>
>
> This message has been scanned by WebShield. Please report SPAM to
> abuse@p...
thoroughly impressed.
value = value */ 625
This one extra line of code was all it took and the results are very
accurate even for the approximation. Thanks all, and special thanks
to Tracy Allen's website explaining the use of these operators in
detail. Best regards everyone!!
-Dave
--- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
wrote:
> Engineers have done fractional math without FP routines for a very
long
> time. The Stamp, in fact, has two operators that allow one to
multiply
> by a fractional value: the */ operator and the ** operator. Yes,
the
> results are integers, but that can be overcome as well.
>
> Let me correct my suggestion: Look a the StampPLC "template" code.
> Also, the January issue of Nuts & Volts magazine has an article
> explaining that code and the Javelin version as well.
>
> -- Jon Williams
> -- Applications Engineer, Parallax
> -- Dallas Office
>
>
>
Original Message
> From: nuclearspin2000 [noparse][[/noparse]mailto:nuclearspin2000@y...]
> Sent: Sunday, January 04, 2004 9:18 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Re: MAX 1270 A to D chip
>
>
> Hi Jonathan,
>
> The math is easy enough but unfortunately it requires floating
point
> math as far as I can tell which Stamps don't do. I'm still scouring
> through the Stamp PLC manual that Jon suggested trying to find out
> exactly what parallax is doing.
>
> -Dave
>
> --- In basicstamps@yahoogroups.com, "Jonathan Peakall"
> <jpeakall@p...> wrote:
> > Dave,
> >
> > I *think* that is how it should work. The extended range allows
> higher
> > inputs, but it doesn't change the bits, so it will always be a
> number
> > between 0-4096.
> >
> > I don't have a data sheet for that chip, but does it allow a Vref
> greater
> > than 5V? If not, you will need to do math to figure the higher
> voltage.
> >
> > Jonathan
> >
> > www.madlabs.info
> >
> >
> >
> >
Original Message
> > From: "nuclearspin2000" <nuclearspin2000@y...>
> > To: <basicstamps@yahoogroups.com>
> > Sent: Saturday, January 03, 2004 10:12 PM
> > Subject: [noparse][[/noparse]basicstamps] MAX 1270 A to D chip
> >
> >
> > > Hi All,
> > >
> > > I recently got a Maxim MAX1270 A to D chip and have interfaced
it
> > > with my BS2SX. However I'm having difficulty interpreting the
> > > results. I'm used to the MAX186 which has limited input range
of
> > > 4.096V and the 12 bit number returned is always the exact
voltage
> at
> > > the input channel.
> > >
> > > The MAX1270 has selectable input ranges which can go as high as
> +10V.
> > > It's still however only 12 bits. For example when selecting the
0
> to
> > > +10V range, 10V comes in as 111111111111. Still 4096 in base 10.
> > >
> > > Perhaps I'm not understanding the data encoding that's being
> used. I
> > > was under the impression that this device would automatically
> handle
> > > this. How do I get the Stamp to display the proper voltage on
the
> > > DEBUG terminal when using these extended ranges? Thanks for any
> help.
> > >
> > > -Dave
> > >
> > >
> > > 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/
>
>
>
>
> This message has been scanned by WebShield. Please report SPAM to
> abuse@p...
kludge together a decimal representation of your
value.
--- Jon Williams <jwilliams@p...> wrote:
> Engineers have done fractional math without FP
> routines for a very long
> time. The Stamp, in fact, has two operators that
> allow one to multiply
> by a fractional value: the */ operator and the **
> operator. Yes, the
> results are integers, but that can be overcome as
> well.
__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003