dallas 1 wire pot and stamp
Archiver
Posts: 46,084
Does anyone have any experience/code to interface a
stamp to a dallas ds2890 one wire pot? I am using the
one in the TO-92 package. I will only be using one of
them so I would like to make the communications as
simple as possible.
Thanks,
Scott Sutton
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
stamp to a dallas ds2890 one wire pot? I am using the
one in the TO-92 package. I will only be using one of
them so I would like to make the communications as
simple as possible.
Thanks,
Scott Sutton
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
Comments
scottsutton67@y... writes:
> Does anyone have any experience/code to interface a
> stamp to a dallas ds2890 one wire pot? I am using the
> one in the TO-92 package. I will only be using one of
> them so I would like to make the communications as
> simple as possible.
>
>
Scott,
Here is some pbasic example code for the BS2p.
Chuck
'setup for 1-wire DS2890
'see Dallas datasheet pages 16 and 17
x var byte(9)
w var byte
y var byte
z var byte
p var nib
p=8:w=44:z=2
pause 500
gosub LCDINIT
owout z,1,[noparse][[/noparse]$3c] 'overdrive mode
owout z,9,[noparse][[/noparse]$33]
owin z,10,[noparse][[/noparse]str x\8]
lcdcmd p,1
lcdout p,0,[noparse][[/noparse]"BASIC Stamp2P reads"]
lcdout p,192,[noparse][[/noparse]"DALLAS 1-Wire code"]
lcdcmd p,148
debug cls
for y=0 to 7
lcdout p,0,[noparse][[/noparse]hex2 x(y)]
debug hex2 x(y),cr
next
owout z,9,[noparse][[/noparse]$cc,$55,$0c]
owin z,8,[noparse][[/noparse]y]
debug hex2 y,cr
owout z,8,[noparse][[/noparse]$96]
owin z,8,[noparse][[/noparse]y]
debug hex2 y,cr
owout z,9,[noparse][[/noparse]$cc,$0f,$7f]
owin z,8,[noparse][[/noparse]y]
debug hex2 y,cr
owout z,8,[noparse][[/noparse]$96]
owin z,8,[noparse][[/noparse]y]
debug hex2 y,cr
owout z,9,[noparse][[/noparse]$cc,$c3]
owin z,8,[noparse][[/noparse]y]
owout z,8,[noparse][[/noparse]$c3]
owin z,8,[noparse][[/noparse]y]
owout z,8,[noparse][[/noparse]$99]
owin z,10,[noparse][[/noparse]y]
stop
'initialize LCD
LCDINIT
lcdcmd p,48 'set function
pause 5
lcdcmd p,48
pause 1
lcdcmd p,48
pause 1
lcdcmd p,32
pause 1
lcdcmd p,w
pause 1
lcdcmd p,8 'display off
lcdcmd p,12 'display on
lcdcmd p,6 'set mode
lcdcmd p,1
return
[noparse][[/noparse]Non-text portions of this message have been removed]