Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
22 views

Microprocessors and Microcontrollers

This document discusses the key components of microprocessor systems. It describes how a microprocessor system uses three main buses - data bus, address bus, and control bus - to transfer information between different components. It then explains the functions of the central processing unit (CPU) and some of its main internal components, including the arithmetic logic unit (ALU), registers, and control unit. Some examples of specific register types like the accumulator, status, and program counter registers are also provided.

Uploaded by

Ayush Patel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Microprocessors and Microcontrollers

This document discusses the key components of microprocessor systems. It describes how a microprocessor system uses three main buses - data bus, address bus, and control bus - to transfer information between different components. It then explains the functions of the central processing unit (CPU) and some of its main internal components, including the arithmetic logic unit (ALU), registers, and control unit. Some examples of specific register types like the accumulator, status, and program counter registers are also provided.

Uploaded by

Ayush Patel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

Microprocessors and

Microcontrollers
Prof. Vinay J. Patel
Professor, Mechanical Engineering Department
Birla Vishvakarma Mahavidyalaya (Engineering College)
Vallabh Vidyanagar – 388120. Gujarat, INDIA
General form of microprocessor system Microprocessor Systems

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 2


Microprocessor Systems

• Digital signals move from one section to another along paths called buses.
• Parallel conductress
• Shared by all chips in the system
• When one chip puts data on the bus, the other chips have to wait their turn until
the data transfer is complete
• Typically a bus has 16 or 32 parallel connection
• There are three forms of bus in a microprocessor system
1. Data bus
2. Address bus
3. Control bus
Buses

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 3


Microprocessor Systems
Data bus
• The associated with the processing function of the CPU is carried by the data
bus.
• It is used to transport a word to or from the CPU and the memory or the
input/output interfaces.
• Each wire in the bus carries a binary signal, i.e. a 0 or a 1.
• The more wires the data bus has, the longer the word length that can be used.
• The values represented by a word is 2𝑛 , where 𝑛 number of bits or word length
(number of wires).
• The earliest microprocessor were 4-bit devices and such microprocessors are
still widely used in devices such as toys, washing machines domastic central
heating controllers, etc.
Buses

• Now, 16-git, 32-bit and 64-bit microprocessors are available.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 4


Microprocessor Systems

Address bus
• Carries signals which indicate where data is to be found – memory
location.
• Each storage location within a memory device has a unique identification,
termed as address.
• Each input/output interface also has an address.
• When a particular address is selected by its address being placed on the
address bus, only that location is open to the communications from the
CPU. The CPU is thus able to communicate with just one location at a time.
• For example, the size of address bus by a 16-bit-wide address bus is 216 =
Buses

65536 locations. Usually written as 64K, where K is equal to 1024.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 5


Microprocessor Systems

Control bus
• The signals relating to control actions are carried by the control bus.
• For example, it is necessary for the microprocessor to inform memory
devices whether they are to read data from an input device or write data
to an output device.
• The term READ is used for receiving a signal and WRITE for sending a
signal.
• The control bus is also used to carry the system clock signals; they are to
synchronise all the actions of the microprocessor system.
• The clock is a crystal-controlled oscillator and produces pulses at regular
Buses

intervals.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 6


Microprocessor Systems

• The microprocessor is generally referred to as the central processing unit


(CPU).
• CPU processes the data, fetching instruction from memory, decoding them
and executing them.
• The internal structure – the term architecture is used – depends on the
microprocessor concerned.
The microprocessor

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 7


Microprocessor Systems
Arithmetic and Logic Unit (ALU)
The constituent of a microprocessor

The arithmetic and logic unit is responsible for performing the data manipulation.
Registers
Internal data that CPU is currently using is temporarily held in a group of registers
while instructions are being executed. These are memory locations within the
microprocessor and are used to store information involved in program execution.
Control Unit
The control unit determines the timing and sequence of operations. It generates
the timing signals used to fetch a program instruction from memory and execute
it. The Motorola 6800 uses a clock with a maximum frequency of 1 MHz, i.e. a
clock period of 1 𝜇𝑠, and instruction require between two and twelve clock
cycles. Operations involving the microprocessor are reckoned in terms of the
number of cycles they take.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 8


