0% found this document useful (0 votes)
81 views

Lecture 1 (INTRO)

Uploaded by

nehar shubhescha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views

Lecture 1 (INTRO)

Uploaded by

nehar shubhescha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Course No.

ME 3215
Course Title: Mechatronic Systems

Presented by
Dr. Md. Rokunuzzaman

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 1
Outline
 Learning Objectives
 Course Plan
 Distribution of Marks
 Microprocessor and Microcontroller
 Parts of Microcontroller
 Microcontroller Vs Micro processor
 Types of μC
 Basic Architecture
 Pin Configuration
 References/Resources

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 2
Learning Objectives

Course Objective:
To introduce different components of mechatronic system and to
apply to in real world

At the End of the class you will be able to understand…..


 what a Microprocessor based system and Microcontroller is
 various parts of a μC
 the basic difference between μP and μC
 different types of μC
 the basic architecture of μC

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 3
Course Plan

Topics No. of
Class
Basics of Microprocessor based system and Microcontroller 01
Microcontroller programming basics 04
(ADC, Clock/Timer, PWM, I/O port programming, Introduction to
Arduino)
CT-1 01
Interfacing, serial communication interfacing 01
Digital communications, networks, protocols of communication 01
NC and CNC systems 01
CT-2 01
PLC basic structure and programming 02
overview of SCADA and DCS systems. 01

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 4
Distribution of Marks

Class Tests 10
Assignments 10
Attendance 08
Semester Exam 72
Total Marks 100

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 5
What is a Microprocessor?
Computer's Central Processing Unit (CPU) built on a single Integrated Circuit (IC) is called a
microprocessor.
A digital computer with one microprocessor which acts as a CPU is called microcomputer.
It is a programmable, multipurpose, clock -driven, register-based electronic device that
reads binary instructions from a storage device called memory, accepts binary data as input
and processes data according to those instructions and provides results as output.
The microprocessor contains millions of tiny components like transistors, registers, and
diodes that work together.

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 6
What is a Microprocessor based system?
Microprocessor Based System is one of the great technological inventions in recent time.
Microprocessor is multipurpose, programmable equipment that accepts digital signals as
the input source and processes it according to instructions stored in Microprocessor’s
memory, and provides results as output.
Applications of Microprocessor Based System
•Pocket Calculators
•Consumer Products
•Laboratory equipment’s
•Games and Toys
•Control systems
Input devices of Microprocessor Based System
•Switches
•Sensors
•Convertors
•Keyboard
•Mouse

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 7
Output Devices of Microprocessor Based System
•Alarm
•Lamps
•Printer
•Indicator
•CRT/LCD/LED display
Component of Microprocessor Based System
•Data bus.
•Control bus
•Address bus
•Program Counter
•Arithmetic and Logic Unit The basic operation of a Microprocessor is the input
•Registers components provide data an instruction to Microprocessor,
•Clock device which subsequently stored in the memory unit and those
data are processed by Arithmetic and Logic unit so the
result is sent to other output nit.

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 8
What is a Microcontroller ?

A microcontroller is a compact integrated circuit designed to


govern a specific operation in an embedded system. A typical
microcontroller includes a processor, memory and input/output
(I/O) peripherals on a single chip.

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 9
Department of Mechanical Engineering
Rajshahi University of Engineering & Technology 10
Various parts of a μC

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 11
CPU
Central Processing Unit or CPU is the brain of the Microcontroller. It consists of an
Arithmetic Logic Unit (ALU) and a Control Unit (CU). A CPU reads, decodes and
executes instructions to perform Arithmetic, Logic and Data Transfer operations.

Memory
Any Computational System requires two types of Memory: Program Memory and
Data Memory. Program Memory, as the name suggests, contains the program i.e.
the instructions to be executed by the CPU.
Data Memory on the other hand, is required to store temporary data while
executing the instructions.

Usually, Program Memory is a Read Only Memory or ROM and the Data Memory
is a Random Access Memory or RAM. Data Memory is sometimes called as Read
Write Memory (R/W M).

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 12
I/O Ports
The interface for the Microcontroller to the external world is provided by the I/O Ports or
Input/Output Ports. Inputs device like Switches, Keypads, etc. provide information from the
user to the CPU in the form of Binary Data.
The CPU, upon receiving the data from the input devices, executes appropriate instructions
and gives response through Output Devices like LEDs, Displays, Printers, etc.

Bus
Another important component of a Microcontroller, but rarely discussed is the System Bus. A
System bus is a group of connecting wire that connect the CPU with other peripherals like
Memory, I/O Ports and other supporting components.

