Getting Started with Microcontrollers

0
2018

Generally we are listing two words like Microprocessor and Microcontroller in this digital world. Today’s world completely depended on microprocessors and microcontrollers. So we have to know about microprocessor microcontroller. First what is a microprocessor? A Microprocessor is a digital integrated circuit which is used in general computer and having the millions of transistors, resistors and other electronic components incorporate in as single small IC. The microprocessor works as CPU (central processing unit) of the computer. The microprocessor is designed to support a set of multiple peripheral like USB ports, video ports, audio ports, network interfaces like Ethernet, WI-Fi, Bluetooth, additional memory interfaces like CD/DVD ROM, magnetic disc drives and SD/MMC external interfaces. The microprocessor chip will work with the integration of memory devices, input and output peripherals only. The first commercial microprocessor is Intel 4004 which is designed by the Intel Corporation in 1971. This is a 4-bit microprocessor available in 16-pin duel in-line package. The successor versions of microprocessors are Intel 4040, 8008, 8085, 8086, etc. Generally microprocessors are used in personal computer systems.

Next what is a microcontroller? A Microcontroller is also a digital integrated circuit but used in some specific applications only. This is a small computer having processor core, memory elements and programmable input/output modules present in the single integrated circuit only. Both combinational circuits and sequential circuits are present inside the microcontroller. Combinational circuits are designed with logic gates to perform logical operations. The sequential circuits are interconnection of combinational circuits and memory or storage elements. Those are counters, flip-flops, etc. Microcontrollers are using in embedded systems. The 1st microcontroller TMS1000 is designed in 1971 by Smithsonian institution. It is having the on-chip peripherals like ROM, RAM, Processor and clock. Microcontrollers are programmable devices. Microcontrollers are mostly used in embedded systems, engineering projects. There are so many microcontroller families are available. Those are 8051, PIC, AVR, ARM, etc.

8051:

8051 manufactured in 1985. This is an 8-bit microcontroller. The width of the register represents the bit number of microcontroller. For example 89C51 has 8-bit register, so 89C51 is 8-bit microcontroller. In this you can store numbers from 0 to 255, in hexadecimal it is represented as 0x00 to 0xFF. Coming to the instruction set 8051 has 250 instructions which take 1 to 4 machine cycles to execute. The speed of the 8051 microcontroller is 1 million instructions per second. 8051 has powerful instruction set; it has commands which perform more complex calculations. The ALU of the 8051 makes computations simple. In 8051 family there is no inbuilt memory bus and A/D converters. 8051 microcontroller has 32 I/O pins, timers/counters, interrupts and UART’s.

[Also Check: 8051 Microcontroller Projects]

AVR:

AVR is an 8-bit RISC architecture microcontroller. This is available from 1996 onwards only. There are 16-bit and 32-bit microcontrollers also available in the same family. RISC means Reduced Instruction Set Computer. AVR has 140 instructions which are all 1 cycle based instructions. By default AVR microcontrollers operate with the 1 MHz clock cycle. The speed of AVR microcontroller is 12 million instructions per second. AVR family microcontroller has on-chip boot-loader. By this we can program our microcontroller easily without any external programmer. AVR controllers has number of I/O ports, timers/counters, interrupts, A/D converters, USART, I2C interfaces, PWM channels, on-chip analog comparators.

[Also Check: AVR Microcontroller Projects]

PIC:

PIC (Programmable interface controller) microcontrollers are available in 3 different architectures. Those are 8-bit, 16-bit and 32-bit microcontrollers. PIC has nearly 40 instructions which all are take 4 clock cycles to execute. The speed of the PIC controller is 3 million instructions per second. The programming part of the PIC microcontroller is very hard. So those who entering into embedded world freshly this is not preferable for them. It has on-chip peripherals like SPI, ADC, I2C, UART, analog comparator, internal RC oscillator, in-system programmability, etc.

[Also Check: PIC Microcontroller Projects]

ARM:

