A2D issues on PIC16F876A


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Location
    Houston, TX
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    they are all WORD length
    Padawan-78

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    The RXM RSSI only outputs ~16mV/dB, so a big noise factor should really make this reading swing all over the page.

    Shouldn't this be I=H*2 to show battery voltage?
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Code:
        ADCIN PORTA.0, sig1
        ADCIN PORTA.1, VALUE1
    Should be ...
    Code:
        ADCIN 0, sig1
        ADCIN 1, VALUE1
    DT

  4. #4
    Join Date
    Jan 2007
    Location
    Houston, TX
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    Bruce,
    to answer your question, yep the code should read
    Code:
     I=H*2
    However, the voltage level looked like half the amount (3~4.4VDC) floating all over the place instead of a consistent (~8.9VDC) or so. I included I=H*4 for better resolution.

    DT,
    I will try making the changes to channels,
    thanks,
    ~still stumped.
    Padawan-78

  5. #5
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Darrels' note on using the correct arguments with ADCIN should cure it. Using the port bit
    reference doesn't set it to the correct channel, so that's the major issue.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  6. #6
    Join Date
    Jan 2007
    Location
    Houston, TX
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    Thanks
    DT & Bruce,
    You were right about the channel numbers, Don't know were I got the idea to use "porta.?" instead of the # itself. Anyway all is well now. thanks again!
    Padawan-78

Similar Threads

  1. Solved: notes on annoying little issues
    By Probotics in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 26th May 2008, 21:02
  2. Circuit reliability issues
    By hkpatrice in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd November 2007, 15:55
  3. Migrating PIC16F876a to PIC18F252
    By cohenjdc in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st June 2007, 14:55
  4. Runing a PIc16F876A
    By lerameur in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 7th January 2007, 13:54
  5. how to get PCF8574 and PIC16F876A work together
    By nomada in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th December 2004, 03:07

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