12f509 and DS18B20


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Posts
    35


    Did you find this post helpful? Yes | No

    Default Re: 12f509 and DS18B20

    Hi Richard,

    The code shown is for the 18F and yep the 12F doesn't support serout2.
    But the point I was making below, believe the issue I'm having is PORTA on the 18F is probably the same as the GPIO.X on the 12F
    Bottom line is I can't get the code you supplied on the 12F and trying to establish a baseline using the 18F

    Rob.

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,705


    Did you find this post helpful? Yes | No

    Default Re: 12f509 and DS18B20

    what i supplied does not actually do much other than prove that pbp can compile 12f509 code for a onewire device when a word var is declared as per
    My first issue, is the 12F509 won't accept the word as variable
    Bottom line is I can't get the code you supplied on the 12F and trying to establish a baseline using the 18F
    i cannot quite understand that statement. there is no point posting code for a 18f when you are trying to employ a 12f509
    post the actual code you are using [preferably in code tags]
    Warning I'm not a teacher

  3. #3
    Join Date
    Nov 2005
    Posts
    35


    Did you find this post helpful? Yes | No

    Default Re: 12f509 and DS18B20

    Yep correct.

    And sorry for wasting your time, I've got everthing I need working on a 18F45K20 now.
    Putting aside the extra legs to solder, for the extra $3 for this micro. makes sense to work with the 18f as I now have heaps of program space and no restriction on I/O pins etc.... plus it works!

    ciao and thanks anyway!

    Rob.

  4. #4
    Join Date
    Aug 2011
    Posts
    460


    Did you find this post helpful? Yes | No

    Default Re: 12f509 and DS18B20

    ...testing the code on a PIC18F45K20 and sensor works fine on PORTC or PORTD but can't seem to get any readings when configured using ports eithe port A, B or E
    That's probably because many pins on ports A, B, and E are also analog pins so the digital input buffer is disabled by default.
    See the ANSEL/ANSELH registers

  5. #5
    Join Date
    Nov 2005
    Posts
    35


    Did you find this post helpful? Yes | No

    Default Re: 12f509 and DS18B20

    Thanks Tubleweed!

    After your comment on the ANSEL/h after searching the datasheet on those registered, yep found that information buried in the doc.
    Haven't touched a PIC micro in years, I'm going through the relearning experience. You do forget how powerful and complex these devices are.


    Rob.

Similar Threads

  1. 12F509 doesn't do anything
    By madphys in forum General
    Replies: 2
    Last Post: - 31st January 2010, 10:00
  2. Timer and 12F509
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 3rd November 2008, 15:51
  3. 12f509 and OSCCAL
    By mwhatley in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 20th October 2007, 02:35
  4. how to use 12F509
    By marad73 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 30th April 2006, 22:49
  5. 12F509 programmer
    By Michael in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 3rd February 2006, 20:20

Members who have read this thread : 2

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