Thursday, 25 May 2017


A microcontroller is a self-contained system with peripherals, memory and a processor that can be used as an embedded system. Most programmable microcontrollers that are used today are embedded in other consumer products or machinery including phones, peripherals, automobiles and household appliances for computer systems. Some embedded systems are more sophisticated, while others have minimal requirements for memory and programming length and a low software complexity. Input and output devices include solenoids, LCD displays, relays, switches and sensors for data like humidity, temperature or light level, etcs.
Programmable microcontrollers contain general purpose input/output pins. The number of these pins varies depending on the microcontroller. They can be configured to an input or an output state by software. When configured to an input state, these pins can be used to read external signals or sensors. When they are configured to the output state, they can drive external devices like LED displays and motors.

Microcontrollers are divided into categories according to their memory, architecture, bits and instruction sets. So let’s discuss types of microcontrollers:-


  • 8 bits microcontroller executes logic & arithmetic operations. Examples of 8 bits micro controller is Intel 8031/8051.
  • 16 bits microcontroller executes with greater accuracy and performance in contrast to 8-bit. Example of 16 bit microcontroller is Intel 8096.
  • 32 bits microcontroller is employed mainly in automatically controlled appliances such as office machines, implantable medical appliances, etc. It requires 32-bit instructions to carry out any logical or arithmetic function.


  • External Memory Microcontroller – When an embedded structure is built with a microcontroller which does not comprise of all the functioning blocks existing on a chip it is named as external memory microcontroller. For illustration- 8031 microcontroller does not have program memory on the chip.
  • Embedded Memory Microcontroller – When an embedded structure is built with a microcontroller which comprise of all the functioning blocks existing on a chip it is named as embedded memory microcontroller. For illustration- 8051 microcontroller has all program & data memory, counters & timers, interrupts, I/O ports and therefore its embedded memory microcontroller.

Instruction Set:

  • CISC- CISC means complex instruction set computer, it allows the user to apply 1 instruction as an alternative to many simple instructions.
  • RISC- RISC means Reduced Instruction Set Computers. RISC reduces the operation time by shortening the clock cycle per instruction.

Memory Architecture:

  • Harvard Memory Architecture Microcontroller
  • Von Neumann architecture Microcontroller
  • Princeton Memory Architecture Microcontroller

Microcontrollers are mostly used in following :
  • Mobile Phones
  • Auto Mobiles
  • CD/DVD Players
  • Washing Machines
  • Cameras
  • In Computers-> Modems and Keyboard Controllers
  • Security Alarms
  • Electronic Measurement Instruments.
  • Microwave Oven. etcs


Servo motor with STM32

I have already covered a tutorial about Pulse Width Modulation in STM32  HERE  and in this tutorial i am going to cover one of its applicat...