A/D source code
Archiver
Posts: 46,084
Ok since my last post I have figured out that my I2cout command is not working.
So I am not setting up the A/D properly. Does anyone know what happens in this
command when the device you are trying to write to has no addresses to access?
The third part of the I2cout command calls for an address but this A/D has no
address. Is this just a zero?
Can anyone see why this wouldn't work? I can get the last 3 digits to change as
I vary the voltage into channel 0 of the a/d. But the A/D doesn't start at zero
it starts at like 192 and goes to 255. 192 being 0 volts applied and 255 being
about 2 volts. I have placed a link to the data sheet for the a/d below. The
circuit is set up like the one on the first page of the data sheet.
http://dbserv.maxim-ic.com/quick_view2.cfm?qv_pk=1890
'
[noparse][[/noparse] Title ]
' {$STAMP BS2p}
'
[noparse][[/noparse] I/O Definitions ]
I2Cpin CON 0 ' SDA on 0; SCL on 1
'
[noparse][[/noparse] Constants ]
wrad128 CON %01010000 ' write to A/D
rdad128 CON %01010001 ' Read from A/D
'
[noparse][[/noparse] Variables ]
result VAR word
hbyte var result.highbyte
lbyte var result.lowbyte
'
[noparse][[/noparse]Initialize]
\
--
result = 0
i2cout i2cpin,wrad128,0,[noparse][[/noparse]%10001000]
pause 100
main:
i2cin i2cpin,rdad128,0,[noparse][[/noparse]hbyte,lbyte]
pause 100
debug home,dec hbyte," ",dec lbyte,cr
goto main
[noparse][[/noparse]Non-text portions of this message have been removed]
So I am not setting up the A/D properly. Does anyone know what happens in this
command when the device you are trying to write to has no addresses to access?
The third part of the I2cout command calls for an address but this A/D has no
address. Is this just a zero?
Can anyone see why this wouldn't work? I can get the last 3 digits to change as
I vary the voltage into channel 0 of the a/d. But the A/D doesn't start at zero
it starts at like 192 and goes to 255. 192 being 0 volts applied and 255 being
about 2 volts. I have placed a link to the data sheet for the a/d below. The
circuit is set up like the one on the first page of the data sheet.
http://dbserv.maxim-ic.com/quick_view2.cfm?qv_pk=1890
'
[noparse][[/noparse] Title ]
' {$STAMP BS2p}
'
[noparse][[/noparse] I/O Definitions ]
I2Cpin CON 0 ' SDA on 0; SCL on 1
'
[noparse][[/noparse] Constants ]
wrad128 CON %01010000 ' write to A/D
rdad128 CON %01010001 ' Read from A/D
'
[noparse][[/noparse] Variables ]
result VAR word
hbyte var result.highbyte
lbyte var result.lowbyte
'
[noparse][[/noparse]Initialize]
\
--
result = 0
i2cout i2cpin,wrad128,0,[noparse][[/noparse]%10001000]
pause 100
main:
i2cin i2cpin,rdad128,0,[noparse][[/noparse]hbyte,lbyte]
pause 100
debug home,dec hbyte," ",dec lbyte,cr
goto main
[noparse][[/noparse]Non-text portions of this message have been removed]
Comments
If there is no address for the device, just send the first data byte as the
address.
That should work.
Regards peter
Oorspronkelijk bericht
Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=xIthFjXf0oiMuhldExUjQTjs6ZtIUw7UlFxW47Y_FfVL3Lp-7Bz9wJBuRXGjuoZqZdDKmKavRVntAPHLOeV9e4xAxGc]ricky@m...[/url
Verzonden: donderdag 14 februari 2002 10:59
Aan: basicstamps@yahoogroups.com
Onderwerp: [noparse][[/noparse]basicstamps] A/D source code
Ok since my last post I have figured out that my I2cout command is not
working. So I am not setting up the A/D properly. Does anyone know what
happens in this command when the device you are trying to write to has no
addresses to access? The third part of the I2cout command calls for an
address but this A/D has no address. Is this just a zero?
Can anyone see why this wouldn't work? I can get the last 3 digits to
change as I vary the voltage into channel 0 of the a/d. But the A/D doesn't
start at zero it starts at like 192 and goes to 255. 192 being 0 volts
applied and 255 being about 2 volts. I have placed a link to the data sheet
for the a/d below. The circuit is set up like the one on the first page of
the data sheet.
http://dbserv.maxim-ic.com/quick_view2.cfm?qv_pk=1890
'
[noparse][[/noparse]
Title ]
' {$STAMP BS2p}
'
[noparse][[/noparse] I/O
Definitions ]
I2Cpin CON 0 ' SDA on 0; SCL on 1
'
[noparse][[/noparse]
Constants ]
wrad128 CON %01010000 ' write to A/D
rdad128 CON %01010001 ' Read from A/D
'
[noparse][[/noparse]
Variables ]
result VAR word
hbyte var result.highbyte
lbyte var result.lowbyte
'
[noparse][[/noparse]Initialize]
result = 0
i2cout i2cpin,wrad128,0,[noparse][[/noparse]%10001000]
pause 100
main:
i2cin i2cpin,rdad128,0,[noparse][[/noparse]hbyte,lbyte]
pause 100
debug home,dec hbyte," ",dec lbyte,cr
goto main
[noparse][[/noparse]Non-text portions of this message have been removed]
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/
download because it sees an error in the code. Any other Ideas? If you put
a zero there it will download the program but it is still not functioning
like it should. Its like it is not getting the data or in this case the
control byte.
Original Message
From: "peter verkaik" <peterverkaik@b...>
To: <basicstamps@yahoogroups.com>
Sent: Thursday, February 14, 2002 11:07 AM
Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
> Hi Ricky,
>
> If there is no address for the device, just send the first data byte as
the
> address.
> That should work.
>
> Regards peter
>
>
>
>
Oorspronkelijk bericht
> Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=OuRBNXZ0Zj6tKbVVD232jIMfZyRlzhlihb-isH0ed2R4VcgRtSa85rWVeyQAjs_rdOYnLmgWMXyB2RUvtHDU16JRVbg]ricky@m...[/url
> Verzonden: donderdag 14 februari 2002 10:59
> Aan: basicstamps@yahoogroups.com
> Onderwerp: [noparse][[/noparse]basicstamps] A/D source code
>
> Ok since my last post I have figured out that my I2cout command is not
> working. So I am not setting up the A/D properly. Does anyone know what
> happens in this command when the device you are trying to write to has no
> addresses to access? The third part of the I2cout command calls for an
> address but this A/D has no address. Is this just a zero?
>
>
>
>
>
> Can anyone see why this wouldn't work? I can get the last 3 digits to
> change as I vary the voltage into channel 0 of the a/d. But the A/D
doesn't
> start at zero it starts at like 192 and goes to 255. 192 being 0 volts
> applied and 255 being about 2 volts. I have placed a link to the data
sheet
> for the a/d below. The circuit is set up like the one on the first page
of
> the data sheet.
>
> http://dbserv.maxim-ic.com/quick_view2.cfm?qv_pk=1890
>
> '
[noparse][[/noparse]
> Title ]
>
> ' {$STAMP BS2p}
>
> '
[noparse][[/noparse] I/O
> Definitions ]
> I2Cpin CON 0 ' SDA on 0; SCL on 1
> '
[noparse][[/noparse]
> Constants ]
>
> wrad128 CON %01010000 ' write to A/D
>
> rdad128 CON %01010001 ' Read from A/D
>
> '
[noparse][[/noparse]
> Variables ]
>
> result VAR word
>
> hbyte var result.highbyte
>
> lbyte var result.lowbyte
>
>
'
[noparse][[/noparse]Initialize]
>
>
> result = 0
>
> i2cout i2cpin,wrad128,0,[noparse][[/noparse]%10001000]
>
> pause 100
>
>
>
> main:
>
> i2cin i2cpin,rdad128,0,[noparse][[/noparse]hbyte,lbyte]
>
> pause 100
>
> debug home,dec hbyte," ",dec lbyte,cr
>
> goto main
>
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> 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/
>
>
>
>
Taking a close look at the pdf datasheet:
Controlbyte = %10000000
||||||++-- normal operation
||||++---- 0-5V range max127
|+++
channel 0
+
identifies controlbyte after R/W bit of id
datavalue var word
stamp statement to initialize AD converter
i2cout pin,%01010000,controlbyte 'hardwired address pins all grounded
AD conversion starts, takes 7.7 uS
pause 1 'this could be omitted
'now read the data
i2cin pin,%01010001,[noparse][[/noparse]datavalue_highbyte,datavalue_lowbyte]
'datavalue_highbyte contains b11-b4 in bitpositions 7-0
'datavalue_lowbyte contains b3-b0 in bitpositions 7-4
'so move datavalue 4 bits to the right
daravalue = datavalue >> 4
'now datavalue holds a 12bit value from channel0
This should function.
Regards peter
Oorspronkelijk bericht
Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ZEaBrLb1xvcQFomxtrmfA7tE06okeALcx2LmXs0UHpJvajeMx6mdHQHYhtNJAn9MHjKPnJiQ6fCfSl8bnoj8g18]ricky@m...[/url
Verzonden: donderdag 14 februari 2002 13:25
Aan: basicstamps@yahoogroups.com
Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
Yea, that's what I thought, but it didn't work. The program won't even
download because it sees an error in the code. Any other Ideas? If you put
a zero there it will download the program but it is still not functioning
like it should. Its like it is not getting the data or in this case the
control byte.
Original Message
From: "peter verkaik" <peterverkaik@b...>
To: <basicstamps@yahoogroups.com>
Sent: Thursday, February 14, 2002 11:07 AM
Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
> Hi Ricky,
>
> If there is no address for the device, just send the first data byte as
the
> address.
> That should work.
>
> Regards peter
>
>
>
>
Oorspronkelijk bericht
> Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ZEaBrLb1xvcQFomxtrmfA7tE06okeALcx2LmXs0UHpJvajeMx6mdHQHYhtNJAn9MHjKPnJiQ6fCfSl8bnoj8g18]ricky@m...[/url
> Verzonden: donderdag 14 februari 2002 10:59
> Aan: basicstamps@yahoogroups.com
> Onderwerp: [noparse][[/noparse]basicstamps] A/D source code
>
> Ok since my last post I have figured out that my I2cout command is not
> working. So I am not setting up the A/D properly. Does anyone know what
> happens in this command when the device you are trying to write to has no
> addresses to access? The third part of the I2cout command calls for an
> address but this A/D has no address. Is this just a zero?
>
>
>
>
>
> Can anyone see why this wouldn't work? I can get the last 3 digits to
> change as I vary the voltage into channel 0 of the a/d. But the A/D
doesn't
> start at zero it starts at like 192 and goes to 255. 192 being 0 volts
> applied and 255 being about 2 volts. I have placed a link to the data
sheet
> for the a/d below. The circuit is set up like the one on the first page
of
> the data sheet.
>
> http://dbserv.maxim-ic.com/quick_view2.cfm?qv_pk=1890
>
> '
[noparse][[/noparse]
> Title ]
>
> ' {$STAMP BS2p}
>
> '
[noparse][[/noparse] I/O
> Definitions ]
> I2Cpin CON 0 ' SDA on 0; SCL on 1
> '
[noparse][[/noparse]
> Constants ]
>
> wrad128 CON %01010000 ' write to A/D
>
> rdad128 CON %01010001 ' Read from A/D
>
> '
[noparse][[/noparse]
> Variables ]
>
> result VAR word
>
> hbyte var result.highbyte
>
> lbyte var result.lowbyte
>
>
'
[noparse][[/noparse]Initialize]
>
>
> result = 0
>
> i2cout i2cpin,wrad128,0,[noparse][[/noparse]%10001000]
>
> pause 100
>
>
>
> main:
>
> i2cin i2cpin,rdad128,0,[noparse][[/noparse]hbyte,lbyte]
>
> pause 100
>
> debug home,dec hbyte," ",dec lbyte,cr
>
> goto main
>
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> 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/
The i2cin command should read
I2cin pin%0101001,0,[noparse][[/noparse]datavalue_lowbyte,datavalue_highbyte]
The address 0 is written to the AD converter but not recognized
as a controlbyte since bit7=0 so it will be ignored.
Regards peter
Oorspronkelijk bericht
Van: peter verkaik [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=3Pc0SAluYMLv-W8WWS1-ySr_2WomLnn7oAQGty-r8wgSmlS3GxZ0qcfmlrPAF4Ov2PDukBEeKqqKdhfcmLUTfg]peterverkaik@b...[/url
Verzonden: donderdag 14 februari 2002 14:39
Aan: basicstamps@yahoogroups.com
Onderwerp: RE: [noparse][[/noparse]basicstamps] A/D source code
Hi ricky,
Taking a close look at the pdf datasheet:
Controlbyte = %10000000
||||||++-- normal operation
||||++---- 0-5V range max127
|+++
channel 0
+
identifies controlbyte after R/W bit of id
datavalue var word
stamp statement to initialize AD converter
i2cout pin,%01010000,controlbyte 'hardwired address pins all grounded
AD conversion starts, takes 7.7 uS
pause 1 'this could be omitted
'now read the data
i2cin pin,%01010001,[noparse][[/noparse]datavalue_highbyte,datavalue_lowbyte]
'datavalue_highbyte contains b11-b4 in bitpositions 7-0
'datavalue_lowbyte contains b3-b0 in bitpositions 7-4
'so move datavalue 4 bits to the right
daravalue = datavalue >> 4
'now datavalue holds a 12bit value from channel0
This should function.
Regards peter
Oorspronkelijk bericht
Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=sHkFT4n-H8RGHAMBfQwkwnpIEeAUXNHNtHhIBjHnz7usep6amrBqQg3q-mIxXcAgIljTMxry7Jys56gBuS9ZQWZolyM]ricky@m...[/url
Verzonden: donderdag 14 februari 2002 13:25
Aan: basicstamps@yahoogroups.com
Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
Yea, that's what I thought, but it didn't work. The program won't even
download because it sees an error in the code. Any other Ideas? If you put
a zero there it will download the program but it is still not functioning
like it should. Its like it is not getting the data or in this case the
control byte.
Original Message
From: "peter verkaik" <peterverkaik@b...>
To: <basicstamps@yahoogroups.com>
Sent: Thursday, February 14, 2002 11:07 AM
Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
> Hi Ricky,
>
> If there is no address for the device, just send the first data byte as
the
> address.
> That should work.
>
> Regards peter
>
>
>
>
Oorspronkelijk bericht
> Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=sHkFT4n-H8RGHAMBfQwkwnpIEeAUXNHNtHhIBjHnz7usep6amrBqQg3q-mIxXcAgIljTMxry7Jys56gBuS9ZQWZolyM]ricky@m...[/url
> Verzonden: donderdag 14 februari 2002 10:59
> Aan: basicstamps@yahoogroups.com
> Onderwerp: [noparse][[/noparse]basicstamps] A/D source code
>
> Ok since my last post I have figured out that my I2cout command is not
> working. So I am not setting up the A/D properly. Does anyone know what
> happens in this command when the device you are trying to write to has no
> addresses to access? The third part of the I2cout command calls for an
> address but this A/D has no address. Is this just a zero?
>
>
>
>
>
> Can anyone see why this wouldn't work? I can get the last 3 digits to
> change as I vary the voltage into channel 0 of the a/d. But the A/D
doesn't
> start at zero it starts at like 192 and goes to 255. 192 being 0 volts
> applied and 255 being about 2 volts. I have placed a link to the data
sheet
> for the a/d below. The circuit is set up like the one on the first page
of
> the data sheet.
>
> http://dbserv.maxim-ic.com/quick_view2.cfm?qv_pk=1890
>
> '
[noparse][[/noparse]
> Title ]
>
> ' {$STAMP BS2p}
>
> '
[noparse][[/noparse] I/O
> Definitions ]
> I2Cpin CON 0 ' SDA on 0; SCL on 1
> '
[noparse][[/noparse]
> Constants ]
>
> wrad128 CON %01010000 ' write to A/D
>
> rdad128 CON %01010001 ' Read from A/D
>
> '
[noparse][[/noparse]
> Variables ]
>
> result VAR word
>
> hbyte var result.highbyte
>
> lbyte var result.lowbyte
>
>
'
[noparse][[/noparse]Initialize]
>
>
> result = 0
>
> i2cout i2cpin,wrad128,0,[noparse][[/noparse]%10001000]
>
> pause 100
>
>
>
> main:
>
> i2cin i2cpin,rdad128,0,[noparse][[/noparse]hbyte,lbyte]
>
> pause 100
>
> debug home,dec hbyte," ",dec lbyte,cr
>
> goto main
>
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> 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/
I noticed a missing 0 in the id, so here is the correct line
I2cin pin,%01010001,0,[noparse][[/noparse]datavalue.lowbyte,datavalue.highbyte]
Regards peter
Oorspronkelijk bericht
Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=z_tHyjl6jOzR7DdD9TwEkfzAWszWf0WPXOWStuwePbXhN-YFfTqAE2R_TTjY1KNAS3CCWXTMNOCMIfBET1JnfK1E3GtK]ricky@m...[/url
Verzonden: vrijdag 15 februari 2002 08:42
Aan: basicstamps@yahoogroups.com
Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
Thanks peter I'll try that line. I tried the one you sent yesterday and we
are still missing one of the parameters in the code. It won't even download
the code to the stamp.
Original Message
From: "peter verkaik" <peterverkaik@b...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, February 15, 2002 3:06 AM
Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
> Hi ricki,
>
> The i2cin command should read
> I2cin pin%0101001,0,[noparse][[/noparse]datavalue_lowbyte,datavalue_highbyte]
>
> The address 0 is written to the AD converter but not recognized
> as a controlbyte since bit7=0 so it will be ignored.
>
> Regards peter
>
>
>
>
>
Oorspronkelijk bericht
> Van: peter verkaik [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=jWI5-Cygaw7K_Wpn79Hz1pSUdyB1WExF_Z4sD08q1Y1whwojf7SIkGdXapGqdFq6crPB-eVr7RRPqs_5f0ZuUjG6aw]peterverkaik@b...[/url
> Verzonden: donderdag 14 februari 2002 14:39
> Aan: basicstamps@yahoogroups.com
> Onderwerp: RE: [noparse][[/noparse]basicstamps] A/D source code
>
> Hi ricky,
>
> Taking a close look at the pdf datasheet:
>
> Controlbyte = %10000000
> ||||||++-- normal operation
> ||||++---- 0-5V range max127
> |+++
channel 0
> +
identifies controlbyte after R/W bit of id
>
> datavalue var word
>
> stamp statement to initialize AD converter
> i2cout pin,%01010000,controlbyte 'hardwired address pins all grounded
> AD conversion starts, takes 7.7 uS
> pause 1 'this could be omitted
> 'now read the data
> i2cin pin,%01010001,[noparse][[/noparse]datavalue_highbyte,datavalue_lowbyte]
>
> 'datavalue_highbyte contains b11-b4 in bitpositions 7-0
> 'datavalue_lowbyte contains b3-b0 in bitpositions 7-4
> 'so move datavalue 4 bits to the right
> daravalue = datavalue >> 4
> 'now datavalue holds a 12bit value from channel0
>
> This should function.
>
> Regards peter
>
>
>
>
>
Oorspronkelijk bericht
> Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=z_tHyjl6jOzR7DdD9TwEkfzAWszWf0WPXOWStuwePbXhN-YFfTqAE2R_TTjY1KNAS3CCWXTMNOCMIfBET1JnfK1E3GtK]ricky@m...[/url
> Verzonden: donderdag 14 februari 2002 13:25
> Aan: basicstamps@yahoogroups.com
> Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
>
> Yea, that's what I thought, but it didn't work. The program won't even
> download because it sees an error in the code. Any other Ideas? If you
put
> a zero there it will download the program but it is still not functioning
> like it should. Its like it is not getting the data or in this case the
> control byte.
>
>
>
Original Message
> From: "peter verkaik" <peterverkaik@b...>
> To: <basicstamps@yahoogroups.com>
> Sent: Thursday, February 14, 2002 11:07 AM
> Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
>
>
> > Hi Ricky,
> >
> > If there is no address for the device, just send the first data byte as
> the
> > address.
> > That should work.
> >
> > Regards peter
> >
> >
> >
> >
Oorspronkelijk bericht
> > Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=z_tHyjl6jOzR7DdD9TwEkfzAWszWf0WPXOWStuwePbXhN-YFfTqAE2R_TTjY1KNAS3CCWXTMNOCMIfBET1JnfK1E3GtK]ricky@m...[/url
> > Verzonden: donderdag 14 februari 2002 10:59
> > Aan: basicstamps@yahoogroups.com
> > Onderwerp: [noparse][[/noparse]basicstamps] A/D source code
> >
> > Ok since my last post I have figured out that my I2cout command is not
> > working. So I am not setting up the A/D properly. Does anyone know
what
> > happens in this command when the device you are trying to write to has
no
> > addresses to access? The third part of the I2cout command calls for an
> > address but this A/D has no address. Is this just a zero?
> >
> >
> >
> >
> >
> > Can anyone see why this wouldn't work? I can get the last 3 digits to
> > change as I vary the voltage into channel 0 of the a/d. But the A/D
> doesn't
> > start at zero it starts at like 192 and goes to 255. 192 being 0 volts
> > applied and 255 being about 2 volts. I have placed a link to the data
> sheet
> > for the a/d below. The circuit is set up like the one on the first page
> of
> > the data sheet.
> >
> > http://dbserv.maxim-ic.com/quick_view2.cfm?qv_pk=1890
> >
> > '
[noparse][[/noparse]
> > Title ]
> >
> > ' {$STAMP BS2p}
> >
> > '
[noparse][[/noparse] I/O
> > Definitions ]
> > I2Cpin CON 0 ' SDA on 0; SCL on 1
> > '
[noparse][[/noparse]
> > Constants ]
> >
> > wrad128 CON %01010000 ' write to A/D
> >
> > rdad128 CON %01010001 ' Read from A/D
> >
> > '
[noparse][[/noparse]
> > Variables ]
> >
> > result VAR word
> >
> > hbyte var result.highbyte
> >
> > lbyte var result.lowbyte
> >
> >
>
'
[noparse][[/noparse]Initialize]
> >
> >
> > result = 0
> >
> > i2cout i2cpin,wrad128,0,[noparse][[/noparse]%10001000]
> >
> > pause 100
> >
> >
> >
> > main:
> >
> > i2cin i2cpin,rdad128,0,[noparse][[/noparse]hbyte,lbyte]
> >
> > pause 100
> >
> > debug home,dec hbyte," ",dec lbyte,cr
> >
> > goto main
> >
> >
> >
> > [noparse][[/noparse]Non-text portions of this message have been removed]
> >
> >
> > 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/
>
>
>
>
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/
are still missing one of the parameters in the code. It won't even download
the code to the stamp.
Original Message
From: "peter verkaik" <peterverkaik@b...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, February 15, 2002 3:06 AM
Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
> Hi ricki,
>
> The i2cin command should read
> I2cin pin%0101001,0,[noparse][[/noparse]datavalue_lowbyte,datavalue_highbyte]
>
> The address 0 is written to the AD converter but not recognized
> as a controlbyte since bit7=0 so it will be ignored.
>
> Regards peter
>
>
>
>
>
Oorspronkelijk bericht
> Van: peter verkaik [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=lKM00zzefyApbcc05IpMHiRvUFKy5XrrIAtz2RZE3hgG9-M1Qyl9b69Qi1Zgw25ampsYozvChM8eU2ColCqpgQ8l]peterverkaik@b...[/url
> Verzonden: donderdag 14 februari 2002 14:39
> Aan: basicstamps@yahoogroups.com
> Onderwerp: RE: [noparse][[/noparse]basicstamps] A/D source code
>
> Hi ricky,
>
> Taking a close look at the pdf datasheet:
>
> Controlbyte = %10000000
> ||||||++-- normal operation
> ||||++---- 0-5V range max127
> |+++
channel 0
> +
identifies controlbyte after R/W bit of id
>
> datavalue var word
>
> stamp statement to initialize AD converter
> i2cout pin,%01010000,controlbyte 'hardwired address pins all grounded
> AD conversion starts, takes 7.7 uS
> pause 1 'this could be omitted
> 'now read the data
> i2cin pin,%01010001,[noparse][[/noparse]datavalue_highbyte,datavalue_lowbyte]
>
> 'datavalue_highbyte contains b11-b4 in bitpositions 7-0
> 'datavalue_lowbyte contains b3-b0 in bitpositions 7-4
> 'so move datavalue 4 bits to the right
> daravalue = datavalue >> 4
> 'now datavalue holds a 12bit value from channel0
>
> This should function.
>
> Regards peter
>
>
>
>
>
Oorspronkelijk bericht
> Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=c70o7UGiO1S71PUppcY9B4xWUPqxK5LZCH5W2pkq7eHPb_BtesSv2dO8_a9J59Q9BdAxIzQTMPMzJr3jgOAHH8xsbaR9]ricky@m...[/url
> Verzonden: donderdag 14 februari 2002 13:25
> Aan: basicstamps@yahoogroups.com
> Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
>
> Yea, that's what I thought, but it didn't work. The program won't even
> download because it sees an error in the code. Any other Ideas? If you
put
> a zero there it will download the program but it is still not functioning
> like it should. Its like it is not getting the data or in this case the
> control byte.
>
>
>
Original Message
> From: "peter verkaik" <peterverkaik@b...>
> To: <basicstamps@yahoogroups.com>
> Sent: Thursday, February 14, 2002 11:07 AM
> Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
>
>
> > Hi Ricky,
> >
> > If there is no address for the device, just send the first data byte as
> the
> > address.
> > That should work.
> >
> > Regards peter
> >
> >
> >
> >
Oorspronkelijk bericht
> > Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=c70o7UGiO1S71PUppcY9B4xWUPqxK5LZCH5W2pkq7eHPb_BtesSv2dO8_a9J59Q9BdAxIzQTMPMzJr3jgOAHH8xsbaR9]ricky@m...[/url
> > Verzonden: donderdag 14 februari 2002 10:59
> > Aan: basicstamps@yahoogroups.com
> > Onderwerp: [noparse][[/noparse]basicstamps] A/D source code
> >
> > Ok since my last post I have figured out that my I2cout command is not
> > working. So I am not setting up the A/D properly. Does anyone know
what
> > happens in this command when the device you are trying to write to has
no
> > addresses to access? The third part of the I2cout command calls for an
> > address but this A/D has no address. Is this just a zero?
> >
> >
> >
> >
> >
> > Can anyone see why this wouldn't work? I can get the last 3 digits to
> > change as I vary the voltage into channel 0 of the a/d. But the A/D
> doesn't
> > start at zero it starts at like 192 and goes to 255. 192 being 0 volts
> > applied and 255 being about 2 volts. I have placed a link to the data
> sheet
> > for the a/d below. The circuit is set up like the one on the first page
> of
> > the data sheet.
> >
> > http://dbserv.maxim-ic.com/quick_view2.cfm?qv_pk=1890
> >
> > '
[noparse][[/noparse]
> > Title ]
> >
> > ' {$STAMP BS2p}
> >
> > '
[noparse][[/noparse] I/O
> > Definitions ]
> > I2Cpin CON 0 ' SDA on 0; SCL on 1
> > '
[noparse][[/noparse]
> > Constants ]
> >
> > wrad128 CON %01010000 ' write to A/D
> >
> > rdad128 CON %01010001 ' Read from A/D
> >
> > '
[noparse][[/noparse]
> > Variables ]
> >
> > result VAR word
> >
> > hbyte var result.highbyte
> >
> > lbyte var result.lowbyte
> >
> >
>
'
[noparse][[/noparse]Initialize]
> >
> >
> > result = 0
> >
> > i2cout i2cpin,wrad128,0,[noparse][[/noparse]%10001000]
> >
> > pause 100
> >
> >
> >
> > main:
> >
> > i2cin i2cpin,rdad128,0,[noparse][[/noparse]hbyte,lbyte]
> >
> > pause 100
> >
> > debug home,dec hbyte," ",dec lbyte,cr
> >
> > goto main
> >
> >
> >
> > [noparse][[/noparse]Non-text portions of this message have been removed]
> >
> >
> > 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/
>
>
>
>
You might take a look at the TLC2543 ADC. 11-channel, 12-bit. Digikey,
about $7.50.
Sid - W4EKQ
Don't know much about the I2C stuff, but with the 2543 you can read 11
channels with 4 I/O lines.
Sid
Tough luck but you still have the option
to code the I2C routine in plain basic.
www.high-techgarage has some working routines.
Not really what you want since you have a bs2p
but it would give you the satisfaction that your AD works.
The problem with the bs2p i2c commands is that they
are intended for eeproms and the like,
and not for devices without internal addresses like the PCF8574 and your AD.
A couple of weeks ago I was told Parallax is working on a fix for this
by allowing to move the id into the address byte and using an id of 0,
in effect skipping the address parameter.
I am not sure wether this firmware update is soon to come.
Perhaps Jon Williams can give some info as I believe this was
his idea. For now it seems you are stuck with either program
the I2C routine yourself or using some other AD, like Sid suggested.
Regards peter
Oorspronkelijk bericht
Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=5T6QzPOQ8b0Nyjo5gCJ9Rpfb5VdTqKLK5AnJRGoDlbceXGIqq7t1wvoUsWMV4ejzf9PiLVQg0kwMKpzWYJoIe6Twjw]ricky@m...[/url
Verzonden: vrijdag 15 februari 2002 16:18
Aan: basicstamps@yahoogroups.com
Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
Well no luck Peter. I'm gonna smash this one with a hammer and find another
A/D. Anyone know of a 10 or 12 bit A/D, single or multiple channels, dip
package, with the I2C interface?
Original Message
From: "peter verkaik" <peterverkaik@b...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, February 15, 2002 7:47 AM
Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
> Hi ricki,
>
> I noticed a missing 0 in the id, so here is the correct line
> I2cin pin,%01010001,0,[noparse][[/noparse]datavalue.lowbyte,datavalue.highbyte]
>
> Regards peter
>
>
Oorspronkelijk bericht
> Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=5T6QzPOQ8b0Nyjo5gCJ9Rpfb5VdTqKLK5AnJRGoDlbceXGIqq7t1wvoUsWMV4ejzf9PiLVQg0kwMKpzWYJoIe6Twjw]ricky@m...[/url
> Verzonden: vrijdag 15 februari 2002 08:42
> Aan: basicstamps@yahoogroups.com
> Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
>
> Thanks peter I'll try that line. I tried the one you sent yesterday and
we
> are still missing one of the parameters in the code. It won't even
download
> the code to the stamp.
>
>
Original Message
> From: "peter verkaik" <peterverkaik@b...>
> To: <basicstamps@yahoogroups.com>
> Sent: Friday, February 15, 2002 3:06 AM
> Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
>
>
> > Hi ricki,
> >
> > The i2cin command should read
> > I2cin pin%0101001,0,[noparse][[/noparse]datavalue_lowbyte,datavalue_highbyte]
> >
> > The address 0 is written to the AD converter but not recognized
> > as a controlbyte since bit7=0 so it will be ignored.
> >
> > Regards peter
> >
> >
> >
> >
> >
Oorspronkelijk bericht
> > Van: peter verkaik [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=m0QUqOQklIwn0c-UmB-PPTWhlonA-tWGxvxmyrkO_MkaUEtN_3NpuiUMHGQsP_XnMcWkVKBVV53kON-2Oi1mbmDe]peterverkaik@b...[/url
> > Verzonden: donderdag 14 februari 2002 14:39
> > Aan: basicstamps@yahoogroups.com
> > Onderwerp: RE: [noparse][[/noparse]basicstamps] A/D source code
> >
> > Hi ricky,
> >
> > Taking a close look at the pdf datasheet:
> >
> > Controlbyte = %10000000
> > ||||||++-- normal operation
> > ||||++---- 0-5V range max127
> > |+++
channel 0
> > +
identifies controlbyte after R/W bit of id
> >
> > datavalue var word
> >
> > stamp statement to initialize AD converter
> > i2cout pin,%01010000,controlbyte 'hardwired address pins all grounded
> > AD conversion starts, takes 7.7 uS
> > pause 1 'this could be omitted
> > 'now read the data
> > i2cin pin,%01010001,[noparse][[/noparse]datavalue_highbyte,datavalue_lowbyte]
> >
> > 'datavalue_highbyte contains b11-b4 in bitpositions 7-0
> > 'datavalue_lowbyte contains b3-b0 in bitpositions 7-4
> > 'so move datavalue 4 bits to the right
> > daravalue = datavalue >> 4
> > 'now datavalue holds a 12bit value from channel0
> >
> > This should function.
> >
> > Regards peter
> >
> >
> >
> >
> >
Oorspronkelijk bericht
> > Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=5T6QzPOQ8b0Nyjo5gCJ9Rpfb5VdTqKLK5AnJRGoDlbceXGIqq7t1wvoUsWMV4ejzf9PiLVQg0kwMKpzWYJoIe6Twjw]ricky@m...[/url
> > Verzonden: donderdag 14 februari 2002 13:25
> > Aan: basicstamps@yahoogroups.com
> > Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
> >
> > Yea, that's what I thought, but it didn't work. The program won't even
> > download because it sees an error in the code. Any other Ideas? If you
> put
> > a zero there it will download the program but it is still not
functioning
> > like it should. Its like it is not getting the data or in this case the
> > control byte.
> >
> >
> >
Original Message
> > From: "peter verkaik" <peterverkaik@b...>
> > To: <basicstamps@yahoogroups.com>
> > Sent: Thursday, February 14, 2002 11:07 AM
> > Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
> >
> >
> > > Hi Ricky,
> > >
> > > If there is no address for the device, just send the first data byte
as
> > the
> > > address.
> > > That should work.
> > >
> > > Regards peter
> > >
> > >
> > >
> > >
Oorspronkelijk bericht
> > > Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=5T6QzPOQ8b0Nyjo5gCJ9Rpfb5VdTqKLK5AnJRGoDlbceXGIqq7t1wvoUsWMV4ejzf9PiLVQg0kwMKpzWYJoIe6Twjw]ricky@m...[/url
> > > Verzonden: donderdag 14 februari 2002 10:59
> > > Aan: basicstamps@yahoogroups.com
> > > Onderwerp: [noparse][[/noparse]basicstamps] A/D source code
> > >
> > > Ok since my last post I have figured out that my I2cout command is not
> > > working. So I am not setting up the A/D properly. Does anyone know
> what
> > > happens in this command when the device you are trying to write to has
> no
> > > addresses to access? The third part of the I2cout command calls for
an
> > > address but this A/D has no address. Is this just a zero?
> > >
> > >
> > >
> > >
> > >
> > > Can anyone see why this wouldn't work? I can get the last 3 digits to
> > > change as I vary the voltage into channel 0 of the a/d. But the A/D
> > doesn't
> > > start at zero it starts at like 192 and goes to 255. 192 being 0
volts
> > > applied and 255 being about 2 volts. I have placed a link to the data
> > sheet
> > > for the a/d below. The circuit is set up like the one on the first
page
> > of
> > > the data sheet.
> > >
> > > http://dbserv.maxim-ic.com/quick_view2.cfm?qv_pk=1890
> > >
> > > '
[noparse][[/noparse]
> > >
Title ]
> > >
> > > ' {$STAMP BS2p}
> > >
> > > '
[noparse][[/noparse] I/O
> > > Definitions ]
> > > I2Cpin CON 0 ' SDA on 0; SCL on 1
> > > '
[noparse][[/noparse]
> > >
Constants ]
> > >
> > > wrad128 CON %01010000 ' write to A/D
> > >
> > > rdad128 CON %01010001 ' Read from A/D
> > >
> > > '
[noparse][[/noparse]
> > >
Variables ]
> > >
> > > result VAR word
> > >
> > > hbyte var result.highbyte
> > >
> > > lbyte var result.lowbyte
> > >
> > >
> >
>
'
[noparse][[/noparse]Initialize]
> > >
> > >
> > > result = 0
> > >
> > > i2cout i2cpin,wrad128,0,[noparse][[/noparse]%10001000]
> > >
> > > pause 100
> > >
> > >
> > >
> > > main:
> > >
> > > i2cin i2cpin,rdad128,0,[noparse][[/noparse]hbyte,lbyte]
> > >
> > > pause 100
> > >
> > > debug home,dec hbyte," ",dec lbyte,cr
> > >
> > > goto main
> > >
> > >
> > >
> > > [noparse][[/noparse]Non-text portions of this message have been removed]
> > >
> > >
> > > 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/
> >
> >
> >
> >
>
>
>
> 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/
Talking other AD.
The PCF8591
(http://www-us9.semiconductors.com/acrobat/datasheets/PCF8591_5.pdf)
uses a controlbyte after the id for an i2c write and uses an internal
address after the id for an i2c read
so this one is usable with the bs2p i2c commands. Only 8 bit resolution
though (4 AD, 1 DA).
Regards peter
Oorspronkelijk bericht
Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=chr_Ttr58nojnGEwOufJDcvdmhSPPDYLIbqKkydokPoOzfCsVT56hNE4EpoykAOB2AN7Qzilfjcn8DW7fUSmLlrSzg]ricky@m...[/url
Verzonden: vrijdag 15 februari 2002 16:18
Aan: basicstamps@yahoogroups.com
Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
Well no luck Peter. I'm gonna smash this one with a hammer and find another
A/D. Anyone know of a 10 or 12 bit A/D, single or multiple channels, dip
package, with the I2C interface?
A/D. Anyone know of a 10 or 12 bit A/D, single or multiple channels, dip
package, with the I2C interface?
Original Message
From: "peter verkaik" <peterverkaik@b...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, February 15, 2002 7:47 AM
Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
> Hi ricki,
>
> I noticed a missing 0 in the id, so here is the correct line
> I2cin pin,%01010001,0,[noparse][[/noparse]datavalue.lowbyte,datavalue.highbyte]
>
> Regards peter
>
>
Oorspronkelijk bericht
> Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=liYOKkm-aEL8rHdXt70IyJD-qO8grxjFyXaWnp236EaPnXAzYI2cwnoPmzEyBksKzGSByeI8luwpnJkdzA37hzZy]ricky@m...[/url
> Verzonden: vrijdag 15 februari 2002 08:42
> Aan: basicstamps@yahoogroups.com
> Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
>
> Thanks peter I'll try that line. I tried the one you sent yesterday and
we
> are still missing one of the parameters in the code. It won't even
download
> the code to the stamp.
>
>
Original Message
> From: "peter verkaik" <peterverkaik@b...>
> To: <basicstamps@yahoogroups.com>
> Sent: Friday, February 15, 2002 3:06 AM
> Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
>
>
> > Hi ricki,
> >
> > The i2cin command should read
> > I2cin pin%0101001,0,[noparse][[/noparse]datavalue_lowbyte,datavalue_highbyte]
> >
> > The address 0 is written to the AD converter but not recognized
> > as a controlbyte since bit7=0 so it will be ignored.
> >
> > Regards peter
> >
> >
> >
> >
> >
Oorspronkelijk bericht
> > Van: peter verkaik [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=N2a6lkisXsdBmSbChi-247oqzx7ujVStTVO4qRt9Z6nkHaj7kHxNn8jhcap3dYmN77DcxxW4BiocOWiOMtoJ9A]peterverkaik@b...[/url
> > Verzonden: donderdag 14 februari 2002 14:39
> > Aan: basicstamps@yahoogroups.com
> > Onderwerp: RE: [noparse][[/noparse]basicstamps] A/D source code
> >
> > Hi ricky,
> >
> > Taking a close look at the pdf datasheet:
> >
> > Controlbyte = %10000000
> > ||||||++-- normal operation
> > ||||++---- 0-5V range max127
> > |+++
channel 0
> > +
identifies controlbyte after R/W bit of id
> >
> > datavalue var word
> >
> > stamp statement to initialize AD converter
> > i2cout pin,%01010000,controlbyte 'hardwired address pins all grounded
> > AD conversion starts, takes 7.7 uS
> > pause 1 'this could be omitted
> > 'now read the data
> > i2cin pin,%01010001,[noparse][[/noparse]datavalue_highbyte,datavalue_lowbyte]
> >
> > 'datavalue_highbyte contains b11-b4 in bitpositions 7-0
> > 'datavalue_lowbyte contains b3-b0 in bitpositions 7-4
> > 'so move datavalue 4 bits to the right
> > daravalue = datavalue >> 4
> > 'now datavalue holds a 12bit value from channel0
> >
> > This should function.
> >
> > Regards peter
> >
> >
> >
> >
> >
Oorspronkelijk bericht
> > Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=liYOKkm-aEL8rHdXt70IyJD-qO8grxjFyXaWnp236EaPnXAzYI2cwnoPmzEyBksKzGSByeI8luwpnJkdzA37hzZy]ricky@m...[/url
> > Verzonden: donderdag 14 februari 2002 13:25
> > Aan: basicstamps@yahoogroups.com
> > Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
> >
> > Yea, that's what I thought, but it didn't work. The program won't even
> > download because it sees an error in the code. Any other Ideas? If you
> put
> > a zero there it will download the program but it is still not
functioning
> > like it should. Its like it is not getting the data or in this case the
> > control byte.
> >
> >
> >
Original Message
> > From: "peter verkaik" <peterverkaik@b...>
> > To: <basicstamps@yahoogroups.com>
> > Sent: Thursday, February 14, 2002 11:07 AM
> > Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
> >
> >
> > > Hi Ricky,
> > >
> > > If there is no address for the device, just send the first data byte
as
> > the
> > > address.
> > > That should work.
> > >
> > > Regards peter
> > >
> > >
> > >
> > >
Oorspronkelijk bericht
> > > Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=liYOKkm-aEL8rHdXt70IyJD-qO8grxjFyXaWnp236EaPnXAzYI2cwnoPmzEyBksKzGSByeI8luwpnJkdzA37hzZy]ricky@m...[/url
> > > Verzonden: donderdag 14 februari 2002 10:59
> > > Aan: basicstamps@yahoogroups.com
> > > Onderwerp: [noparse][[/noparse]basicstamps] A/D source code
> > >
> > > Ok since my last post I have figured out that my I2cout command is not
> > > working. So I am not setting up the A/D properly. Does anyone know
> what
> > > happens in this command when the device you are trying to write to has
> no
> > > addresses to access? The third part of the I2cout command calls for
an
> > > address but this A/D has no address. Is this just a zero?
> > >
> > >
> > >
> > >
> > >
> > > Can anyone see why this wouldn't work? I can get the last 3 digits to
> > > change as I vary the voltage into channel 0 of the a/d. But the A/D
> > doesn't
> > > start at zero it starts at like 192 and goes to 255. 192 being 0
volts
> > > applied and 255 being about 2 volts. I have placed a link to the data
> > sheet
> > > for the a/d below. The circuit is set up like the one on the first
page
> > of
> > > the data sheet.
> > >
> > > http://dbserv.maxim-ic.com/quick_view2.cfm?qv_pk=1890
> > >
> > > '
[noparse][[/noparse]
> > >
Title ]
> > >
> > > ' {$STAMP BS2p}
> > >
> > > '
[noparse][[/noparse] I/O
> > > Definitions ]
> > > I2Cpin CON 0 ' SDA on 0; SCL on 1
> > > '
[noparse][[/noparse]
> > >
Constants ]
> > >
> > > wrad128 CON %01010000 ' write to A/D
> > >
> > > rdad128 CON %01010001 ' Read from A/D
> > >
> > > '
[noparse][[/noparse]
> > >
Variables ]
> > >
> > > result VAR word
> > >
> > > hbyte var result.highbyte
> > >
> > > lbyte var result.lowbyte
> > >
> > >
> >
>
'
[noparse][[/noparse]Initialize]
> > >
> > >
> > > result = 0
> > >
> > > i2cout i2cpin,wrad128,0,[noparse][[/noparse]%10001000]
> > >
> > > pause 100
> > >
> > >
> > >
> > > main:
> > >
> > > i2cin i2cpin,rdad128,0,[noparse][[/noparse]hbyte,lbyte]
> > >
> > > pause 100
> > >
> > > debug home,dec hbyte," ",dec lbyte,cr
> > >
> > > goto main
> > >
> > >
> > >
> > > [noparse][[/noparse]Non-text portions of this message have been removed]
> > >
> > >
> > > 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/
> >
> >
> >
> >
>
>
>
> 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/
>
>
>
Looks good but it is not an I2c bus. I am trying to stay with this bus to
save I/O lines , but I may have to go to something else.
Original Message
From: <Newzed@a...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, February 15, 2002 2:16 PM
Subject: Re: [noparse][[/noparse]basicstamps] A/D source code
> For Ricky
>
> You might take a look at the TLC2543 ADC. 11-channel, 12-bit. Digikey,
> about $7.50.
>
> Sid - W4EKQ
>
> 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/
>
>
>
>
site, for example, has working code for the PCF8574. Since I don't have the
A/D in question in hand, I can't work on it. I'll see if I can get a sample
and work it out. I prefer to work with silicon than speculate with spec
sheets.
Above all, we are certainly looking for opportunities to improve -- if
possible -- the I2CIN and I2COUT routines. Nothing concrete has been decided
at this time. There are a lot of brains around our organization and we have
to sort through all the good ideas before we make a change that affects
current customers.
-- Jon Williams
-- Parallax
In a message dated 2/15/02 5:37:00 PM Central Standard Time,
peterverkaik@b... writes:
> A couple of weeks ago I was told Parallax is working on a fix for this
> by allowing to move the id into the address byte and using an id of 0,
> in effect skipping the address parameter.
> I am not sure wether this firmware update is soon to come.
> Perhaps Jon Williams can give some info as I believe this was
> his idea. For now it seems you are stuck with either program
> the I2C routine yourself or using some other AD, like Sid suggested.
>
[noparse][[/noparse]Non-text portions of this message have been removed]
It just occured to me, there is one other way you can try.
The conversion starts after the AD receives the controlbyte and a stop
condition
and takes approx. 7.7uS. If you use ONLY the i2cin command,
It might just work (depends on the time the stamp requires
to execute the i2c command AND if the stamp issues a STOP condition
before reading, and if 7.7uS is fast enough).
So just use
I2cin pin,%01010001,%10000000,[noparse][[/noparse]datavalue.lowbyte,datavalue.highbyte]
What happens is:
The stamp issues a start condition, sends the id with bit0=0 to the AD,
recerives an ack from the AD,
sends the controlbyte, receives another ack, issues a stop condition (not
sure about this but necessary for this to work,
if the stamp just issues a restart condition, the conversion will not
start).
stamp issues a start condition, sends the id with bt0=1 and then receives
the data from the AD (and acks).
Regards peter
Oorspronkelijk bericht
Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=34_l4rPVEOnoBVorn2vcb0phbaqW6DIW3U4m2n8EJublMUnFx9eVaCmR9_Y_mUNcP3fipCa9kvCA6tdpXCLZEmdpf3D8]ricky@m...[/url
Verzonden: vrijdag 15 februari 2002 16:18
Aan: basicstamps@yahoogroups.com
Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
Well no luck Peter. I'm gonna smash this one with a hammer and find another
A/D. Anyone know of a 10 or 12 bit A/D, single or multiple channels, dip
package, with the I2C interface?
Original Message
From: "peter verkaik" <peterverkaik@b...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, February 15, 2002 7:47 AM
Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
> Hi ricki,
>
> I noticed a missing 0 in the id, so here is the correct line
> I2cin pin,%01010001,0,[noparse][[/noparse]datavalue.lowbyte,datavalue.highbyte]
>
> Regards peter
>
>
Oorspronkelijk bericht
> Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=34_l4rPVEOnoBVorn2vcb0phbaqW6DIW3U4m2n8EJublMUnFx9eVaCmR9_Y_mUNcP3fipCa9kvCA6tdpXCLZEmdpf3D8]ricky@m...[/url
> Verzonden: vrijdag 15 februari 2002 08:42
> Aan: basicstamps@yahoogroups.com
> Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
>
> Thanks peter I'll try that line. I tried the one you sent yesterday and
we
> are still missing one of the parameters in the code. It won't even
download
> the code to the stamp.
>
>
Original Message
> From: "peter verkaik" <peterverkaik@b...>
> To: <basicstamps@yahoogroups.com>
> Sent: Friday, February 15, 2002 3:06 AM
> Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
>
>
> > Hi ricki,
> >
> > The i2cin command should read
> > I2cin pin%0101001,0,[noparse][[/noparse]datavalue_lowbyte,datavalue_highbyte]
> >
> > The address 0 is written to the AD converter but not recognized
> > as a controlbyte since bit7=0 so it will be ignored.
> >
> > Regards peter
> >
> >
> >
> >
> >
Oorspronkelijk bericht
> > Van: peter verkaik [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=jODzelIEyKYinZEtpF8Z5ZkpXmNijQQ1nG6V9cB7_XYrjtyQu2_QzuJl3_8zZr7I6YANPN_jZPBjK3izrp-p4ohXAg]peterverkaik@b...[/url
> > Verzonden: donderdag 14 februari 2002 14:39
> > Aan: basicstamps@yahoogroups.com
> > Onderwerp: RE: [noparse][[/noparse]basicstamps] A/D source code
> >
> > Hi ricky,
> >
> > Taking a close look at the pdf datasheet:
> >
> > Controlbyte = %10000000
> > ||||||++-- normal operation
> > ||||++---- 0-5V range max127
> > |+++
channel 0
> > +
identifies controlbyte after R/W bit of id
> >
> > datavalue var word
> >
> > stamp statement to initialize AD converter
> > i2cout pin,%01010000,controlbyte 'hardwired address pins all grounded
> > AD conversion starts, takes 7.7 uS
> > pause 1 'this could be omitted
> > 'now read the data
> > i2cin pin,%01010001,[noparse][[/noparse]datavalue_highbyte,datavalue_lowbyte]
> >
> > 'datavalue_highbyte contains b11-b4 in bitpositions 7-0
> > 'datavalue_lowbyte contains b3-b0 in bitpositions 7-4
> > 'so move datavalue 4 bits to the right
> > daravalue = datavalue >> 4
> > 'now datavalue holds a 12bit value from channel0
> >
> > This should function.
> >
> > Regards peter
> >
> >
> >
> >
> >
Oorspronkelijk bericht
> > Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=34_l4rPVEOnoBVorn2vcb0phbaqW6DIW3U4m2n8EJublMUnFx9eVaCmR9_Y_mUNcP3fipCa9kvCA6tdpXCLZEmdpf3D8]ricky@m...[/url
> > Verzonden: donderdag 14 februari 2002 13:25
> > Aan: basicstamps@yahoogroups.com
> > Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
> >
> > Yea, that's what I thought, but it didn't work. The program won't even
> > download because it sees an error in the code. Any other Ideas? If you
> put
> > a zero there it will download the program but it is still not
functioning
> > like it should. Its like it is not getting the data or in this case the
> > control byte.
> >
> >
> >
Original Message
> > From: "peter verkaik" <peterverkaik@b...>
> > To: <basicstamps@yahoogroups.com>
> > Sent: Thursday, February 14, 2002 11:07 AM
> > Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
> >
> >
> > > Hi Ricky,
> > >
> > > If there is no address for the device, just send the first data byte
as
> > the
> > > address.
> > > That should work.
> > >
> > > Regards peter
> > >
> > >
> > >
> > >
Oorspronkelijk bericht
> > > Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=34_l4rPVEOnoBVorn2vcb0phbaqW6DIW3U4m2n8EJublMUnFx9eVaCmR9_Y_mUNcP3fipCa9kvCA6tdpXCLZEmdpf3D8]ricky@m...[/url
> > > Verzonden: donderdag 14 februari 2002 10:59
> > > Aan: basicstamps@yahoogroups.com
> > > Onderwerp: [noparse][[/noparse]basicstamps] A/D source code
> > >
> > > Ok since my last post I have figured out that my I2cout command is not
> > > working. So I am not setting up the A/D properly. Does anyone know
> what
> > > happens in this command when the device you are trying to write to has
> no
> > > addresses to access? The third part of the I2cout command calls for
an
> > > address but this A/D has no address. Is this just a zero?
> > >
> > >
> > >
> > >
> > >
> > > Can anyone see why this wouldn't work? I can get the last 3 digits to
> > > change as I vary the voltage into channel 0 of the a/d. But the A/D
> > doesn't
> > > start at zero it starts at like 192 and goes to 255. 192 being 0
volts
> > > applied and 255 being about 2 volts. I have placed a link to the data
> > sheet
> > > for the a/d below. The circuit is set up like the one on the first
page
> > of
> > > the data sheet.
> > >
> > > http://dbserv.maxim-ic.com/quick_view2.cfm?qv_pk=1890
> > >
> > > '
[noparse][[/noparse]
> > >
Title ]
> > >
> > > ' {$STAMP BS2p}
> > >
> > > '
[noparse][[/noparse] I/O
> > > Definitions ]
> > > I2Cpin CON 0 ' SDA on 0; SCL on 1
> > > '
[noparse][[/noparse]
> > >
Constants ]
> > >
> > > wrad128 CON %01010000 ' write to A/D
> > >
> > > rdad128 CON %01010001 ' Read from A/D
> > >
> > > '
[noparse][[/noparse]
> > >
Variables ]
> > >
> > > result VAR word
> > >
> > > hbyte var result.highbyte
> > >
> > > lbyte var result.lowbyte
> > >
> > >
> >
>
'
[noparse][[/noparse]Initialize]
> > >
> > >
> > > result = 0
> > >
> > > i2cout i2cpin,wrad128,0,[noparse][[/noparse]%10001000]
> > >
> > > pause 100
> > >
> > >
> > >
> > > main:
> > >
> > > i2cin i2cpin,rdad128,0,[noparse][[/noparse]hbyte,lbyte]
> > >
> > > pause 100
> > >
> > > debug home,dec hbyte," ",dec lbyte,cr
> > >
> > > goto main
> > >
> > >
> > >
> > > [noparse][[/noparse]Non-text portions of this message have been removed]
> > >
> > >
> > > 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/
> >
> >
> >
> >
>
>
>
> 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/
just hook two of them up to get the 8 channels I need. Thanks for all your
help!
Original Message
From: "peter verkaik" <peterverkaik@b...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, February 15, 2002 4:12 PM
Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
> Hi ricky,
>
> Talking other AD.
> The PCF8591
> (http://www-us9.semiconductors.com/acrobat/datasheets/PCF8591_5.pdf)
> uses a controlbyte after the id for an i2c write and uses an internal
> address after the id for an i2c read
> so this one is usable with the bs2p i2c commands. Only 8 bit resolution
> though (4 AD, 1 DA).
>
> Regards peter
>
>
>
Oorspronkelijk bericht
> Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=g0ttuExWd_H9vUdbiB_j7Z3Udmnlgq3Njzln3WIQf_El5dr9qGfoF9kDJyWdYHlwBCGqfl4cD7HhhWhEeJFgLVFfmv8H]ricky@m...[/url
> Verzonden: vrijdag 15 februari 2002 16:18
> Aan: basicstamps@yahoogroups.com
> Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
>
> Well no luck Peter. I'm gonna smash this one with a hammer and find
another
> A/D. Anyone know of a 10 or 12 bit A/D, single or multiple channels, dip
> package, with the I2C interface?
>
>
>
> 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/
>
>
>
ricky@m... writes:
> Peter, after doing some searching, I can't find anyone that sells these
> A/Ds. Where can I get them?
>
You can buy them in single quantities from Parallax. You can get source code
for it on our site as well.
http://www.parallaxinc.com/html_files/component_shop/plus_pack.asp
-- Jon Williams
-- Parallax
[noparse][[/noparse]Non-text portions of this message have been removed]
A/Ds. Where can I get them?
Original Message
From: "peter verkaik" <peterverkaik@b...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, February 15, 2002 4:12 PM
Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
> Hi ricky,
>
> Talking other AD.
> The PCF8591
> (http://www-us9.semiconductors.com/acrobat/datasheets/PCF8591_5.pdf)
> uses a controlbyte after the id for an i2c write and uses an internal
> address after the id for an i2c read
> so this one is usable with the bs2p i2c commands. Only 8 bit resolution
> though (4 AD, 1 DA).
>
> Regards peter
>
>
>
Oorspronkelijk bericht
> Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=FzbS5K56OxbgGFde2cfwykFxuax5Fv8dWNKAx1cWmG2fOEjhFSpIjMhyJ4NDhBXdZ1Pl8G4AFVsZqQFTiTp67eco9Q]ricky@m...[/url
> Verzonden: vrijdag 15 februari 2002 16:18
> Aan: basicstamps@yahoogroups.com
> Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
>
> Well no luck Peter. I'm gonna smash this one with a hammer and find
another
> A/D. Anyone know of a 10 or 12 bit A/D, single or multiple channels, dip
> package, with the I2C interface?
>
>
>
> 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/
>
>
>
anymore. I think I will take Johns suggestion and order them from Parallax.
Thanks Guys!
Original Message
From: "peter verkaik" <peterverkaik@b...>
To: <basicstamps@yahoogroups.com>
Sent: Monday, February 18, 2002 6:04 PM
Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
> Hi ricki,
>
> Search at newark does not result in a hit.
> According to the link
> http://www.phanderson.com/PIC/PICC/CCS_PCM/8591.html
> Peter Anderson sells the device also.
> http://www.phandersdon.com
> Try contacting him at pha@p...,
>
> Regards peter
>
>
>
Oorspronkelijk bericht
> Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=45MD3LcuVlS-icMZfVc39JoZ8SLPJWPFxf-9aJnT5N0j3h1NbdkGgMhS-vhqCobkmx1PQObjgJXe7VO2ohg7dQ]ricky@m...[/url
> Verzonden: maandag 18 februari 2002 10:14
> Aan: basicstamps@yahoogroups.com
> Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
>
> Peter, after doing some searching, I can't find anyone that sells these
> A/Ds. Where can I get them?
>
Original Message
> From: "peter verkaik" <peterverkaik@b...>
> To: <basicstamps@yahoogroups.com>
> Sent: Friday, February 15, 2002 4:12 PM
> Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
>
>
> > Hi ricky,
> >
> > Talking other AD.
> > The PCF8591
> > (http://www-us9.semiconductors.com/acrobat/datasheets/PCF8591_5.pdf)
> > uses a controlbyte after the id for an i2c write and uses an internal
> > address after the id for an i2c read
> > so this one is usable with the bs2p i2c commands. Only 8 bit resolution
> > though (4 AD, 1 DA).
> >
> > Regards peter
> >
> >
> >
Oorspronkelijk bericht
> > Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=45MD3LcuVlS-icMZfVc39JoZ8SLPJWPFxf-9aJnT5N0j3h1NbdkGgMhS-vhqCobkmx1PQObjgJXe7VO2ohg7dQ]ricky@m...[/url
> > Verzonden: vrijdag 15 februari 2002 16:18
> > Aan: basicstamps@yahoogroups.com
> > Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
> >
> > Well no luck Peter. I'm gonna smash this one with a hammer and find
> another
> > A/D. Anyone know of a 10 or 12 bit A/D, single or multiple channels,
dip
> > package, with the I2C interface?
> >
> >
> >
> > 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 found this application note for the pcf8591
http://www.phanderson.com/PIC/16C84/8591_d_a.html
It also tells that the part is available at http://www.newark.com
for nominally $5.00 US.
Success.
Regards peter
Oorspronkelijk bericht
Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=x2GIqj5mTH63Rn1M0X7Ox_YolB_F4sfzIR1RGQH6edFGrkR130TUJS-sIRu-LT_BtlYQYs7V12CRgq_NQvylDg]ricky@m...[/url
Verzonden: maandag 18 februari 2002 10:14
Aan: basicstamps@yahoogroups.com
Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
Peter, after doing some searching, I can't find anyone that sells these
A/Ds. Where can I get them?
Original Message
From: "peter verkaik" <peterverkaik@b...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, February 15, 2002 4:12 PM
Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
> Hi ricky,
>
> Talking other AD.
> The PCF8591
> (http://www-us9.semiconductors.com/acrobat/datasheets/PCF8591_5.pdf)
> uses a controlbyte after the id for an i2c write and uses an internal
> address after the id for an i2c read
> so this one is usable with the bs2p i2c commands. Only 8 bit resolution
> though (4 AD, 1 DA).
>
> Regards peter
>
>
>
Oorspronkelijk bericht
> Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=x2GIqj5mTH63Rn1M0X7Ox_YolB_F4sfzIR1RGQH6edFGrkR130TUJS-sIRu-LT_BtlYQYs7V12CRgq_NQvylDg]ricky@m...[/url
> Verzonden: vrijdag 15 februari 2002 16:18
> Aan: basicstamps@yahoogroups.com
> Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
>
> Well no luck Peter. I'm gonna smash this one with a hammer and find
another
> A/D. Anyone know of a 10 or 12 bit A/D, single or multiple channels, dip
> package, with the I2C interface?
>
>
>
> 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/
Search at newark does not result in a hit.
According to the link
http://www.phanderson.com/PIC/PICC/CCS_PCM/8591.html
Peter Anderson sells the device also.
http://www.phandersdon.com
Try contacting him at pha@p...,
Regards peter
Oorspronkelijk bericht
Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=5XOJqAakpp-PbLrQ9gM14uAFaLaoHfFjsmD-HvdDLr2OgRY0S237fkqc2t95WCbXKC49eKJ0N8zc-QkLe0I3sLZfoJE]ricky@m...[/url
Verzonden: maandag 18 februari 2002 10:14
Aan: basicstamps@yahoogroups.com
Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
Peter, after doing some searching, I can't find anyone that sells these
A/Ds. Where can I get them?
Original Message
From: "peter verkaik" <peterverkaik@b...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, February 15, 2002 4:12 PM
Subject: RE: [noparse][[/noparse]basicstamps] A/D source code
> Hi ricky,
>
> Talking other AD.
> The PCF8591
> (http://www-us9.semiconductors.com/acrobat/datasheets/PCF8591_5.pdf)
> uses a controlbyte after the id for an i2c write and uses an internal
> address after the id for an i2c read
> so this one is usable with the bs2p i2c commands. Only 8 bit resolution
> though (4 AD, 1 DA).
>
> Regards peter
>
>
>
Oorspronkelijk bericht
> Van: Ricky Konvicka [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=5XOJqAakpp-PbLrQ9gM14uAFaLaoHfFjsmD-HvdDLr2OgRY0S237fkqc2t95WCbXKC49eKJ0N8zc-QkLe0I3sLZfoJE]ricky@m...[/url
> Verzonden: vrijdag 15 februari 2002 16:18
> Aan: basicstamps@yahoogroups.com
> Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
>
> Well no luck Peter. I'm gonna smash this one with a hammer and find
another
> A/D. Anyone know of a 10 or 12 bit A/D, single or multiple channels, dip
> package, with the I2C interface?
>
>
>
> 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/
Great that Parallax sells them.
The docu is at
http://www.parallaxinc.com/downloads/Documentation/BS2P/BS2p%20Plus%20Pack.p
df
Regards peter
Oorspronkelijk bericht
Van: jonwms@a... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=loMVgHnXnZD2SXs2aIFh_k10wBxFR71h3B8sj83u8juDredlXBjS8E6TbkB6LpXfwt1KtbKowasN]jonwms@a...[/url
Verzonden: maandag 18 februari 2002 09:02
Aan: basicstamps@yahoogroups.com
Onderwerp: Re: [noparse][[/noparse]basicstamps] A/D source code
In a message dated 2/18/02 10:15:40 AM Central Standard Time,
ricky@m... writes:
> Peter, after doing some searching, I can't find anyone that sells these
> A/Ds. Where can I get them?
>
You can buy them in single quantities from Parallax. You can get source
code
for it on our site as well.
http://www.parallaxinc.com/html_files/component_shop/plus_pack.asp
-- Jon Williams
-- Parallax
[noparse][[/noparse]Non-text portions of this message have been removed]
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/