Electronic Design

  
Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


[Ideas For Design]
Multiplexer Restores Analog Inputs To Flash Microcontroller

Roger Fischer  |   ED Online ID #1257  |   March 6, 2000


The Microchip PIC16F877 microcontroller provides data acquisition, digital I/O, and parallel port communication in an easy-to-use package. However, by design, if the parallel slave port is used, the analog input channels 5 through 7 aren't available.

The circuit shown in Figure 1 restores these analog inputs by adding a 74HC4053 multiplexer IC and one resistor. Notice that resistor R1 is required because port RA4 of the flash microcontroller is an open-drain output

Regaining the use of these analog inputs does require some additional hardware and software overhead. The user must disable the parallel slave port when reading the analog inputs. This should not present a problem. In a typical data-acquisition application, all eight channels are read. Then the results are passed on via the parallel slave port.

Adding the multiplexer does add between 40 and 100 Ù of series resistance to these inputs. Using an appropriate op amp to condition these inputs will eliminate this as a design issue.

The code listing provides the two subroutines necessary for enabling and disabling readings from analog input channels 5 through 7. Note that these subroutines are sufficient for analog-to-digital conversions based on polling the GO/DONE bit of ADCON0. If interrupt-based A/D conversions are used, however, it would be necessary to disable the A/D interrupt to use the parallel slave port, and enable it to use the analog-to-digital converter.

The circuit and code listing provided have been tested using an IBM PC and one of its printer ports for parallel communication. To do this, additional circuitry is required to complete the interface. Also, the microcontroller must be stepped through desired functions. A Windows-based demonstration program, using parallel port 0378H and displaying all eight analog inputs, is available from the author.


Reprints   Printer-Friendly  Email this Article  RSS    Font Size   What's This?


  • Network-On-Chip Tools Arrive for The Masses
  • Tackling System Design Challenges Through Early Verification
  • ESL Tools Take Center Stage As Designers Move Up
  • Parasitic Extraction Tool Targets Next-Generation Custom ICs
  • Synopsys Jumps Into ESL-Synthesis Pool
  • Verify Control Systems Before Committing To Hardware
  • You're Using How Many FPGAs?
  • Tool Up For The FPGA Blitz
    1) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (181 views today)
    2) Hot Hands For Some Cool Rock: Motion Sensing Meets Audio Engineering
    (167 views today)
    3) What's All This Transimpedance Amplifier Stuff, Anyhow? (Part 1)
    (72 views today)
    4) GPS-Derived Grandmaster Clock Delivers Ultra-Precise Time And Frequency Sync
    (70 views today)
    5) Downconverting Mixers Lower Power Consumption While Improving Performance
    (55 views today)
    ALL TOP 20



    POST YOUR COMMENTS HERE
    Name:

    Email:
    Your Comments:

    Enter the text from the image below


    Please refresh the page if you have trouble reading this text.

    Search Electronic Design
         
      
     
    Email Newsletter
    Sponsored By:
    Electronic Design UPDATE provides readers with late-breaking news, opinions from industry experts, and timely technology stories. It's a unique opportunity to get your product message in front of engineers, engineering managers, and corporate managers while they're reading about critical information online.

    Enter Email to Subscribe
      

    Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
    Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources