Subscribe to EDN
RSS
Reprints/License
Print
Email

Microcontroller provides low-cost analog-to-digital conversion, drives seven-segment displays

Versatile conversion circuit detects and displays signal's peak value.

Name withheld by author’s request; Edited by Charles H Small and Fran Granville -- EDN, May 10, 2007

A previous Design Idea demonstrated how to use shift registers to increase a microcontroller’s output capabilities (Reference 1). This expanded Design Idea provides low-cost analog-to-digital conversion and a three-digit, seven-segment display. Although applicable to other microcontrollers, the circuit in Figure 1 uses a Microchip PIC12F675 controller and three multiply sourced 74AC164 serial-input/parallel-output shift registers.

The circuit accepts incoming signals of 0 to 5V. The microcontroller, IC1, performs the analog-to-digital conversion and subsequently converts the binary-voltage value to BCD (binary-coded-decimal) format. Next, the microcontroller converts the BCD values to hardware-specific seven-segment-display masks and shifts the masks to the 74AC164 registers, IC2 through IC4, which in turn drive the seven-segment displays.

Listing 1 implements an additional function. Instead of displaying each input value as it’s converted, the microcontroller operates as a peak detector. When the maximum value changes, the microcontroller updates the three-digit display. A pushbutton switch, S1, resets the maximum value. You can modify the code to apply other functions to the input data and calculate and display the data in other formats. In addition, you can modify the interrupt-driven conversion process to accommodate different sampling rates. When you modify the sampling rate or the ISR (interrupt-service routine), ensure that the ISR completes execution within a single sample period.


Reference
  1. Raynus, Abel, “Squeeze extra outputs from a pin-limited micro-controller,”EDN, Aug 4, 2005, pg 96.

RSS
Reprints/License
Print
Email
Talkback
Canon Resource Center

Featured Company


Most Recent Resources

Advertisement
Related Content

No related content found.

  • 0 rated items found.
Advertisement

KNOWLEDGE CENTER

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
Engineering Careers
Jobs sponsored by
Advertisement
About EDN   |   Site Map   |   Contact Us   |   Subscription   |   RSS
© 2012 UBM Electronics. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy

Please visit these other UBM Canon sites

UBM Canon | Design News | Test & Measurement World | Packaging Digest | EDN | Qmed | Pharmalive | Appliance Magazine | Plastics Today | Powder Bulk Solids | Canon Trade Shows