Delta-Sigma-ADC in Assembler embedded in PBP, increasing resolution


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Post

    Result_h is the high byte(8bits) of the wordsized(16bits) result. Result_l holds the lower 8 bits.

  2. #2
    Join Date
    Aug 2006
    Location
    In a world of german electrons
    Posts
    102


    Did you find this post helpful? Yes | No

    Default

    I don't understand this. How do you combine these two to get a Dez-number between 0 and 1023 ?

  3. #3
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Red face

    Ok, time for somebody else to step in. I don't have the patience, time and/or languageskills to explain how hex, binary and decimal correlates. I recommend that you buy a book that expalins the basics of "microcontrolling". Can't give you any advice on good books since i haven't needed one for 20 years.

    Good luck
    /Ingvar

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default

    Hi,
    Haven't followed this from the beginning but I'll jump in here real quick.

    A word is 16bits. A byte is 8bits. A word consists of 2bytes a high and a low. To combine 2 bytes into a word you can do:
    Code:
    MyWordResult var WORD
    
    MyWordResult = Result_h * 256 + Result_l
    HSEROUT [#MyWordResult,10]
    If Result_h is 100 in decimal and Result_l is 25 in decimal. Your result would be 25625 in decimal. Or if you like in binary.

    Code:
             H I G H     L  O  W
             B Y T E     B Y T E
    MSB---> 01100100  00011001 <----LSB
    See? The high byte is 100 and the low byte is 25.

    Since the most significant bit in the low byte equals to 128 the least significant bit in the high byte equals to 256. That is why you multiply the highbyte by 256.

    Or seeing it as 16bit word:

    LSB MSB
    1+0+0+8+16+0+0+0+0+0+1024+0+0+8192+16384+0 = 25625

    /Henrik Olsson.
    Last edited by HenrikOlsson; - 3rd October 2006 at 12:08.

  5. #5
    Join Date
    Aug 2006
    Location
    In a world of german electrons
    Posts
    102


    Did you find this post helpful? Yes | No

    Default

    MyWordResult = Result_h * 256 + Result_l
    This is what I was looking for. Plain and simple. Thank you.

Similar Threads

  1. Delta Sigma ADC is inverting
    By selbstdual in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th January 2007, 15:35

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