At the time of manufacturing ARM was named as Acorn RISC Machine. Later ARM limited was established in1990. From then onwards ARM renamed as Advanced RISC machine. This is the advanced RISC controller. Most of the industries get license from ARM limited. ARM has the features like load-store architecture, fixed-length instruction set and 3-address instruction format. It has 32-bit ARM instruction set and 16-bit Thumb compressed instruction set. So many on-chip peripheral are there and on-chip debugger, on-chip boot loaders, on-chip RTC, DAC also available.

How to select a microcontroller for our applications?

We have so many microcontrollers available. From those controllers selecting a proper controller for our application need is important thing. First we have to know about what is our application, what are the requirements for that particular application. How many inputs & outputs are requiring for the particular application and what are the inputs and outputs. Before going to select the controller device, first we want to select proper microcontroller family. If your beginner to the embedded systems & microcontrollers, 8051 family is very sufficient for you because 8051 is the basic microcontroller and easy learn and program. If you have some knowledge about microcontrollers and programming, you can select any of other family of microcontroller reaches your requirements.

Let us take an example, we want to build a line-follower robot and we are new to embedded systems. Then 8051 family microcontroller is sufficient for us. But in 8051 so many controllers are there like 89C51, 89C52, 89S51, 89S52, 89C55, 89C2051, 89C1051, 89C4051, 89S53, etc. In these controllers we have to select a proper controller for our application. For suppose if we select 89C51 it is a basic controller and have 32 programmable I/O lines, 4kb flash memory and etc. Apart from that first we list-out our requirements. We require 4-output lines to drive DC motors, 2-input lines for connecting IR source to follow the line. Total we require 6 I/O lines. The code density is also low due to the less number of components, so memory requirement is less. In the above mentioned controllers 89C1051, 89C2051 are sufficient, because those controllers have 20 pin configuration, 15 programmable I/O lines, 2.7 to 5.5V operating range. But the advantage of 89C2051 over the 89C1051 is: it has 2k ISP flash memory (in system programmable), programmable UART channel, PWM channels. This controller is more sufficient for us. 89C1051 don’t have ISP flash, it is require additional system programmer to dump the program into chip. Coming to 89C2051, it has ISP flash memory so we can dump program directly by using UART (serial communication).

If you want to design the line-follow robot with full development board, ignore these 89C1051 & 2051 controllers; go through 89C51/52 or 89S51/52. Here also same like above, 89C51/52 don’t have ISP flash but 89S51/52 have ISP flash memory. So with these we can easily dump program into flash.

Some of the microcontroller families and controllers:

Atmel:

AT89 series microcontrollers

Table 1

AVR microcontrollers

  • tinyAVR
  • 0.5 to 16 kb program memory
  • 6-32 pin package
  • Limited peripheral on chip
  • ATtiny series
  • {C megaAVR
  • 4 – 512 kb program memory
  • 28 – 100-pin package
  • Extended instruction set
  • Extensive on-chip peripherals set
  • ATmega series
  • {C}{ XMEGA
  • 16 – 384 kb program memory
  • 44 (A4), 64 (A3), 100 (A1) pin package
  • Extended performance features
  • Number of on-chip peripherals
  • Cryptography supported
  • ATxmega series

AT91SAM microcontrollers

AT91SAM3A/N/S/U/X

AT91SAM4E/L/S

AT91SAM5D31/3/4/5

AT91SAM7L/S/SE/X/XC

AT91SAM9G/M/N/CN/R/X/XE/260/261/261S/263

Microchip:

8-bit (8-bit data bus): PIC10, PIC12, PIC16, PIC18

16-bit (16-bit data bus): PIC24

32-bit (32-bit data bus): PIC32MX

NXP Semiconductors:

8-bit: LPC700, LPC900

32-bit:

ARM7: LPC2100, LPC2200, LPC2300, LPC2400

ARM9: LPC2900, LPC3100, LPC3200

ARM Cortex-M0: LPC1100, LPC1200

ARM Cortex-M0+: LPC800

ARM Cortex-M3: LPC1300, LPC1700, LPC1800

ARM Cortex-M4: LPC4000, LPC4300