Timers/Counters
One of the important components of a Microcontroller are the Timers and Counters. They
provide the operations of Time Delays and counting external events. Additionally, Timers and
Counters can provide Function Generation, Pulse Width Modulation, Clock Control, etc.

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 13
Serial Port
One of the important requirement of a Microcontroller is to communicate with other device
and peripherals (external). Serial Port proves such interface through serial communication.
Most common serial communication implemented in Microcontrollers is UART.

Interrupts
A very important feature of a Microcontroller is Interrupts and its Interrupt Handling
Mechanism. Interrupts can be external, internal, hardware related or software related.

ADC (Analog to Digital Converter)


Analog to Digital Converter or ADC is a circuit that converts Analog signals to Digital Signals.
The ADC Circuit forms the interface between the external Analog Input devices and the CPU
of the Microcontroller. Almost all sensors are analog devices and the analog data from these
sensors must be converted in to digital data for the CPU to understand.

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 14
Difference between a Micro Processor (μP) and
a Microcontroller (μC)

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 15
Types of Microcontroller

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 16
History of Microcontrollers

1971 Texas Instrument calculator-on-a-chip TMS


1000, which was a 4-bit microcontroller with built-in
ROM and RAM.

1977 Intel 8048 was one of Intel's


first microcontrollers.

1980 Intel 8051 followed in and became one of the


most popular microcontroller families.

1996 Atmel AVR was one of the first


microcontroller families to use on-chip flash memory
for program storage.

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 17
AVR Family
•TinyAVR
•0.5–32 KB program memory
•6–32-pin package
•Limited peripheral set
•MegaAVR
•4–256 KB program memory
•28–100-pin package
•Extensive peripheral set
•XMEGA
•16–384 KB program memory
•44–64–100-pin package (A4, A3, A1)
•DMA, "Event System", and crypto-
-graphy support
•Extensive peripheral set with ADCs
•Application-specific AVR
•MegaAVRs with special features not found on the other members of the AVR family,
such as LCD controller, USB controller, advanced PWM, CAN, etc.
Department of Mechanical Engineering
Rajshahi University of Engineering & Technology 18
Department of Mechanical Engineering
Rajshahi University of Engineering & Technology 19
Basic architecture of μC (AVR)

 The basic architecture of AVR was designed by two students of


Norwegian Institute of Technology (NTH), Alf-Egil Bogen and
Vegard Wollan, and then was bought and developed by Atmel in
1996.
 The AVR stands for Advanced Virtual RISC, or Alf and Vegard
RISC
 The AVR is an 8-bit RISC single-chip microcontroller with
Harvard architecture.

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 20
Department of Mechanical Engineering
Rajshahi University of Engineering & Technology 21
RISC

Reduced Instruction Set Computer, or RISC , is one whose instruction set


architecture (ISA) allows it to have fewer cycles per instruction (CPI) than a
Complex Instruction Set Computer (CISC)

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 22
AVR Architecture

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 23
 RISC architecture with mostly fixed-length instruction, load-store memory
access and 32 general-purpose registers.
 A two-stage instruction pipeline that speeds up execution
 Majority of instructions take one clock cycle
 Up to 16-MHz clock operation
 Up to 12 times performance speedup over conventional CISC controllers.
 Wide operating voltage from 2.7V to 6.0V
 Simple architecture offers a small learning curve to the uninitiated.

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 24
ATmega16 Pin Configuration

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 25
References/Resources
 Books:
 William Bolton, Mechatronics: Electronic control systems in mechanical and
electrical engineering, Sixth Edition, Pearson Education Limited 2015
 Thomas Grace, Programming and Interfacing ATMEL® AVR® Microcontrollers,
Cengage Learning PTR, 2016
 Automating Manufacturing Systems with PLCs, Hugh Jack, 2007
 Programmable Automation Technologies: An Introduction to CNC, Robotics and
PLCs, Daniel E. Kandray, P.E., Industrial Press, Inc. NY, 2010

 Tutorials/Online resources/Data Sheet Etc:


 Microcontroller Tutorials, TECHSHOP, Bangladesh
 AVR tutorials in Bangla: Part 1 and 2, Zulfikar Ali Jewel, Bangladesh
 http://www.avr-tutorials.com/
 Atmel Datasheet, ATMEL Corporation
 Lecture Notes of the Class

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 26
Appreciation to

Thank you for your patience

Department of Mechanical Engineering


Rajshahi University of Engineering & Technology 27

You might also like