Read DS18S20


Closed Thread
Results 1 to 17 of 17

Thread: Read DS18S20

Hybrid View

  1. #1
    Join Date
    Dec 2007
    Location
    Sweden
    Posts
    73

    Question Read DS18S20

    Hi all.

    Short time ago I found this code posted by CocaColaKid “ReadDS18S20” in this thread: http://www.picbasic.co.uk/forum/show...hlight=DS18S20
    Very neat I thought until I discovered that the STR function is not supported for 16FXXX, too bad. I have searched and found other pieces of code but they all seems to have a different approach to the task and I felt I could understand this code better. The PBP manual is not very helpful on OW and my question is what do I need to be change (and why) in this code to make it compile for the 16F688?

    Thanks!

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by PICante View Post
    Very neat I thought until I discovered that the STR function is not supported for 16FXXX, too bad
    Double check your manual...and compare what it says to the datasheet for the 16F688.
    'cause it looks to me like everybody in that other thread is using a 16Fxxxx series PIC and nobody is using an 18F.

  3. #3
    Join Date
    Dec 2007
    Location
    Sweden
    Posts
    73


    Did you find this post helpful? Yes | No

    Default

    Hi skimask!

    Sorry, I’m somewhat confused here I don’t know what to believe in (of curse I believe in you!) since I also got a compilation error saying: “ERROR: Macro OWINSTR?W not found in macro file.”

    Huuh?


    Edit: Hey… it’s the other way around, it says 12-bits not supported! (found my glasses) :-) . Then (as usual) I must be doing something else wrong!
    Last edited by PICante; - 18th September 2008 at 17:46.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by PICante View Post
    since I also got a compilation error saying: “ERROR: Macro OWINSTR?W not found in macro file.”
    The latest PBP update should fix that problem.
    If not, there's a thread somewhere around here relating a problem similar to that..somewhere...

    Edit: Hey… it’s the other way around, it says 14-bits not supported! (found my glasses) :-) . Then (as usual) I must be doing something else wrong!
    I don't know which manual you're reading.
    My manual says 12-bits aren't supported using the REP and STR modifiers. I'd tend to believe that due to the stack/ram constraints of 12 bit devices.

  5. #5
    Join Date
    Dec 2007
    Location
    Sweden
    Posts
    73


    Did you find this post helpful? Yes | No

    Default

    Yes, my manual also says 12-bit. edited almost instantaneously! :-)

    I have got the P250a patch installed, can’t seem to find any newer?

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by PICante View Post
    Yes, my manual also says 12-bit. edited almost instantaneously! :-)

    I have got the P250a patch installed, can’t seem to find any newer?
    There's a b patch out now.

    Show the code...

Similar Threads

  1. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 14:46
  2. Cleaning up code
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2009, 07:14
  3. Replies: 13
    Last Post: - 12th May 2009, 17:26
  4. SEROUT WORD variable problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th April 2009, 11:20
  5. Q: using MCLR for Input on 12F683
    By picster in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 31st January 2009, 15:25

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