Microprocessor Systems

There are a number of types of register, the number, size and types registers
varies from one microprocessor to another.
The constituent of a microprocessor

Accumulator Register
The accumulator register (A) is where data for an input to the arithmetic and
logic unit is temporarily stored.
Supply the address of the required memory word using the address bus.
Since only one memory location can be addressed at once, temporary
storage has to be sued when, for example, numbers are combined.
For example, in the addition of two numbers, one of the number is fetched
from one address and placed in the accumulator register while the CPU
fetches the other number from the other memory address. Then the two
numbers can be processed by the arithmetic and logic section of the CPU.
The result is then transfer back into the accumulator register.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 9


Microprocessor Systems

Status Register or condition code register or flag register


The constituent of a microprocessor

This contains information concerning the result of the latest process carried
out in the arithmetic and logic unit. It contains individual bits (flags) with
each bit having special significance. The status of the latest operation is
indicated by each flag with each flag being set or reset to indicate a specific
status.
Flag Set, i.e. 1 Reset, i.e. 0
Z Result is zero Result is not zero
N Result is negative Result is not negative
C Carry is generated Carry is not generated
V Overflow occurs Overflow does not occur
I Interrupt is ignored Interrupt is processed normally

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 10


Microprocessor Systems
Program Counter Register (PC) or instruction pointer (IP)
This is the register use to allow the CPU to keep track of its position in a program. This
The constituent of a microprocessor

register contains the address of the memory location that contains the next program
instruction.
As each instruction is executed, the program counter register updated so that it contains
the address of memory location where the next instruction to be executed is stored.
The program counter is incremented each time so that the CPU executes instructions
sequentially unless an instruction, such as JUMP or BRANCH, changes the program
counter out of that sequence.
Memory Address Register (MAR)
This contains address of data.
For example, in the summing of two numbers the memory address register is loaded
with the address of the first number. The data at the address is then moved to the
accumulator. The memory address of the second number is then loaded into the memory
address register. The data at this address is then added to the data in the accumulator.
The result is then stored in a memory location addressed by the memory address
register.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 11


Microprocessor Systems

Instruction Register (IR)


The constituent of a microprocessor

This stores an instruction. After fetching an instruction from the memory via the
data bus, the CPU stores it in the instruction register. After each such fetch, the
microprocessor increments the program counter by one with the result that the
program counter points to the next instruction waiting to be fetched.
General-purpose Register
These may serve as temporary storage for data or addresses and be used in
operations involving transfers between other registers.
Stack Pointer Register (SP)
The contents of this register form an address which defines the top of the stack in
RAM. The stack is a special area of the memory in which program counter values
can be stored when a subroutine part of a program is being used.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 12


Microprocessor Systems
Memory
The memory unit in a microprocessor system stores binary data and takes the form of one or
The constituent of a microprocessor

more integrated circuits. The data may be program instruction codes of numbers being operated
on.
The
10
size of a memory unit is specified in terms of number of storage location available; 1𝐾 is
2 = 1024 location
ROM
Read-Only-Memory (ROM) stores data permanently.
ROMs are programmed with required contents during the manufacture of the integrated circuit.
ROMs do not lose their memory when power is removed.
PROM
Programmable ROM (PROM) – ROMs that can be programmed by the user.
Initially every memory cell has a fusible link which keeps its memory at 0. The 0 is permanently
changed to 1 by sending a current through the fuse to open it permanently. Once the fusible link
has been opened the data is permanently stored in the memory and cannot be further changed.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 13


Microprocessor Systems
EPROM
Erasable and Programmable ROM (EPROM) – ROMs that can be programmed and
The constituent of a microprocessor

their contents altered.


