Lecture 4

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

ET-42053

INDUSTRIAL AUTOMATION AND ROBOTICS


Lecture-4

Prepared by : W.M.D. Kasun Chamikara Weerakoon


B.Sc.Eng.(Hons) USJP, M.Sc. In Industrial automation (Reading)
Application of Microcontrollers in the industry
What is a micro-controller ()?
• A Microcontroller is a single, compact and self-contained computer on a single
integrated circuit (IC) which uses for controlling purposes
• Micro controller is made of millions or billions of transistors, capacitors, resistors
etc.
Micro → All are integrated
Controller → Controlling action
• Microcontroller is multi-purpose where the user can program the micro-
controller to perform the required task
Application of Microcontrollers in the industry
• For the purpose of the programming, microcontroller programmer can be used
Application of Microcontrollers in the industry
• The micro controller consists of numerous components including counters, flip-
flops, ALUs, ADC (Analog to digital controllers) etc.
Application of Microcontrollers in the industry
Function of the components in the microcontrollers
CPU(Control and processing unit)
• CPU is the main component in a microcontroller. It acts as the brain of the
microcontroller
• CPU is responsible for executing instructions and perform arithmetic and logical
operations in the microcontroller
• CPU reads and execute the program entered by the user. It consists of following
steps
1. Fetch – Obtaining the program instructions
2. Decode – Understanding the given instructions
3. Execute – Execution or the implementation of the given instructions
Application of Microcontrollers in the industry
Function of the components in the microcontrollers
I/O ports (Input output ports)
• Microcontroller handles the communication with the external devices through
the I/O ports
• The inputs to the microcontroller can be taken from the sensors and outputs can
be given to the actuators
• Microcontrollers can handle multiple inputs and outputs
Application of Microcontrollers in the industry
Function of the components in the microcontrollers
ALU (Arithmetic and logic unit)
• ALU performs the arithmetic operations including addition, subtraction,
multiplication and division and also logic operations including AND, NOT,OR etc.
based on the instructions
• ALU has main input and output access the CPU, main memory and the I/O
devices connected to the microcontroller
Application of Microcontrollers in the industry
Function of the components in the microcontrollers
Memory
• Memory in the microcontroller stores the data, program instructions and other
data required for the microcontroller operations.
• There are many types of memories in a microcontroller
1. Program memory
2. Data memory
3. EEPROM memory
4. Cache memory
5. Registers
Application of Microcontrollers in the industry
Function of the components in the microcontrollers
Memory
1. Program memory (Read-only memory -ROM)
• Program memory stores the instruction required by microprocessor to execute
different tasks
• It stores the firmware* or the program code required for the microcontroller to
operates
• Program memory is non-volatile ( Stored program exists even the power is turned
off)
Firmware* - Program that specialized to control the functions of the hardware
Application of Microcontrollers in the industry
Function of the components in the microcontrollers
Memory
2.Data memory (Random access memory-RAM)
• RAM is used for temporary storage of programs and data need for program execution
• Data memory is a volatile memory. The memory content is lost when the power is
removed
3. EEPROM (Electrically erasable programmable read only memory)
• EEPROM is a non-volatile memory that retains data even the power is turned off
4. Cache memory
• Temporarily stores frequently accessed data to increase the access speed and
improve the performance
Application of Microcontrollers in the industry
Function of the components in the microcontrollers
Memory
5. Registers
• Registers are small and high speed data storage locations within the CPU. Usually
stores the data, addresses and intermediate results during the program execution

8-bit register

• Most of the microcontrollers consist of 32-bit or 64-bit registers


Application of Microcontrollers in the industry
Function of the components in the microcontrollers
Memory
5. Registers
• In microcontrollers there are main 3 types of registers
1. TRIS Register
TRIS registers configure the pins whether they are inputs or outputs
2. PORT Register
Setting the input and output state 1 (High) or 0 (Low).
3. STATUS Register
Shifting between register banks
Application of Microcontrollers in the industry
Function of the components in the microcontrollers
TRIS Register
Application of Microcontrollers in the industry
Function of the components in the microcontrollers
PORT register
Application of Microcontrollers in the industry
Simulation of simple microcontroller circuit

Simulation of simple microcontroller circuit using proteus software and CCS


C compiler

You might also like