Strange ADC behaviour


Closed Thread
Results 1 to 29 of 29

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    EDIT: let me see...
    Steve

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

  2. #2


    Did you find this post helpful? Yes | No

    Default

    i get

    voltage = 2.49
    temp = 1.25

    .

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


    Did you find this post helpful? Yes | No

    Default

    mmm, must be too drunk and blind now..
    what if you add
    Code:
    ansel=3
    trisa=3
    at the top of your code?

    what if you forget the decimal point but use
    Code:
    lcdout $fe,2,"VOLTAGE..",dec volt," V"
    lcdout $fe,$c0,"TEMP.....",dec temp," C"
    instead?
    Last edited by mister_e; - 7th December 2007 at 21:23.
    Steve

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

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Code:
    lcdout $fe,2,"VOLTAGE..",dec volt," V"
    lcdout $fe,$c0,"TEMP.....",dec temp," C"
    [/QUOTE]

    Shouldn't that be dec (volt/100) and dec (volt // 100) above?

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Thanks for the help

    The code is correct like Mister-e posted because the reading values are 0.xx and with the /100 i would have just 0 !

    Changed everything but i still get

    porta.1 = 17
    and
    porta.0 = 0

    changing each other i still get the same on lcd

    .

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


    Did you find this post helpful? Yes | No

    Default

    out of curiosity, which version of PBP are you using? i've never ever used ADCIN in my program since over 5-6 years.

    I may bet on some averaging... but i hate to bet on friday
    Steve

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

  7. #7


    Did you find this post helpful? Yes | No

    Default

    My version is 2.47

    But i will try a 2nd pic now and see...

    .

  8. #8


    Did you find this post helpful? Yes | No

    Default

    Tryed a 2nd pic but same result...

    it's not a pic failure

    .

Similar Threads

  1. Strange Behaviour - Simple code+DT_INT+16F676
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th February 2010, 19:53
  2. Strange behaviour of my PBP code.
    By Fredrick in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 24th August 2009, 21:20
  3. Strange Serout Behaviour
    By bluesmoke in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th August 2009, 05:12
  4. Strange behaviour from PIC16F877 on TMR0
    By mikebar in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 19th August 2006, 02:31
  5. strange int behaviour
    By tom in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th November 2005, 16:41

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