Microcontroller and PLC Eng ISRAFIL KHAN DIPLOMA IN

  • Slides: 15
Download presentation
Microcontroller and PLC Eng. ISRAFIL KHAN. DIPLOMA IN ELECTRONIC. Engr. M. K. Debnath 1

Microcontroller and PLC Eng. ISRAFIL KHAN. DIPLOMA IN ELECTRONIC. Engr. M. K. Debnath 1

Microprocessor A microprocessor is a multipurpose , programmable , clock driven , register based

Microprocessor A microprocessor is a multipurpose , programmable , clock driven , register based semiconductor device consisting of logic circuits manufactured by using either LSI or VLSI technology that reads binary instructions from a storage device called memory, accepts binary data as inputs and process data according to those instructions and provide results as output. Engr. M. K. Debnath 2

Micro-computer A computer that designed using a microprocessor as its cpu. It includes microprocessor

Micro-computer A computer that designed using a microprocessor as its cpu. It includes microprocessor , memory and input / output. Engr. M. K. Debnath 3

Microcontroller A device that includes microprocessor , memory and input / output signal lines

Microcontroller A device that includes microprocessor , memory and input / output signal lines on single chip fabricated using VLSI technology. Engr. M. K. Debnath 4

Programmable Logic Controller: PLC programmable logic controller (PLC) or programmable controller is a digital

Programmable Logic Controller: PLC programmable logic controller (PLC) or programmable controller is a digital computer used for automation of electromechanical processes, such as control of machinery on factory assembly lines, control of amusement rides, or control of lighting fixtures. PLCs are used in many different industries and machines such as packaging and semiconductor machines. Engr. M. K. Debnath 5

Basic Building Blocks of a Microcontroller Device in general ALU Timer/Counter I/O Port Accumulator

Basic Building Blocks of a Microcontroller Device in general ALU Timer/Counter I/O Port Accumulator I/O Port Register(s) Internal ROM Internal RAM Interrupt Circuits Clock Circuits Stack Pointer Program counter Engr. M. K. Debnath 6

History and Development in Microcontroller In 1981 Intel Corporation introduced an 8 - bit

History and Development in Microcontroller In 1981 Intel Corporation introduced an 8 - bit microcontroller called 8051. This microcontroller had 128 bytes of RAM , 4 KB of on –chips ROM , 2 timers , 1 serial port , and 4 ports ( each 8 -bit wide) all on a single chip Engr. M. K. Debnath 7

Embedded Vs external memory device Engr. M. K. Debnath 8

Embedded Vs external memory device Engr. M. K. Debnath 8

CISC vs. RISC processors 1. CISC Emphasis on hardware 2. Includes multi-clock complex instructions

CISC vs. RISC processors 1. CISC Emphasis on hardware 2. Includes multi-clock complex instructions 3. Memory- to-memory: LOAD" and "STORE“ incorporated in instructions 4. Small code sizes, high cycles per second 5. Transistors used for storing complex instructions 1. RISC Emphasis on software 2. Single-clock, reduced instruction only 3. Register to register: "LOAD" and "STORE" are independent instructions 4. Low cycles per second, large code sizes 5. Spends more transistors on memory registers Engr. M. K. Debnath 9

Harvard Architecture Most microcontrollers use a different system called Harvard architecture. The Larger program

Harvard Architecture Most microcontrollers use a different system called Harvard architecture. The Larger program storage and the smaller data memory are separated. The first such machine, the Harvard Mark I had it's programs hard-coded on paper-tape and the volatile data was loaded into electric relays. +-----+ +------+ | PROGRAM | | DATA | HARVARD vs VON NEUMANN (AVR BUTTERFLY) 1 | ROM | <----> [CPU] <----> | RAM | +-----+ +------+ Harvard style machines allow program steps to be fetched at the same time as data, thereby creating potentially faster through-put and less of a bottle-neck. They also have the benefit that run away processes can't damage the program stored in the non-volatile program area so they're more stable. Many C programs lack proper boundary checking and a null pointer or an over-run buffer can overwrite and crash a program that shares RAM with data. If you are new to this architecture you need to keep this in mind. When creating a routine that needs a few bytes of storage, I would normally create that space within the routine itself. On a Harvard machine, Those bytes would not be in volatile RAM but part of the hard coded program Memory stored in ROM (or Flash. RAM). Engr. M. K. Debnath 10

Von Neumann Architecture Most computers we are familiar with use an architecture called Von

Von Neumann Architecture Most computers we are familiar with use an architecture called Von Neumann. The term arose out of Neumann's 1945 draft report on the ADVAC computer. He was not, however the original inventor of it. +-----+ | RAM | |----| Bottle. Neck | PROGRAM | [CPU] <=====> | - - | | DATA | +-----+ A Von Neumann machine has one large monolithic RAM structure that contains both program memory and data memory mixed together. Since both program steps and data must be loaded from the same place, it can create a problem called the Von Neumann Bottle-Neck. Engr. M. K. Debnath 11

Commercial Microcontroller q q M 34501 8051( 8052 , 8031) 68 HC 16 Z

Commercial Microcontroller q q M 34501 8051( 8052 , 8031) 68 HC 16 Z 3 LH 79520 ------------------------- Engr. M. K. Debnath 4 BIT 8 BIT 16 BIT 32 BIT 12

OTHER 8051 MICROCONTROLLER A. Dallas Semiconductor ( Maxim) q DS 89 C 420/30 (

OTHER 8051 MICROCONTROLLER A. Dallas Semiconductor ( Maxim) q DS 89 C 420/30 ( 16 K , FLASH ) q DS 89 C 440 ( 32 K , FLASH ) q DS 89 C 450 ( 64 K , FLASH ) q DS 5000 ( 8 K , NVRAM ) q DS 80 C 320 ( 0 K) q DS 87520 ( 16 K , UVROM ) Engr. M. K. Debnath 13

OTHER 8051 MICROCONTROLLER B. Atmel Corporation ( All are Flash) 1. AT 89 C

OTHER 8051 MICROCONTROLLER B. Atmel Corporation ( All are Flash) 1. AT 89 C 51 2. AT 89 LV 51 3. AT 89 C 1051 4. AT 89 C 2051 5. AT 89 C 52 6. AT 89 LV 52 ( 4 K ) ( 1 K ) ( 2 K ) ( 8 K ) Engr. M. K. Debnath 14

Importance of Microcontroller in control system Engr. M. K. Debnath 15

Importance of Microcontroller in control system Engr. M. K. Debnath 15