MCP6271R Microchip Technology Inc., MCP6271R Datasheet - Page 34

no-image

MCP6271R

Manufacturer Part Number
MCP6271R
Description
170 ?a, 2 Mhz Rail-to-rail Op Amp
Manufacturer
Microchip Technology Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
MCP6271RT-E/OT
Manufacturer:
MCHP
Quantity:
6 004
Part Number:
MCP6271RT-E/OT
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Muxing Your Micro With Style
By Bonnie C. Baker, Microchip Technology Inc.
Connecting external peripherals into your controller or processor
is easy enough. You connect a processor I/O pin to each external
peripheral. You then have independent control of each peripheral.
Common peripherals are push-button switches or LEDs (Light
Emitting Diodes). In reality, your controller or processor can
connect to a larger variety of peripherals than listed here.
The trick is to use a microcontroller or microprocessor that
has enough pins to connect to all the required peripherals.
Unfortunately, each added peripheral translates to an additional
device pin, which usually means into a higher application
circuit cost. If you limit the number of pins on the processor or
controller to limit cost, you have to use discretion as you add
peripherals. This conflict between cost of controller/processor
and number of required peripherals can present a difficult design
problem.
The clever designer can work around these limitations. Adding an
external multiplexer is a good first defensive move. If you use an
external multiplexer, you can dramatically reduce the pin-count
requirements for your controller or processor. You might exclaim
that your cost model for your circuit does not allow the addition
of another device. This is a legitimate concern. So maybe this
first suggestion is not the right solution for you.
Rather than playing defense, consider changing to the offensive
team. An external multiplexer is still thinking inside the “box.”
The box that I am referring to is a device-oriented box. In other
words, the premise is that adding a function implies adding
a device. Consider an offensive move in which you solve this
problem with an “out-of-the-box” solution. Figure 1 illustrates an
alternative using this type of design strategy.
Figure 1: Two simple R/C networks connects six push buttons
to a controller or processor. Pressing a push-button discharges
the voltage from the capacitor through the resistor to ground.
An alternative circuit connects each push-button to its own
microcontroller or microprocessor pin.
32
Analog and Interface Guide – Volume 2
Miscellaneous Articles
Microcontroller or
Microprocessor
In Figure 1 there are six push buttons attached to two ports
of a microcontroller or microprocessor. This “outside the box”
design approach reduces your required pin count from six down
to two for the push-button functions. The circuit operates by first
connecting pin 1 to the voltage reference. By biasing the voltage
reference to its highest voltage, the capacitor, C, charges to its
full positive value. After C is fully charged, the controller code
then disconnects the voltage reference from the non-inverting
input of the comparator. Unless the user presses one of the push
buttons, the non-inverting input of the comparator will remain
high during the duration of the test. If the user does press a
button, the voltage at pin 1 discharges over time to zero. The
time constant of this discharge is equal to (1/((x+1)RC) for a
single push-button, where x is the multiple of the resistors. At
that time, the voltage reference at the inverting port voltage
of the comparator (pin 2) is approximately ¼ V
discharge time, the timer on the output of the comparator counts
out the time required to toggle the output of the comparator from
high to low. By using a look-up table, you can identify the push
button or combination of push buttons in use. Testing the status
of PB
status of PB
Now imagine that you have a larger variety of peripherals in your
application. With only two pins used, the other pins are available
for additional peripherals. This multiplexing technique is portable
to a variety of peripherals connected to the same pins. If your
controller or processor has an internal comparator, voltage
reference and timer, you can use resistors and capacitors as your
external, low-cost “multiplexer”.
1
, PB
2
or PB
4
, PB
3
5
and PB
uses this algorithm. Alternatively, testing the
6
uses a similar algorithm.
DD
. During the

Related parts for MCP6271R