Essential Requirements of a Microcontroller

0

Just like humans need oxygen, water and food to survive, each controller has some essential needs which has to be fulfilled so that it can start up and execute the program properly.

Power supply

Without a power supply, no electrical/electronic component can run. Each power supply has a positive and negative part. Current flows from the positive to the negative terminal. From the pin configuration of the controller(available in the datasheet of the controller), we have to find out the power supply pins of the chip. These are usually marked using the symbols Vcc, Gnd or Vdd, Vee, Vss.

Historically, the IC’s based on BJT technology (TTL IC’s) used the notations Vcc (positive supply), Vee(negative supply), Gnd(Ground). And the CMOS IC’s which used FET Technology used the notations Vdd(positive supply), Vss(Negative supply). But nowadays, most datasheets carry the Vcc/Vee terminology.

[TTL – Transistor Transistor Logic, CMOS – Complementary metal oxide semiconductor, BJT – Bipolar Junction Transistor, FET – Field Effect Transistor]

 

Logic Family

Positive Supply

Negative Supply

TTL

Vcc

Vee, Gnd

CMOS

Vdd

Vss

 

Normal household electrical appliances (fan, refrigerator, TV, washing machine) run on AC (alternating current) supply. But microcontrollers cannot withstand alternating supplies. They have to be fed filtered DC(direct current). These are sensitive components. They cannot handle power spikes. Usually they will either restart or cause some erroneous behavior if there are spikes in the supply.

Efficient filtering can be done by using R-C or L-C low pass/band pass filter circuits. But there are some drawbacks of using resistance(R) or inductance (L) in the circuit.

Drawbacks of using resistances in filter:

  • Resistances dissipate energy in the form of heat. Therefore the device will be very energy inefficient if resistances are used for filters.
  • There will be a voltage drop across the resistor diminishing the voltage available to the device.

Inductors act as very good filters. They resist any change in current. And so spikes are filtered out and smooth output is obtained. One can easily make an inductor by coiling a wire around a pencil/pen/stick(which acts as the core). But the inductance of the component will be unknown then.

  • Inductance can be measured only using L-C-R meters and not the normal multimeters.
  • But inductors are not as easily available as resistors or capacitors and so are costlier than those two.
  • Since it is the inductors property to resist any change in current flowing through it, when the circuit is switched on, it takes some time to reach the maximum value of current. This may cause problems during start up of microcontrollers. Usually they operating window is very small(operating voltage +- 0.5V). Outside this range, the output may not be stable. With the improvement in design and manufacturing practices, the operating window has been widened in recent times(operating voltage +- 1.5V) but still there may be problems if large value of inductance is used.
  • The shutdown time of the circuit will also increase if inductors are used(reason same as above).

Due to these reasons, only capacitors are usually used for filtering out spikes. Normal design practice is to use 1 capacitor to filter out noise of high frequency and another capacitor of a different value to filter out low frequency noise.

power supply circuit

Oscillator

Oscillator provides clock signal to the different components inside the IC. This signal is used to synchronize the operation of the components.

In everyday life, we use a clock, be it our wrist watch, mobile clock or wall clock to synchronize our activities. If the TV guide says that a program starts at 8 PM, we make a mental note of the time. When 8 PM comes, we switch on the TV and start watching the program.

In a similar manner, the circuits are synchronized using the common clock signal provided by the oscillator.

In older controllers, external oscillators (ceramic or crystal type oscillators) were used. But nowadays many controllers include an oscillator in the IC itself. Usually it is an RC oscillator. Previously on-chip oscillators were not used since the values of R & C at such miniature levels could not be properly controlled. So they used to be very inaccurate (rated value +- 10%). But with advances in VLSI(Very Large Scale Integration) design, on-chip oscillators with tolerance levels of 1% and even lower can be manufactured at low cost. But even now, in products where precise timing is required, using external oscillators is the better option.

For more information about RC oscillators: http://www.electronics-tutorials.ws/oscillator/rc_oscillator.html

In datasheets, the pins at which oscillators have to be attached is usually marked with the symbols OSC1, OSC2.

crystal oscillator symbol

External Reset circuit

Resetting a microcontroller means forcing the program to stop execution and start from the beginning of the program. All temporary variables are usually destroyed and the registers cleared. External reset button is a very important component. During emergency conditions, it restarts the program.

When reset signal is applied, the microcontroller goes off and remains in that state until the reset signal is removed.

When a circuit is switched on, there are lots of spikes in the power supply. If the controller starts executing the program at this moment, it may run a few steps and then hang when it encounters a voltage dip. The only way to resume normal processing of the program is to reset the microcontroller. A simple method of avoiding this nasty condition is to keep the controller in off state until the time the power supply becomes stable. For this task, a Power On Reset circuit is used. The most common implementation of this is using a RC circuit and Schmitt Trigger. Value of R & C is chosen in such a way that the time constant of the circuit is more than the time taken for the power supply to attain stable state. After that, output of the Schmitt trigger changes and the controller starts normal operation.

This is a very simple implementation though. It has many pitfalls and should not be used in industrial products (life support systems, space applications, process control etc). Check out this link: http://www.sigcon.com/Pubs/edn/por.htm to know more about why this kind of design should not be used in industrial products.

The reset pin is marked in the datasheet using the symbol’s – RESET(Atmel), RST(TI MSP430), MCLR(Microchip PIC).

Share.

About Author

The author is a final year student of Electrical Engineering and has keen interest in Embedded Systems, PLC, Digital Electronics, Python, C.

Leave A Reply