Google Analytics

Notices

When do you need a microcontroller?

Microcontrollers are fun. They are the heart and soul of many everyday appliances. And most of all, microcontrollers are easy to use and to design with, from the point of view of a designer. Figure 2.1 is the block diagram of what a typical modern microcontroller, and especially those in the AVR series, can do. The block in the center of the figure represents the microcontroller. It can interface to motors, a variety of displays as output devices, communicate to PCs, read external sensor values, even connect to a network of similar controllers, and it can do all that without a lot of extra components. This leads to a small and compact system that is more reliable and cost-effective (because of the fewer number of components and the fewer number of interconnections).

Looking at the needs, decide whether it can be done simply. It requires substantial investment of time, money, and effort to put together a reliable microcontroller-based system. The advantages are small overheads when upgrading the system with small changes. It also helps to keep the inventory to a relatively small number of components.

Possible alternatives are:

  1. A dedicated digital circuit,
  2. A digital circuit based on a PLD (programmable logic device),
  3. An application specific integrated circuit (ASIC) based implementation.

The above-mentioned alternatives to microprocessors are quite similar and differ in only the implementation. A dedicated digital circuit might use discrete ICs for the various logic functions (AND, OR, XOR, etc.) while a digital circuit based on a PLD would be more compact given the programmable nature of a PLD. A PLD contains an array of various logic function blocks, the user selects the required functionality, and the interconnection between these functional blocks at the design level, thereby achieving a more integrated and compact solution. A PLD has a substantial amount of hardware, of which only a fraction gets utilized in average applications. The ASIC solution is like a PLD except that it is an optimized implementation.

Figure 1.1

Figure 1.1 is the circuit diagram for implementing an hypothetical logic equation using individual digital ICs. These logic gates, as seen in Figure 1.1, are available in various logic families (TTL, CMOS, etc.). The figure illustrates the IC numbers for the TTL family. To implement this equation, we need 3 ICs with about 57 percent utilization (the 7404 IC has 6 gates and we have used 3 of them, while the 7408 and 7432 has 4 gates each, of which we have used 5 gates—8 gates in all out of 14 available gates, i.e., a utilization factor of .57). The same equation is now implemented using a PLD (such as 16L8).

Figure 1.2

Figure 1.2 illustrates the internals of a PLD implementation. Each intersection in the AND array represents an AND gate, while each intersection in the OR array represents an OR gate. For this solution, we only need 1 IC. The PLD in Figure 1.2 has about 150 gates, of which we have used only about 12, representing a mere 8 percent utilization! (The actual 16L8 if used for this circuit has more hardware than seen in Figure 1.2.) A PLD-based circuit is also more power-consuming than a comparable ASIC circuit, which is due to the redundant hardware on the PLD chip.

Figure 1.3

In contrast, a microprocessor-based (in fact an Atmel AVR processor-based) circuit is illustrated in Figure 1.3. It is as small as the PLD-based circuit, and in terms of power consumption, is better than a PLD circuit. In terms of speed, the PLD will perform much faster than a processor. Of course, for the microprocessor circuit to work correctly, it must be programmed correctly. The program to implement our logic equation is discussed in a later chapter.

While we are trying to portray the microprocessor circuit in a positive light, it is worthwhile to be able to remember the relative merits and demerits of each implementation. It is not that the microprocessor is the solution to all problems. Sometimes you need to use a PLD in conjunction with a processor, and sometimes a PLD alone is required. One such implementation of a processor and a PLD working together is the subject of a later.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>