0% found this document useful (0 votes)
11 views26 pages

Embedded System 09-01-2021 KBP

Uploaded by

disha
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)
11 views26 pages

Embedded System 09-01-2021 KBP

Uploaded by

disha
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/ 26

Architecture of Microcontroller:

The Programming Approach

By
Dr. V.D.Bachuwar
Asst. Prof.
Dept. of Electronics Science
School of Physical Sciences
Punyashlok Ahilyadevi Holkar Solapur
University, Solapur
What is Embedded System?
• An embedded system is a microprocessor/ microcontroller-based computer hardware
system with software that is designed to perform a dedicated function, either as an
independent system or as a part of a large system. At the core is an integrated circuit
designed to carry out computation for real-time operations.

• A system is an arrangement in which all its unit assemble work together according to a
set of rules. It can also be defined as a way of working, organizing or doing one or
many tasks according to a fixed plan..

Dr. V.D.Bachuwar 2
Embedded System Block Diagram

Dr. V.D.Bachuwar 3
Some Real Time Applications of Embedded
System

Dr. V.D.Bachuwar 4
The Microcontroller
• 8051 • A microcontroller is a compact integrated circuit designed to govern a
• AVR specific operation in an embedded system.
• A typical microcontroller includes a processor, memory and input/output
• PIC (I/O) peripherals on a single chip.
• ARM
• MSP
• Arduino
• SoC

Dr. V.D.Bachuwar 5
Difference between Microprocessor and Microcontroller

Microcontroller Microprocessor
Microcontrollers are used to execute Microprocessors are used for big
a single task within an application. applications.

Its designing and hardware cost is Its designing and hardware cost is high.
low.

Easy to replace. Not so easy to replace.


It is built with CMOS technology, Its power consumption is high because it
which requires less power to has to control the entire system.
operate.

It consists of CPU, RAM, ROM, It doesn’t consist of RAM, ROM, I/O


I/O ports. ports. It uses its pins to interface to
peripheral devices.
Dr. V.D.Bachuwar 6
Dr. V.D.Bachuwar 7
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.

Dr. V.D.Bachuwar 8
Computer Architectures

Von Neumann architecture Harvard architecture

Dr. V.D.Bachuwar 9
VON NEUMANN ARCHITECTURE HARVARD ARCHITECTURE

It is ancient computer architecture based on It is modern computer architecture based on


stored program computer concept. Harvard Mark I relay based model.

Same physical memory address is used for Separate physical memory address is used for
instructions and data. instructions and data.

There is common bus for data and instruction Separate buses are used for transferring data and
transfer. instruction.

Two clock cycles are required to execute single


An instruction is executed in a single cycle.
instruction.

It is cheaper in cost. It is costly than van neumann architecture.

CPU can not access instructions and read/write CPU can access instructions and read/write at
at the same time. the same time.

It is used in personal computers and small It is used in micro controllers and signal
computers. processing.

Dr. V.D.Bachuwar 10
8051 Family
AT89C51,AT89C52, AT89S51,AT89S52

P89V51RD2BN

ADuC816, ADuC824, ADuC831, ADuC832,


ADuC834, ADuC836, ADuC841, ADuC842,
ADuC843, ADuC845, ADuC847, ADuC848

More information : https://www.keil.com/dd/chips/all/8051.htm


Dr. V.D.Bachuwar 11
Some Important Basics for Learning
Microcontroller Programming
Number System Bit – single 1 or 0
TTL logic Nibble – group of 4bit
Logic 1 – 5V Byte – group of 8 bit
Logic 0 – 0V Double – group of 16 bit or 2bytes
Word – group of 32 bit or 4 bytes
Double-word – group of 64 bit or 8 bytes

For 8bit system


Range of unsigned integer – (0 to 255, 00H to 0FFH ) total 256
Range of signed integer - (-128 to 127) total 256

Data bus 8 bit - Number instructions – 2^8 = 256


Data Bus 16 bit – memory – 2^16 = 65536 = 0 to 65536, 0000H to 0FFFFH

Dr. V.D.Bachuwar 12
8051 Architecture

