Have you tried to "Include modedefs.bas"
Best Regards,
Nick
Have you tried to "Include modedefs.bas"
Best Regards,
Nick
Hi, Santa
Have a look to the Basic Stamp 1 application notes ( ch.23 : DS 1620 digital thermometer ... )
This is page 189 from the Basic stamp programming manual 1.9 ...
Download it from Parallax inc.
- and do not forget the "Include modedef ...."
Alain
PS: another version
' Sous-programmes de dialogue avec un DS 1620
' connecte comme indique figure 7.15
' Version pour Basic Stamp II ou II-SX
' Definition des constantes et variables
CLK con 15
DQ con 14
RST con 13
wcfg con $0C
cpucont con 2
startc con $EE
rtemp con $AA
temp var word
' Initialisation
low RST
high CLK
pause 100 ' attente prise en compte DS 1620
high RST
shiftout DQ, CLK, lsbfirst, [wcfg, cpucon]
low RST
pause 50 ' attente prise en compte DS 1620
high RST
shiftout DQ, CLK, lsbfirst [startc]
low RST
pause 1000 ' attente d'une seconde
' Lecture de la temperature mesuree par le DS 1620
lecture:
high RST
shiftout DQ, CLK, lsbfirst [rtemp]
shiftin DQ, CLK, lsbpre [temp\9]
low RST
' La temperature mesuree par le DS 1620
' est disponible dans temp codee sur 9 bits
Listing 7.6
Last edited by Acetronics2; - 23rd April 2005 at 19:49.
PBP have new command owin which is much efficient than shiftout check my previous post i have complete but using pic16f84a
Hi, jojo
Do you feel sure not to mix DS 1620 and DS 1820 ???
I'm not so sure ...
Alain
Originally Posted by Macgman2000
i don't think so is modedefs because i use the same values for that but i will do it because you never know.can you explain me how syncronus data works?maby i will find what its going wrong
thanks all for your support
Bookmarks