problem with ds1620


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2005
    Posts
    44

    Default problem with ds1620

    i am using the pic 16f628.This is my code

    define OSC 4

    TEMP VAR WORD
    DQ VAR PORTA.2
    CLK0 VAR PORTA.0
    RST VAR PORTA.3
    REG VAR BYTE
    TRISA=0
    CMCON=%00000111


    LOOP:
    PAUSE 1000
    REG=0
    TEMP=0

    PAUSE 100


    RST=1
    SHIFTOUT DQ,CLK0,0, [$0C,$02]
    RST=0
    pause 10
    RST=1
    shiftout DQ,CLK0,0,[$EE]
    RST=0
    PAUSE 1000
    RST=1

    shiftout DQ,CLK0,0, [$AA]
    SHIFTIN DQ,CLK0,1, [TEMP\9]
    RST = 0

    TEMP=TEMP
    RST=1
    SHIFTOUT DQ,CLK0,0 ,[$01,$44]
    RST=0
    PAUSE 10
    RST=1
    SHIFTOUT DQ,CLK0,0 , [$A1]
    SHIFTIN DQ,CLK0,1, [REG\8]
    RST=0
    GOTO LOOP
    the problem is the value that i recieve is not the correct.and when i sent value for HT register and i ask later to read it it sent me wrong number.the number that gives me is 15 dec both temp and HT register
    can anyone hepl me.i am using also the microcode debuger and the clock it doesn't change from low to high.is this normal?

  2. #2
    Macgman2000's Avatar
    Macgman2000 Guest


    Did you find this post helpful? Yes | No

    Default problem with ds1620

    Have you tried to "Include modedefs.bas"


    Best Regards,
    Nick

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


    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.

  4. #4
    jojokatada's Avatar
    jojokatada Guest


    Did you find this post helpful? Yes | No

    Default owin

    PBP have new command owin which is much efficient than shiftout check my previous post i have complete but using pic16f84a

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Talking

    Hi, jojo

    Do you feel sure not to mix DS 1620 and DS 1820 ???

    I'm not so sure ...

    Alain

  6. #6
    jojokatada's Avatar
    jojokatada Guest


    Did you find this post helpful? Yes | No

    Thumbs up ds1620

    sorry i am wrong i thought ds1820

  7. #7
    sufian's Avatar
    sufian Guest


    Did you find this post helpful? Yes | No

    Exclamation are there anyone can answere

    Hi
    I designed a datacable for Ericsson T28
    I used a max3232 in this cable
    I connect the com of the computer to Ericsson though this cable
    and the result on the Hyper terminal was : the program of the mobile show on the hyper terminal and this program still forever .
    so when i try to send At commad the mobile don't response and still send the data of the program.
    are there anyone can help me and say to me how can i send the command from hyper terminal to Ericsson by this cable.
    please i want help as soon as posible.
    my email: [email protected]

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Sufian

    You can't ask that question here... look and read all this thread and you'll find all you need.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9
    Join Date
    Feb 2005
    Posts
    44


    Did you find this post helpful? Yes | No

    Default re

    Quote Originally Posted by Macgman2000
    Have you tried to "Include modedefs.bas"


    Best Regards,
    Nick

    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

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 : 1

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