• 8 bit microcontroller
• Max ROM – 64KB
• RAM – 128 bytes
• Frequency – 4 to 30
MHz
• Ports – 4
(P0,P1,P2,P3)
• Timers- 2 Timers ( 16
bit)
• Serial
Communication
• External Interrupts

Dr. V.D.Bachuwar 13
Registers in 8051 Microcontroller

• The Data Pointer (DPTR) is the 8051’s only user-accessible 16-bit (2-byte)
register. The Accumulator, R0–R7 registers and B register are 1-byte value
registers. DPTR is meant for pointing to data. It is used by the 8051 to access
external memory using the address indicated by DPTR. DPTR is the only 16-bit
register available and is often used to store 2-byte values.

• The Program Counter (PC) is a 2-byte address which tells the 8051 where the
next instruction to execute can be found in the memory. PC starts at 0000h when
the 8051 initializes and is incremented every time after an instruction is
executed. PC is not always incremented by 1. Some instructions may require 2 or
3 bytes; in such cases, the PC will be incremented by 2 or 3.

Dr. V.D.Bachuwar 14
Program Status Word (PSW)

Dr. V.D.Bachuwar 15
Dr. V.D.Bachuwar 16
Assembly Language Programming

Dr. V.D.Bachuwar 17
Integrated Development Environment(IDE)

.hex file

Dr. V.D.Bachuwar 18
Port Programming

Dr. V.D.Bachuwar 19
LED ON and OFF Logic
Logic 1 i.e. 5V LED ON Logic 0 i.e. 0V LED OFF

Dr. V.D.Bachuwar 20
P0.7 P0.6 P0.5 P0.4 P0.3 P0.2 P0.1 P0.0

0 0 0 0 0 0 0 0 00H

P0.7 P0.6 P0.5 P0.4 P0.3 P0.2 P0.1 P0.0

0 0 0 0 0 0 0 1 01H

P0.7 P0.6 P0.5 P0.4 P0.3 P0.2 P0.1 P0.0

0 0 0 0 0 0 1 0 02H

Dr. V.D.Bachuwar 21
P0.7 P0.6 P0.5 P0.4 P0.3 P0.2 P0.1 P0.0

0 0 0 0 0 1 0 0 04H

P0.7 P0.6 P0.5 P0.4 P0.3 P0.2 P0.1 P0.0

0 0 0 0 1 0 0 0 08H

P0.7 P0.6 P0.5 P0.4 P0.3 P0.2 P0.1 P0.0

0 0 0 1 0 0 0 0 10H

Dr. V.D.Bachuwar 22
P0.7 P0.6 P0.5 P0.4 P0.3 P0.2 P0.1 P0.0

0 0 1 0 0 0 0 0 20H

P0.7 P0.6 P0.5 P0.4 P0.3 P0.2 P0.1 P0.0

0 1 0 0 0 0 0 0 40H

P0.7 P0.6 P0.5 P0.4 P0.3 P0.2 P0.1 P0.0

1 0 0 0 0 0 0 0 80H

Dr. V.D.Bachuwar 23
ORG 00H
START: MOV P0,#00H DELAY:
MOV R1,#255
CALL DELAY
UP: DJNZ R1, UP
MOV P0,#01H RET
CALL DELAY
MOV P0,#02H
CALL DELAY
MOV P0,#04H
CALL DELAY
MOV P0,#08H
CALL DELAY
MOV P0,#10H
CALL DELAY
MOV P0,#20H
CALL DELAY
MOV P0,#40H
CALL DELAY
MOV P0,#80H
CALL DELAY Dr. V.D.Bachuwar 24
Dr. V.D.Bachuwar 25
8051 Boards for Projects

489.00/-

https://robu.in/product/smartelex-aryabhatta-8051-microcontroller-develop
ment-board-at89s52-with-onboard-usb-programmer/?gclid=CjwKCAiA_9r_BR
BZEiwAHZ_v10eOsLJldHHDUkWSDMYcQE4KxsjljXPnP08UXD8ghJwNaJ35_zrdg
hoCIasQAvD_BwE
Dr. V.D.Bachuwar 26

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy