Fast / low resolution A/D conversion


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Brussels, Belgium
    Posts
    104

    Default Fast / low resolution A/D conversion

    I'm considering an application which requires a 12F683 to perform a very fast A/D conversion - I don't need the full 10 bits the ADC normally supplies, probably just 4 bits of resolution is adequate. Reading the data sheet it says that if you terminate the conversion early (after say 5 TAD periods) nothing is stored. Is there a trick to get around this ?

    Andrew

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


    Did you find this post helpful? Yes | No

    Default

    How fast is enough? Do you detect some specific range/values, or just a threshold/single value?
    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,648


    Did you find this post helpful? Yes | No

    Wink

    Hi, Andrew

    Such use of ADCs are explained in the PIC Datasheets relevant chapters and Midrange Manual.

    Good explanation also from the great " Bigonoff " ( a good asm teacher from Belgium ) - in French !

    see Part 2 $19.6 ...

    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
    Feb 2006
    Location
    Brussels, Belgium
    Posts
    104


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi, Andrew

    Such use of ADCs are explained in the PIC Datasheets relevant chapters and Midrange Manual.

    Alain
    I couldn't find where to reduce the ADC resolution - can you be more explicit ?

    Andrew

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


    Did you find this post helpful? Yes | No

    Default

    You didn't search too much ...

    23.7.1 Faster Conversion - Lower Resolution Trade-off

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

  6. #6
    Join Date
    Feb 2006
    Location
    Brussels, Belgium
    Posts
    104


    Did you find this post helpful? Yes | No

    Default

    Or perhaps not looking in the right place. It doesn't refer to it in the device datasheet but does in the midrange manual.

    It's a pity you can't just stop the conversion after a certain number of bits.

    Anyway, thanks for pointing me in the right direction.

    Andrew

  7. #7
    Join Date
    Feb 2006
    Location
    Brussels, Belgium
    Posts
    104


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    How fast is enough? Do you detect some specific range/values, or just a threshold/single value?
    Application is to detect a change in light intensity caused by an object passing in front of a confocally illuminated machine vision lens. It is battery powered so I want a low duty cycle illumination but fast enough to detect moving subjects.

    What i'm thinking is a cycle that runs:

    1) Light on
    2) Pause enough for sampling cap to charge
    3) Start AD conversion
    4) Light off
    5) Interrupt on conversion complete and compare new intensity to old - GOTO event handler if significant change
    6) Pause and loop

    What I want is a total loop time of <1msec or less. I can run a TAD of 2usec so it would only be 22usec for the conversion which to be honest is probably way fast enough. It just seems wasteful to do a 10bit conversion when I only want 4 bits of data !

    Andrew

Similar Threads

  1. A/D conversion with PIC18F67J50
    By ScaleRobotics in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 8th May 2009, 01:48
  2. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 15:23
  3. A/D conversion problem in 18F2520, 2523, 2550 etc.
    By selimkara in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 10th March 2008, 16:26
  4. A/D converter fails?
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 13th February 2006, 18:57
  5. 4-line LCD Help - using PortA instead of B
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 31st March 2005, 03:14

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