A typical EPROM chip contains a series of small electronics circuits, cells, which
can store charge. The program is stored by applying voltages to the integrated
circuit connection pins and producing a pattern of charged and uncharged cells.
The pattern remains permanently in the chip until erased by shining ultraviolet
light through a quartz window on the top of the device. This causes all the cells to
become discharge. The chip can then be reprogrammed.
EEPROM
Electrically Erasable Programmable ROM (EEPROM) – Similar to EPROM, erasure is
by applying a relatively high voltage rather than using ultraviolet light.
RAM
Temporary data is stored in a read/write memory – Random Access Memory
(RAM). Volatile in nature.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 14


Microprocessor Systems

Input/Output
The constituent of a microprocessor

The input/output operation is defined as the transfer of data between the


microprocessor and the external world (Peripherals Devices).
Because the speeds and characteristics of peripheral devices can differ
significantly from those of the microprocessor, they are connected via
interface chips. Major function of an interface chip is to synchronise data
transfers between the microprocessor and peripheral device.
In input operations the input device places the data in the data register of
the interface chip. This holds the data until is read by the microprocessor.
In output operations the microprocessor places the data in the register until
it is read by the peripheral.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 15


Examples of systems

• The Intel 8085 is an 8-bit


microprocessor produced
by Intel and introduced in March
1976.
• The "5" in the part number
highlighted the fact that the 8085
uses a single +5-volt (V) power
supply by using depletion-
mode transistors, rather than
requiring the +5 V, −5 V and +12 V
Intel 8085

supplies needed by the 8080.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 16


Examples of systems
• Data bus
AD7-AD0, it carries the least significant 8-bit
address and data bus.
• Control and status signals
These signals are used to identify the nature of
operation. There are 3 control signal and 3
status signals.
Three control signals are RD, WR & ALE.
• RD − This signal indicates that the selected
IO or memory device is to be read and is
ready for accepting data available on the
data bus.
• WR − This signal indicates that the data on
the data bus is to be written into a selected
memory or IO location.
• ALE − It is a positive going pulse generated
Intel 8085

when a new operation is started by the


microprocessor. When the pulse goes high, it
indicates address. When the pulse goes
down it indicates data.
Three status signals are IO/M, S0 & S1.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 17


Examples of systems
• IO/M
This signal is used to differentiate between IO and
Memory operations, i.e. when it is high indicates
IO operation and when it is low then it indicates
memory operation.
• S1 & S0
These signals are used to identify the type of
current operation.
• Power supply
There are 2 power supply signals − VCC & VSS.
VCC indicates +5v power supply and VSS indicates
ground signal.
• Clock signals
There are 3 clock signals, i.e. X1, X2, CLK OUT.
• X1, X2 − A crystal (RC, LC N/W) is connected at
these two pins and is used to set frequency of
Intel 8085

the internal clock generator. This frequency is


internally divided by 2.
• CLK OUT − This signal is used as the system
clock for devices connected with the
microprocessor.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 18


Examples of systems
• Interrupts & externally initiated signals
Interrupts are the signals generated by external devices to
request the microprocessor to perform a task. There are 5
interrupt signals, i.e. TRAP, RST 7.5, RST 6.5, RST 5.5, and INTR.
• INTA − It is an interrupt acknowledgment signal.
• RESET IN − This signal is used to reset the microprocessor by
setting the program counter to zero.
• RESET OUT − This signal is used to reset all the connected
devices when the microprocessor is reset.
• READY − This signal indicates that the device is ready to
send or receive data. If READY is low, then the CPU has to
wait for READY to go high.
• HOLD − This signal indicates that another master is
requesting the use of the address and data buses.
• HLDA (HOLD Acknowledge) − It indicates that the CPU has
received the HOLD request and it will relinquish the bus in
the next clock cycle. HLDA is set to low after the HOLD signal
is removed.
• Serial I/O signals
There are 2 serial signals, i.e. SID and SOD and these signals are
used for serial communication.
Intel 8085

SOD (Serial output data line) − The output SOD is set/reset as


