Zibb

Design Idea

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, 5/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.


Reed Business Information Resource Center

Featured Company


Related Resources

ADVERTISEMENT

ADVERTISEMENT

Feedback Loop


Post a CommentPost a Comment

There are no comments posted for this article.

Related Content

 

By This Author

There are no additional articles written by this author.


ADVERTISEMENT

Knowledge Center


Events

Microchip Worldwide Embedded Designer’s Forum
Dates: 10/6/2009 - 2/15/2010
Location: 120 Locations Worldwide

Microprocessor Test and Verification (MTV'09)
Dates: 12/7/2009 - 12/8/2009
Location: Austin, TX

Oxford University Practical RF/Microwave Design Short Course
Dates: 1/18/2010 - 1/22/2010
Location: Oxford, United Kingdom

Oxford University Digital Signal Processing Short Course
Dates: 1/25/2010 - 1/27/2010
Location: Oxford, United Kingdom

Oxford University Digital Signal Processing Implementation Short Course
Dates: 1/28/2010 - 1/28/2010
Location: Oxford, United Kingdom

Submit an EventSubmit an Event




Technology Quick Links

EDN Marketplace


©1997-2009 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy

Please visit these other Reed Business sites