element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Embedded Forum How does an analogue to binary converter work?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 5 replies
  • Answers 1 answer
  • Subscribers 483 subscribers
  • Views 791 views
  • Users 0 members are here
Related

How does an analogue to binary converter work?

Former Member
Former Member over 11 years ago

I've been searching for an answer for a while now but I still can't find an answer as to how microcontrollers can convert an analogue input to binary that it can understand, especially at the incredible speeds that they are able to.

 

If anyone could explain the methods or post a link to a circuit or other post I would be extremely grateful.

  • Sign in to reply
  • Cancel

Top Replies

  • johnbeetem
    johnbeetem over 11 years ago +2
    http://en.wikipedia.org/wiki/Analog-to-digital_converter
Parents
  • jc2048
    0 jc2048 over 10 years ago

    The A/Ds in most microcontrollers work a bit at a time (successive approximation). Although they might seem fast, in electronic terms they are relatively slow; if you wanted to digitise video, for example, you'd use a fast flash converter not successive approximation.

     

    When I say 'a bit at a time' I mean that literally. First step is to compare the input with half the reference voltage. If it's higher the most significant bit of the result is 1, if it's lower it's a 0. If the result was 0, the input is compared with half of a half (a quarter) and the result becomes the next bit. If the result was 1 the input is compared with a half plus a half of a half (threequarters). And so on until the result is complete, with each result controlling the next one. If it's a 10-bit A/D there will be 10 steps. In terms of hardware it's conceptually quite simple - a comparator and a way of generating all the levels and switching them to the comparator at the appropriate time. (Simple for a chip designer - if you built one on a breadboard you probably wouldn't want do more than 3 or 4 bits.) If you think about it for a moment, you'll realise that the part that generates the levels is actually a D/A. It's called successive approximation because at each step it's doing a better and better approximation to the result. You could stop part way through and your result would be the right result for the number of bits you'd done. (You can also think of it as being a kind of binary search because there are two outcomes at each step.) As to the exact details of how it's done in a chip, I couldn't tell you.

     

    A simpler (and slower) scheme is to use the comparator and the D/A but just ramp the D/A level until it matches the input, but that takes a variable number of steps (for 10 bits, the average would be 512 steps but it might be as many as 1024). A much faster scheme is to have a comparator for each level (1024 of them for 10 bits) and do all the comparisons at once with encoding logic to generate the binary output from all the outcomes.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • jc2048
    0 jc2048 over 10 years ago

    The A/Ds in most microcontrollers work a bit at a time (successive approximation). Although they might seem fast, in electronic terms they are relatively slow; if you wanted to digitise video, for example, you'd use a fast flash converter not successive approximation.

     

    When I say 'a bit at a time' I mean that literally. First step is to compare the input with half the reference voltage. If it's higher the most significant bit of the result is 1, if it's lower it's a 0. If the result was 0, the input is compared with half of a half (a quarter) and the result becomes the next bit. If the result was 1 the input is compared with a half plus a half of a half (threequarters). And so on until the result is complete, with each result controlling the next one. If it's a 10-bit A/D there will be 10 steps. In terms of hardware it's conceptually quite simple - a comparator and a way of generating all the levels and switching them to the comparator at the appropriate time. (Simple for a chip designer - if you built one on a breadboard you probably wouldn't want do more than 3 or 4 bits.) If you think about it for a moment, you'll realise that the part that generates the levels is actually a D/A. It's called successive approximation because at each step it's doing a better and better approximation to the result. You could stop part way through and your result would be the right result for the number of bits you'd done. (You can also think of it as being a kind of binary search because there are two outcomes at each step.) As to the exact details of how it's done in a chip, I couldn't tell you.

     

    A simpler (and slower) scheme is to use the comparator and the D/A but just ramp the D/A level until it matches the input, but that takes a variable number of steps (for 10 bits, the average would be 512 steps but it might be as many as 1024). A much faster scheme is to have a comparator for each level (1024 of them for 10 bits) and do all the comparisons at once with encoding logic to generate the binary output from all the outcomes.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube