Page 1 :
Unit!, , , , FUNDAMENTALS OF MICROCONTROLLERS, , , , , , , , 1.1 INTRODUCTION, , , , , , 8 bit Microcontrollers, , A Microcontroller (MCU for microcontroller unit, or UC for p-controfler) is a small computer on a single integrated, circuit. In modem terminology, it is similar to, but less sophisticated than, a system on a chip (SoC); an SoC may include, a microcontroller as one of its components. A microcontroller contains one or more CPUs (processor cores) along with, , memory and programmable input/output peripherals. Program memory in the form of ferroelectric RAM, NOR flash or, OTP ROM is also often included on chip, as well as a small amount of RAM. Microcontrollers are designed for, embedded applications, in contrast to the microprocessors used in personal computers or other general purpose, applications consisting of various discrete chips., , Microcontrollers are used in automatically controlled products and devices, such as automobile engine control, systems, implantable medical devices, remote controls, office machines, appliances, power tools, toys and other, embedded systems. By reducing the size and cost compared to a design that uses a separate microprocessor, memory,, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes., Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic, systems. In the context of the internet of things, microcontrollers are an economical and popular means of data, collection, sensing and actuating the physical world as edge devices., , Some microcontrollers may use four-bit words and operate at frequencies as low as 4 kHz, for low power Consumption, (single-digit milliwatts or microwatts). They generally have the ability to retain functionality while waiting for an event, such as a button press or other interrupt power consumption while sleeping (CPU clock and most peripherals off) may, be just nanowatts, making many of them well suited for long lasting battery applications. Other microcontrollers may, serve performance-critical roles, where they may need to act more like a digital signal processor (DSP), with higher, clock speeds and power consumption., , A microcontroller is a small, low-cost and self contained computer-on-a-chip that can be used as an embedded, system. A few microcontrollers may utilize four-bit expressions and work at clock rate frequencies, which usually, , include:, , » An 8 or 16 bit microprocessor. > A little measure of RAM., , >» Programmable ROM and flash memory. > Parallel and serial /O., , > Timers and signal generators. % Analog to Digital and Digital to Analog conversion., , Microcontrollers usually must have low-power requirements since many devices they control are battery-operated., Microcontrollers are used in many consumer electronics, car engines, computer penpherals and test or measurement, equipment. And these are well suited for long lasting battery applications. The dominant part of microcontrollers being, used now a days are implanted in other apparatus., , A Microcontroller is a small computer on a single integrated circuit. In modern terminology, it is similar to, but less, sophisticated than, a system on a chip (SoC), an SoC may include a microcontroller as one of its components. A, microcontroller contains one or more CPUs (processor cores) along with memory and programmable input / output, peripherals. Program memory in the form of ferroelectric RAM, NOR flash or OTP ROM is also often included on chip,, as well as a small amount of RAM, Microcontrollers are designed for embedded applications, in contrast to the, microprocessors used in personal computers or other general purpose applications consisting of various discrete chips., , Microcontrollers are used in automatically controlled products and devices, such as automobile engine control, systems, implantable medical devices, remote controls, office machines, appliances, power tools, toys and other, , (2.1)
Page 2 :
MICROCONTROLLER AND ITS APPS (E&TC, BATU) (1.2) FUNDAMENTALS OF MICROCONTROLLERS, , embedded systems. By reducing the size and cost compared to a design that uses a separate microprocessor, memory,, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes., Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic, systems. In the context of the internet of things, microcontrollers are an economical and popular means of data, collection, sensing and actuating the physical world as edge devices., , * Some microcontrollers may use four-bit words and operate at frequencies as low as 4 kHz, for low power consumption, (single-digit milliwatts or microwatts). They generally have the ability to retain functionality while waiting for an event, such as a button press or other interrupt; power consumption while steeping (CPU clock and most peripherals off} may, be just nanowatts, making many of then well suited for long lasting battery applications. Other microcontrollers may, serve performance-critical roles, where they may need to act more like a digital signal processor (DSP), with higher, clock speeds and power consumption., , * A Microcontroller is a smal! and low-cost microcomputer, which is designed to perform the specific tasks of, embedded systems like displaying microwave's information, receiving remote signals, etc., , * The general microcontroller consists of the processor, the memory (RAM, ROM, EPROM), Serial ports, peripherals, (timers, counters), etc., , 1,1.1 Difference between Microprocessor and Microcontroller, , The following table highlights the differences between a microprocessor and a microcontroller :, , , , , , , , , , , , , , , , , , Microcontroller Microprocessor, Microcontrollers are used to execute 4 single task within | Microprocessors are used for big applications., an application., Its designing and hardware cost is low. Its designing and hardware cost is high., Easy to replace. Not so easy lo replace., itis built with CMOS technology, which requires less. Its power consumption is high because it has to control, power to operate. the entire system., It consists of CPU, RAM, ROM, VO ports. It doesn't consist of RAM, ROM, VO ports. It uses its, pins o interface to peripheral devices,, , , , , , 1.1.2 Classification of Microcontrollers, , , , Microcontrollers are divided into various categories based on memory, architecture, bits and instruction sets. Following is, the list of their types :, , Bit, , Based on bit configuration, the microcontroller is further divided into three categories., , * 8-bit Microcontroller : This type of microcontroller is used to execute arithmetic and logical operations like addition,, subtraction, multiplication division, etc. For example, Intel 8031 and 8051 are 8 bits microcontroller,, , * 16-bit Microcontroller : This type of microcontroller is used to perform arithmetic and logical operations where, higher accuracy and performance is required. For example, Intel 8096 is a 16-bit microcontroller., , * 32-bit Microcontroller ; This type of microcontroller is generally used in automatically controlled appliances like, automatic operational machines, medical appliances, etc,, , Memory, , Based on the memory configuration, the microcontroller is further divided into two categories., , * External Memory Microcontroller : This type of microcontroller is designed in such a way that they do not have a, Program memory on the chip. Hence, it is named as external memory microcontroller. For example: Intel 8031, microcontroller., , *® Embedded Memory Microcontroller : This type of microcontroller is designed in such a way that the microcontroller, , has all programs and data memory, counters and timers, interrupts, I/O ports are embedded on the chip. For example:, Intel 8051 microcontroller.
Page 3 :
MICROCONTROLLER AND ITS APPS (E&TC, BATU) (1.3) FUNDAMENTALS OF MICROCONTROLLERS, , Instruction Set, Based on the instruction set configuration, the microcontroller is further divided into two categories., , *® CISC : CISC stands for complex Instruction set computer. It allows the user to insert a single instruction as an, alternative to many simple instructions,, , » RISC : RISC stands for Reduced Instruction Set Computers. It reduces the operational time by shortening the clock, cycle per instruction., , 1.1.3 Applications of Microcontrollers, , Microcontrollers are widely used in various different devices such as :, , * Light sensing and controlling devices like LED,, , * Temperature sensing and controlling devices like microwave oven, chimneys., , © Fire detection and safety devices like Fire alarm., , ® Measuring devices like Volt Meter., , 1.1.4 Types of Microcontrollers, , 1. Microcontroller 8051, , ® [tis a 40pin microcontroller with Vcc of SV connected to pin 40 and Vss at pin 20 which is kept OV, And there are input, and output ports from P1.0 = P17 and which having open drain feature. Port3 has got extra features, Pin36 has open, drain condition and pin17 has internally pulled up transistor inside the microcontroller. When we apply logic 1 at portl, then we get logic 1 at port21 and vice versa. The programming of microcontroller is dead complicate., , * Basically we write a program in C-language which is next converted to machine language understand by the, microcontroller. A RESET pin is connected to pin3, connected with a capacitor. When the switch is ON, the capacitor, starts charging and RST is high. Applying a high to the reset pin resets the microcontroller, , 2. Renesas Microcontroller, , * Renesas is latest automotive microcontroller family that offers high performance feature with exceptionally low power, consumption over a wide and versatile extend of items. This microcontroller offers rich functional security and, embedded safety characteristics required for new and advanced automotive applications, The core stnucture of, microcontroller CPU support high reliability and high performance requirements., , * The Renesas microcontroller offering low power, high performance, modest packages and the largest range of memory, sizes combined together with characteristics rich peripherals., , * Renesas offers the most versatile microcontroller families in the world for example our RX family offers a many types, devices with memory variants from 32K flash/4K RAM to an incredible 8M flash/S12K RAM,, , @ = The RX Family of 32-bit microcontrollers is a feature rich, general purpose MCU covering a wide range of embedded, control applications with high speed connectivity, digital signal processing and inverter control,, , © The RX microcontroller family uses a 32-bit enhanced Harvard CISC architecture to achieve very high performance,, Features and Benefits of the RX Microcontrollers, , * Low power consumption is realized using multi-core technology, , * Support for 5V operation for industrial and appliance designs, , * Scalability from 48 to 145 pins and from 32K8 to 1MB flash memory, with 8KB of data flash memory included, , * Integrated safety feature, , * An integrated rich function set of 7 UART, I2C, & SPI, comparators, 12-bit ADC, 10-bit DAC and 24-bit ADC (RX21A),, which will reduce system cost by integrating most functions
Page 4 :
MICROCONTROLLER ANDO ITS APPS (E&TC, BATU) (14) FUNDAMENTALS OF MICROCONTROLLERS, , Application of Renesas Microcontroller:, * Industrial automation * Communication applications, * Motor control applications ¢ Test and measurement, * Medical applications, , 3. AVR Microcontrollers, , AVR microcontroller is developed by Alf-Egil Bogen and Vegard Wollan from Atmel! Corporation. The AVR microcontrollers, are modified harvard RISC architecture with separate memories for data and program and speed of AVR is high when, compare to 8051 and PIC. The AVR is stands for Alf-Egil Bogen and Vegard Wollan’s RISC processor., , Difference between 8051 and AVR Controllers;, , * 8051s are 8-bit controllers based on CISC architecture, AVRs are 8-bit controllers based on RISC architecture, * B051 consumes more power than AVR microcontroller, , * In 8051, we can program easily than the AVR microcontroller, , * The speed of AVR is more than the 8051 microcontroller, , Classification of AVR Controllers:, , AVR Microcontrollers are Classified into Three Types:, , ® TinyAVR : Less memory, small size, suitable only for simpler applications, , « MegaAVR ; These are the most popular ones having good amount of memory (up to 256 KB), higher number of inbuilt, peripherals and suitable for moderate to complex applications, , « XmegaAve ; Used commercially for complex applications, which require large program memory and high speed, Features of AVR Microcontroller :, , * —16KB of In-System Programmable Flash, , * 5128 of In-System Programmable EEPROM, , * 16-bit Timer with extra features, , * Multiple internal oscillators, , * Internal, self-programmable instruction flash memory up to 256K, , * — In-system programmable using ISP, JTAG or high voltage methods, , * Optional boot code section with independent lack bits for protection, , * — Synchronous/asynchronous serial peripherals (UART / USART), , * — Serial peripheral interface bus (SPI), , * Universal serial interface (USI for two/three-wire synchronous data transfer, * Watchdog timer (WDT), , * Multiple power-saving sleep modes, , * 10-bit A/D Converters, with multiplex of up to 16 channels, , * CAN and USB controller support, , * Low-voltage devices operating down to 1.8v, , There are many AVR family microcontrollers, such as ATmega8, ATmegal6 and so on. In this article we discussing about, the ATmega328 microcontroller. The ATmega328 and ATmega8 are pin compatible ICs but functionally they are different., The ATmega328 has flash memory of 32kB, where the ATmega8 has 8kB. Other differences are extra SRAM and EEPROM,, addition of pin change interrupts and timers. Some of the features of ATmega328 are:
Page 5 :
MICROCONTROLLER AND ITS APPS (E&TC, BATU) (1.5) FUNDAMENTALS OF MICROCONTROLLERS, , Applications of AVR Microcontroller:, , There are many applications of AVR microcontroller; they are used in home automation, tauch screen, automobiles,, , medical devices and defense., , 4, PIC Microcontroller, , * PIC is a peripheral interface controller, developed by general instrument's microelectronics, in the year of 1993. It is, controlled by the software. They could be programmed to complete many task and contro! a generation line and many, more. PIC microcontrollers are finding their way into new applications like smart phones, audio accessories, video, gaming peripherals and advanced medical devices., , * There are many PICs, started with PIC16F&4 and PICL6C84, But these were the only affordable flash PICs. Microchip has, recently introduced flash chips with types that are much more attractive, such as 16F628, 16F877 and 18F4S2. The, 16F877 is around twice the price of the old 16F84, but has eight times the code size, much more RAM, much more YO, pins, a UART, A/D converter and a lot more., , Features of PICL6F877, , Core Features:, , * High-performance RISC CPU © Upto 8K x 14 words of FLASH program memory, * 35 Instructions (fixed length encading-14-bit) * 3688 static RAM based data memory, , * Up to 256 x 8 bytes of EEPROM data memory © Interrupt capability (up to 14 sources}, , * Three addressing modes (direct, indirect, relative) * Power-on reset (POR}, , * Harvard architecture memory * Power saving SLEEP mode, , = Wide operating voltage range: 2.0V to 5.5V ¢ High sink / source current 25mA, , * Accumulator based machine, Peripheral Features:, * 3 Timer/counters (programmable pre-scalars), *& TimerQ, Timer2 are 8-bit timer/counter with 8-bit pre-scalar, % Timer] is 16-bit, can be incremented during sleep via external crystal/clock, * Two capture, compare, PWM modules, * Input capture function records the Tirnerl count on a pin transition, * APWM function output is a square wave with a programmable period and duty cycle., © 10-bit 8 channel analog-to-digital converter, * USART with 9-bit address detection, * Synchronous serial port with master mode and I2C Master/Slave, * = 8-bit parallel slave port, Analog Features:, * 10-bit, up to 8-channel Analog-to-Digital Converter (A/D), * Brown-out Reset (BOR), , * Analog Comparator module (Programmable input multiplexing from device inputs and comparator outputs are, externally accessible), , Advantages of PIC:, , * Itisa RISC design, , * Its code is extremely efficient, allowing the PIC to run with typically less program memory than its larger competitors, * — Itis low cost, high clock speed