10 Bit A-D Numbers


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2005
    Posts
    67

    Question 10 Bit A-D Numbers

    Hi, I am using an A-D Conversion with A-D set at 10 bits.
    I seem to be getting numbers from 0 - ~64000.
    I thought it should be 0 - 1024 ?
    What could I being doing amiss ?
    I am using the converted number variable as a word, could this be why?
    thnks
    Pete
    Pete

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


    Did you find this post helpful? Yes | No

    Default

    unless you give your code, we can't and we don't want to bet on what are the possible cause of it.
    Steve

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

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


    Did you find this post helpful? Yes | No

    Talking Datasheet !!!

    Hi, Steve

    That smells hard a Forgotten Right Justification config ....

    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 " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

    Default

    shhhhut! Shure it could be that or just forgotten bit shifting, depending the method used

    ...mmm sounds the same... i really need to go to sleep. Bonne nuit a la France
    Last edited by mister_e; - 30th April 2006 at 09:46.
    Steve

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

  5. #5
    Join Date
    Feb 2005
    Posts
    67


    Did you find this post helpful? Yes | No

    Talking Of Course Of Course!!

    Hi,

    Just,

    I need to write code when I am awake.

    I have left justified, thus adressh is bits 3 -10 (0 - 7) and address l is bits 1 -2 (6 -7), thus

    values is from 00000000(h) 00000000(l), 00 00 hex , 0000 decimal
    to 11111111(h) 11000000(l), FF C0 hex , 65472 decimal

    Where if I had right justified, thus adressh is bits 9 - 10 (0 - 1) and address l is bits 1 - 8 (0 - 7), thus

    values is from 00000000(h) 00000000(l), 00 00 hex , 0000 decimal
    to 00000011(h) 11111111(l), 03 FF hex , 1023 decimal

    thks

    Peter
    Pete

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. Sleep Mode
    By Pesticida in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th March 2008, 10:31
  3. PICBasic newbie problem
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 12th February 2008, 00:55
  4. Need help with 16f819 10 bit ADC
    By bannrikae in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 26th September 2005, 15:20
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07

Members who have read this thread : 1

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