Module 1 : Introduction to Microcontrollers

Lecture 3: Processor Types & Memory Structures

Micro-coded and hard-coded processors:

The implementation of a computer architecture can be broadly achieved in two ways. A computer is a complex sequential digital circuit with both combinational and sequential circuit components. In a micro-coded processor, each instruction is realized by a number of steps that are implemented using small subroutines. These subroutines are called micro-codes stored within the instruction decode unit. Hence, a micro-coded processor can be called a processor within a processor.

Micro-coded processor:

Fig.3.1    Architecture of a Micro-Coded Processor

Let us take an example. The instruction "Move Acc, Reg" can be executed in the following steps.

  1. Output address to the data memory
  2. Configure the internal bus for data memory value to be stored in accumulator.
  3. Enable bus read.
  4. Store the data into the accumulator.
  5. Compare data read with zero or any other important condition and set bits in the STATUS register.
  6. Disable data bus.
Each step of the instruction is realized by a subroutine (micro-code). A set of bits in the instruction points to the memory where the micro-code for the instruction is located.

Advantages: - 1. Ease of fabrication.
                          2. Easy to debug.

Disadvantage: - Program execution takes longer time.

Hard coded processor:

Each instruction is realized by combinational and/or sequential digital circuits. The design is complex, hard to debug. However, the program execution is faster.

Fig  3.2    Architecture of a Hard - Coded Processor

Memory types

In a microcontroller, two types of memory are found. They are, program memory and data memory respectively.

Program memory is also known as 'control store' and 'firm ware'. It is non-volatile i.e, the memory content is not lost when the power goes off. Non-volatile memory is also called Read Only Memory(ROM). There are various types of ROM.

  1. Mask ROM: Some microcontrollers with ROM are programmed while they are still in the factory. This ROM is called Mask ROM. Since the microcontrollers with Mask ROM are used for specific application, there is no need to reprogram them. Some times, this type of manufacturing reduces the cost for bulk production.
  2. Reprogrammable program memory (or) Erasable PROM (EPROM): Microcontrollers with EPROM were introduced in late 1970's. These devices are electrically programmable but are erased with UV radiation. The construction of a EPROM memory cell is somewhat like a MOSFET but with a control and float semiconductor as shown in the figure.
Fig 3.3   Structure of an EPROM

In the unprogrammed state, the 'float' does not have any charge and the MOSFET is in the OFF state. To program the cell, the 'control' above the 'float' is raised to a high enough potential such that a charge leaks to the float through SiOinsulating layer. Hence a channel is formed between 'Source' and 'Drain' in the silicon substrate and the MOSFET ­­ becomes 'ON'. The charge in the 'float' remains for a long time (typically over 30 years). The charge can be removed by exposing the float to UV radiation. For UV erasable version, the packaging is done in a ceramic enclosure with a glass window.

Fig  3.4   UV erasable version of an EPROM
Usually, these versions of micro controllers are expensive.

3. OTP EPROM: One time programmable (OTP) EPROM based microcontrollers do not have any glass window for UV erasing.  These can be programmed only once. This type of packaging results in microcontroller that have the cost 10% of the microcontrollers with UV erase facility(i.e., 1/10th cost).

4. EEPROM: (Electrically Erasable Programmable ROM): This is similar to EPROM but the float charge can be removed electrically.

5.  FLASH (EEPROM Memory): FLASH memory was introduced by INTEL in late 1980's.  
This memory is similar to EEPROM but the cells in a FLASH memory are bussed so that they can be erased in a few clock cycles. Hence the reprogramming is faster.