specified by the SIM instruction.
SID (Serial input data line) − The data on this line is loaded into
accumulator whenever a RIM instruction is executed.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 19


Examples of systems

Buses
• The 8085 is an 8-bit general purpose microprocessor that can address 64K
Byte of memory.
• It has 40 pins and uses +5V for power. It can run at a maximum frequency
of 3 MHz.
• The pins on the chip can be grouped into 6 groups:
• Address Bus.
• Data Bus.
• Control and Status Signals.
• Power supply and frequency.
Intel 8085

• Externally Initiated Signals.


• Serial I/O ports.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 20


Examples of systems

Address and Data Bus System


• The address bus has 8 signal lines A8 – A15 which are unidirectional.
• The other 8 address bits are multiplexed (time shared) with the 8 data bits.
• So, the bits AD0 – AD7 are bi-directional and serve as A0 – A7 and D0 – D7 at the
same time.
• During the execution of the instruction, these lines carry the address bits
during the early part, then during the late parts of the execution, they
carry the 8 data bits.
• In order to separate the address from the data, we can use a latch to save the value
before the function of the bits changes.
Intel 8085

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 21


Examples of systems

ALE is used to demultiplex address/data bus


Intel 8085

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 22


Examples of systems

The ALU
A closer look at the 8085 Architecture

• In addition to the arithmetic & logic circuits, the ALU includes an


accumulator, which is a part of every arithmetic & logic operation.
• Also, the ALU includes a temporary register used for holding data
temporarily during the execution of the operation. This temporary register
is not accessible by the programmer.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 23


Examples of systems

The Flag register


A closer look at the 8085 Architecture

S Z X AC X P X C

Sign Carry

Zero Parity
Auxiliary
Carry
X-
Unspecified

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 24


Examples of systems
The Flag register
A closer look at the 8085 Architecture

There is also a flag register whose bits are affected by the arithmetic & logic operations.
• S-sign flag
The sign flag is set if bit D7 of the accumulator is set after an arithmetic or logic operation.
• Z-zero flag
Set if the result of the ALU operation is 0. Otherwise is reset. This flag is affected by operations on the
accumulator as well as other registers. (DCR B).
• AC-Auxiliary Carry
This flag is set when a carry is generated from bit D3 and passed to D4 . This flag is used only internally for BCD
operations.
• P-Parity flag
After an ALU operation, if the result has an even # of 1s, the p-flag is set. Otherwise it is cleared. So, the flag can
be used to indicate even parity.
• CY-carry flag
This flag is set when a carry is generated from bit D7 after an unsigned operation.
• OV-Overflow flag
This flag is set when an overflow occurs after a signed operation.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 25


Motorola M6800 Examples of systems

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 26


Microcontrollers
• 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. Control
Power dist
• Sometimes referred to as an embedded controller or store
microcontroller unit (MCU), microcontrollers are found in
vehicles, robots, office machines, medical devices, mobile Reset
radio transceivers, vending machines and home appliances, control
among other devices.
• They are essentially simple miniature personal computers Clock and
(PCs) designed to control small features of a larger timing RAM
component, without a complex front-end operating system
(OS). Microcontroller block diagram
• Embedded
– All the hardware required to run the application is provided on the
chip. typically: power, reset, clock, memory and IO.
• External memory
General

– some microcontrollers allow the connection of external memory.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 27


Microcontrollers

• The general microcontroller has pins for external connections of inputs


and outputs, power, clock and control signals.
• The pins for the inputs and outputs are grouped intro units called
input/output ports.
• Usually such ports have eight lines in order to be able to transfer an 8-bit
word of data.
• Two ports may be used for a 16-bit word, one to transmit the lower 8-bits
and the other the upper 8 bits.
• The ports can be input only, output only or programmable to be either
input or output.
General

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 28


Microcontrollers Example
• The first microprocessor 4004 was invented by Intel Corporation. 8085 and 8086 microprocessors were
also invented by Intel. In 1981, Intel introduced an 8-bit microcontroller called the 8051. It was referred
as system on a chip because it had 128 bytes of RAM, 4K byte of on-chip ROM, two timers, one serial
port, and 4 ports (8-bit wide), all on a single chip. When it became widely popular, Intel allowed other
manufacturers to make and market different flavors of 8051 with its code compatible with 8051. It
means that if you write your program for one flavor of 8051, it will run on other flavors too, regardless of
the manufacturer. This has led to several versions with different speeds and amounts of on-chip RAM.
• 8051 Flavors / Members
• 8052 microcontroller − 8052 has all the standard features of the 8051 microcontroller as well as an extra 128
bytes of RAM and an extra timer. It also has 8K bytes of on-chip program ROM instead of 4K bytes.
• 8031 microcontroller − It is another member of the 8051 family. This chip is often referred to as a ROM-less
8051, since it has 0K byte of on-chip ROM. You must add external ROM to it in order to use it, which contains
the program to be fetched and executed. This program can be as large as 64K bytes. But in the process of
adding external ROM to the 8031, it lost 2 ports out of 4 ports. To solve this problem, we can add an external
Intel 8051

I/O to the 8031

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 29


Microcontrollers Example

Comparison between 8051 Family Members


The following table compares the features available in 8051, 8052, and
8031.

Features 8051 8052 8031


ROM(bytes) 4K 8K 0K
RAM(bytes) 128 256 128
Timers 2 3 2
I/O pins 32 32 32
Serial port 1 1 1
Intel 8051

Interrupt sources 6 8 6

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 30


Microcontrollers Example
Features of 8051 Microcontroller
An 8051 microcontroller comes bundled with the following features −
• 4KB bytes on-chip program memory (ROM)
• 128 bytes on-chip data memory (RAM)
• Four register banks
• 128 user defined software flags
• 8-bit bidirectional data bus
• 16-bit unidirectional address bus
• 32 general purpose registers each of 8-bit
• 16 bit Timers (usually 2, but may have more or less)
• Three internal and two external Interrupts
Intel 8051

• Four 8-bit ports,(short model have two 8-bit ports)


• 16-bit program counter and data pointer
• 8051 may also have a number of special features such as UARTs, ADC, Op-amp, etc.
18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 31
Intel 8051 Microcontrollers Example

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 32


Microcontrollers Example
Input/Output Ports
• Port 0 can be used as an input port or an output port. Alternatively, it can be
used as a multiplexed address and data bus to access external memory.
• Port 1 can be used as an input port or an output port.
• Port 2 can be used as an input port or an output port. Alternatively, it can be
used for the high address bus to access external memory.
• Port 2 can be used as an input port or an output port. Alternatively, it can be
used as a special-purpose input/output port. The alternative functions of port 3
include interrupt and timer outputs, serial port input and output and control
signals for interfacing with external memory.
• RXD is the serial input port, TXD is the serial output port, INT0 is the external
interrupt 0, INT1 is the external interrupt 1, T0 is the timer/counter 0 external
Intel 8051

input, T1 is timer/counter 1 external input, WR is the external memory is


external memory write strobe and RD is the external memory read strobe.
• The term strobe describe as either an input or output port. Alternatively it can
be used to access external memory.
18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 33
Microcontrollers Example
ALE
• The address latch enable (ALE) pin provides an output pulse for latching
the low-order byte of the address during access to external memory.
• This allows 16-bit addresses to be used.
Intel 8051

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 34


Microcontrollers Example
PSEN
• The program store enable pin (PSEN) is the read signal pin for external
program memory and is active when low.
• It is connected to the output enable pin of external ROM or EPROM.
EA
• The external access (EA) pin is taken low for the microprocessor to access
only external program code; when high it automatically accesses internal
or external code depending on the address. Thus when the 8051 is first
reset, the program counter start at $0000 and points to the first program
instruction in the internal code memory unless EA is tied low. Then the
CPU issues a low on PSEN to enable the external code memory to be used.
Intel 8051

• This pin is also used on a microcontroller with EPROM to receive the


programming supply voltage for programming the EPROM.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 35


Microcontrollers Example
XTAL1, XTAL2
• These are the connecting pins for a crystal or external oscillator.
RESET
• A high signal on this pin for at least two machine cycles resets the
microcontroller, i. e. puts in a condition to allow an orderly system start-
up.
• Serial input/output
• Writing to the serial data buffer SBUF at address 99H loads data for
transmissions; reading SBUF accesses received data. The bit addressable
Intel 8051

serial port control register SCON at address 98H is used to control the
various modes of operations.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 36


Microcontrollers Example
Timing
• The timer mode register TMOD at address 89H is used to set the operating
mode for timer 0 and timer 1.
• It is loaded at an entity and is not individually bit addressable.
• The timer control register TCON contains status control bits for timer 0 and
timer 1.
• The upper 4 bits are used to turn the times on and off or to signal a timer
overflow.
• The lower 4 bits have nothing to do with timers but are used to detect and
Intel 8051

initiate external interrupts.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 37


Microcontrollers Example
Timing
• The source of the bit counted by to each timer is set by the C/T bit; if the
bit is low the source is the system clock divided by 12, otherwise if high it
is set to count an input from an external source. The timers can be started
by setting TR0 and TR1 to 1 and stopping by making it 0. Another method
of controlling a timer is by setting the GATE to 1 and so allowing a timer to
be controlled by the INT0 or INT1 pin on the microcontroller going to 1. In
this way an external device connected to one of these pins can control the
counter on/off.
Intel 8051

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 38


Microcontrollers Example
Interrupts
• Interrupts force the program to call subroutine located at a specified
address in memory; they are enabled by writing to the interrupt enable
register IE at address A8H.
Intel 8051

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 39


Microcontrollers Example
Interrupts
• The term special function registers is used for the input/output control
registers, like IE above, and these are located at addresses 80 to FE.
Accumulator A (ACC) is the major register used for data operations; the B
register is used for multiplication and division.
• P0, P1, P2 and P3 are the latch registers for ports 0, 1, 2 and 3.
Intel 8051

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 40


Motorola M68HC11 Microcontrollers Example

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 41


Microchip microcontrollers Microcontrollers Example

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 42


Selecting a microcontroller

1. Number of input/output pins


2. Interfaces required
3. Memory requirements
4. The number of interrupts required
5. Processing speed required

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 43


Arduino Board
• Arduino is an open-source platform used for building electronics projects.
Arduino consists of both a physical programmable circuit board (often referred
to as a microcontroller) and a piece of software, or IDE (Integrated Development
Environment) that runs on your computer, used to write and upload computer
code to the physical board.
• The Arduino platform has become quite popular with people just starting out
with electronics, and for good reason. Unlike most previous programmable
circuit boards, the Arduino does not need a separate piece of hardware (called a
programmer) in order to load new code onto the board -- you can simply use a
USB cable. Additionally, the Arduino IDE uses a simplified version of C++, making
it easier to learn to program. Finally, Arduino provides a standard form factor
that breaks out the functions of the micro-controller into a more accessible
package.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 44


Arduino Board
• Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller
platforms. The least expensive version of the Arduino module can be assembled by hand, and
even the pre-assembled Arduino modules cost less than Rs. 2000/-
• Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux
operating systems. Most microcontroller systems are limited to Windows.
• Simple, clear programming environment - The Arduino Software (IDE) is easy-to-use for
beginners, yet flexible enough for advanced users to take advantage of as well. For teachers,
it's conveniently based on the Processing programming environment, so students learning to
program in that environment will be familiar with how the Arduino IDE works.
• Open source and extensible software - The Arduino software is published as open source
tools, available for extension by experienced programmers. The language can be expanded
through C++ libraries, and people wanting to understand the technical details can make the
leap from Arduino to the AVR C programming language on which it's based. Similarly, you can
add AVR-C code directly into your Arduino programs if you want to.
• Open source and extensible hardware - The plans of the Arduino boards are published under a
Creative Commons license, so experienced circuit designers can make their own version of the
module, extending it and improving it. Even relatively inexperienced users can build
the breadboard version of the module in order to understand how it works and save money.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 45


Arduino Board
• Arduino Uno (R3)
• Arduino Nano
• Arduino Micro
• Arduino Due
• LilyPad Arduino Board
• Arduino Bluetooth
• Arduino Diecimila
Different Arduino Boards

• RedBoard Arduino Board


• Arduino Mega (R3) Board
• Arduino Leonardo Board
• Arduino Robot
• Arduino Esplora
• Arduino Pro Mic
• Arduino Ethernet
• Arduino Zero
• Fastest Arduino Board
Click here to see the details of different Arduino Boards

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 46


Arduino Board

Boarduino Kit
Different Arduino Boards

Arduino LilyPad
DIY Arduino

Arduino Uno

Arduino Mega 2560

Pune Makers ( http://www.meetup.com/Pune-Makers/ )

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 47


Arduino Board Uno R3
• This is the Arduino Uno R3. In addition to all the features of the previous board, the Uno now uses an
ATmega16U2 instead of the 8U2 found on the Uno (or the FTDI found on previous generations). This
allows for faster transfer rates and more memory. No drivers needed for Linux or Mac (inf file for
Windows is needed and included in the Arduino IDE), and the ability to have the Uno show up as a
keyboard, mouse, joystick, etc.
• The Uno R3 also adds SDA and SCL pins next to the AREF. In addition, there are two new pins placed near
the RESET pin. One is the IOREF that allow the shields to adapt to the voltage provided from the board.
The other is a not connected and is reserved for future purposes. The Uno R3 works with all existing
shields but can adapt to new shields which use these additional pins.
• The Arduino Uno is a microcontroller board based on the ATmega328. Arduino is an open-source,
prototyping platform and its simplicity makes it ideal for hobbyists to use as well as professionals. The
Arduino Uno has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs,
a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It
contains everything needed to support the microcontroller; simply connect it to a computer with a USB
cable or power it with a AC-to-DC adapter or battery to get started.
• The Arduino Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver
chip. Instead, it features the Atmega8U2 microcontroller chip programmed as a USB-to-serial converter.
• "Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The Arduino Uno
Features

and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is the latest in a
series of USB Arduino boards, and the reference model for the Arduino platform.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 48


Arduino Board Uno R3
• Microcontroller: ATmega328
• Operating Voltage: 5V
• Input Voltage (recommended): 7-12V
• Input Voltage (limits): 6-20V
• Digital I/O Pins: 14 (of which 6 provide PWM output)
• Analog Input Pins: 6
• DC Current per I/O Pin: 40 mA
• DC Current for 3.3V Pin: 50 mA
• Flash Memory: 32 KB of which 0.5 KB used by bootloader
• SRAM: 2 KB (ATmega328)
Features

• EEPROM: 1 KB (ATmega328)
• Clock Speed: 16 MHz
18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 49
USB
PWR IN
(to Computer)

RESET

SCL\SDA
(I2C Bus)

POWER
5V / 3.3V / GND
Arduino Board

Digital I\O
PWM(3, 5, 6, 9, 10, 11)

Analog
INPUTS

Pune Makers ( http://www.meetup.com/Pune-Makers/ )

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 50


Raspberry PI
• Raspberry Pi is a series of small single-board computers (SBCs) developed in
the United Kingdom by the Raspberry Pi Foundation in association
with Broadcom. The Raspberry Pi project originally leaned towards the
promotion of teaching basic computer science in schools and in developing
countries. The original model became more popular than anticipated, selling
outside its target market for uses such as robotics. It is widely used in many
areas, such as for weather monitoring, because of its low cost, modularity, and
open design. It is typically used by computer and electronic hobbyists, due to its
adoption of HDMI and USB devices.
• Raspberry Pi is popularly used for real time Image/Video Processing, IoT based
applications and Robotics applications.
• Raspberry Pi is slower than laptop or desktop but is still a computer which can
provide all the expected features or abilities, at a low power consumption.
Introduction

• Raspberry Pi Foundation officially provides Debian based Raspbian OS. Also,


they provide NOOBS OS for Raspberry Pi. We can install several Third-Party
versions of OS like Ubuntu, Archlinux, RISC OS, Windows 10 IOT Core, etc.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 51


Raspberry PI
• Raspbian OS is official Operating System available for free to use. This OS is
efficiently optimized to use with Raspberry Pi. Raspbian have GUI which includes
tools for Browsing, Python programming, office, games, etc.
• We should use SD card (minimum 8 GB recommended) to store the OS
(operating System).
• Raspberry Pi is more than computer as it provides access to the on-chip
hardware i.e. GPIOs for developing an application. By accessing GPIO, we can
connect devices like LED, motors, sensors, etc and can control them too.
• It has ARM based Broadcom Processor SoC along with on-chip GPU (Graphics
Processing Unit).
Introduction

• The CPU speed of Raspberry Pi varies from 700 MHz to 1.2 GHz. Also, it has on-
board SDRAM that ranges from 256 MB to 1 GB.
• Raspberry Pi also provides on-chip SPI, I2C, I2S and UART modules.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 52


Raspberry Pi
1. Raspberry Pi 1 Model A
2. Raspberry Pi 1 Model A+
3. Raspberry Pi 1 Model B
4. Raspberry Pi 1 Model B+
5. Raspberry Pi 2 Model B
6. Raspberry Pi 3 Model B
7. Raspberry Pi Zero
8. Raspberry Pi 4 Model B
9. Raspberry Pi Pico
Models

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 53


Raspberry Pi 4 Model B
• The Raspberry Pi 4 Model B is the
latest addition to the Raspberry Pi
brand in the computer category.
The processor speed has been
significantly increased, as have
multimedia performance, memory
and connectivity. These
improvements are noted compared
to the Raspberry Pi 3 model B+ of
the previous generation.
• However, compatibility with older
Raspberry Pi

versions remains ensured and the


power consumption remains close
to the old model.

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 54


Raspberry Pi 4 Model B
• A high-performance 64-bit quad-core
processor
• Dual display support with resolutions
up to 4K via a pair of micro-HDMI
ports
• Hardware video decoding up to 4Kp60
• 4 GB of RAM
• A connection to the dual-band
wireless local area network 2.4/5.0
GHz
• Bluetooth 5.0 / Gigabit Ethernet / USB
Features

3.0 / PoE features (via a separate HAT


PoE add-on module)

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 55


Raspberry Pi 4 Model B
• Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz
• 2GB, 4GB or 8GB LPDDR4-3200 SDRAM (depending on model)
• 2.4 GHz and 5.0 GHz IEEE 802.11ac wireless, Bluetooth 5.0, BLE
• Gigabit Ethernet
• 2 USB 3.0 ports; 2 USB 2.0 ports.
• Raspberry Pi standard 40 pin GPIO header (fully backwards compatible with previous boards)
• 2 × micro-HDMI ports (up to 4kp60 supported)
• 2-lane MIPI DSI display port
Technical Specification

• 2-lane MIPI CSI camera port


• 4-pole stereo audio and composite video port
• H.265 (4kp60 decode), H264 (1080p60 decode, 1080p30 encode)
• OpenGL ES 3.1, Vulkan 1.0
• Micro-SD card slot for loading operating system and data storage
• 5V DC via USB-C connector (minimum 3A*)
• 5V DC via GPIO header (minimum 3A*)
• Power over Ethernet (PoE) enabled (requires separate PoE HAT)
• Operating temperature: 0 – 50 degrees C ambient

18-Oct-21 Microprocessor and Microcontrollers: Prof. Vinay J. Patel 56

You might also like