problem with ds1620


Results 1 to 9 of 9

Threaded View

  1. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    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 18:49.

Similar Threads

  1. Problem to compile my program
    By wagner in forum Off Topic
    Replies: 5
    Last Post: - 7th July 2008, 20:17
  2. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  3. Hardware problem or what ?
    By Steve S. in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 4th March 2007, 21:39
  4. PicBasic Pro Math Problem??
    By Glen65 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th March 2006, 04:36
  5. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts