12F508 and Dallas 1820 not working


Closed Thread
Results 1 to 14 of 14

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: 12F508 and Dallas 1820 not working

    Hi,

    The first thing is to be sure of your sensor ID ...

    The second ... to be sure the bytes are transmitted in the right sequence ( not swapped )

    from this point of view ... why not try to write and read to it skipping this ID. That could point closer to the reason your code doesn't work ...


    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #2
    Join Date
    Feb 2012
    Posts
    7


    Did you find this post helpful? Yes | No

    Default Re: 12F508 and Dallas 1820 not working

    Thank you again.

    The sensor ID is correct. I have tested the same sensor and the same piece of code with 16F876A using PortC.0, and I can read the sensor without any trouble. Hardware is ok, checked it carefully. Again my opinion is, that something is wrong with my code with GPIO.1. I am not an engineer, and I am not sure how these pins work in 12F508. When using 16F876A or 16F873 no special configuration is needeed. Just define:

    DQ var PortC.0

    and everything works.

  3. #3
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Re: 12F508 and Dallas 1820 not working

    Instead :
    TRISIO =%00000010 '???? maybe wrong?
    try :
    TRISGPIO + %00000010
    since I think don't exist TRISIO (see page 32 of datasheet : just TRISGPIO, TRISC, GPIO ....where GPIO is refferenced as PortB)

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