Microcontroller and PLC

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 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 , memory and input /
output.
Engr. M.K.Debnath
3
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 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
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 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
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 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 FlashRAM).
Engr. M.K.Debnath
10
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 |
|----|
BottleNeck | 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




M34501
8051( 8052 , 8031)
68HC16Z3
LH79520
-------------------------------------------------
Engr. M.K.Debnath
4 BIT
8 BIT
16 BIT
32 BIT
12
OTHER 8051 MICROCONTROLLER
A. Dallas Semiconductor ( Maxim)
 DS89C420/30 ( 16K , FLASH )
 DS89C440
( 32K , FLASH )
 DS89C450
( 64K , FLASH )
 DS5000
( 8K , NVRAM )
 DS80C320
( 0K)
 DS87520
( 16K , UVROM )
Engr. M.K.Debnath
13
OTHER 8051 MICROCONTROLLER
B . Atmel Corporation ( All are Flash)
1. AT89C51
2. AT89LV51
3. AT89C1051
4. AT89C2051
5. AT89C52
6. AT89LV52
( 4K )
( 4K )
( 1K )
( 2K )
( 8K )
( 8K )
Engr. M.K.Debnath
14
Importance of Microcontroller
in control system
Engr. M.K.Debnath
15