Technology is constantly changing. New microcontrollers become available every year. The one thing that has stayed the same is the C programming language used to program these microcontrollers. If you would like to learn this standard language to program microcontrollers, then this book is for you!
Arduino is the hardware platform used to teach the C programming language as Arduino boards are available worldwide and contain the popular AVR microcontrollers from Atmel.
Introduction to Embedded Systems
Embedded system – classification, Hardware Components of an Embedded system.
Microcontrollers 8051 – Introduction, Architecture, Memory Organization, Instruction Set –
Programming.
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
What is the purpose of the Sabbath Law in the Torah. It is interesting to compare how the context of the law shifts from Exodus to Deuteronomy. Who gets to rest, and why?
Technology is constantly changing. New microcontrollers become available every year. The one thing that has stayed the same is the C programming language used to program these microcontrollers. If you would like to learn this standard language to program microcontrollers, then this book is for you!
Arduino is the hardware platform used to teach the C programming language as Arduino boards are available worldwide and contain the popular AVR microcontrollers from Atmel.
Introduction to Embedded Systems
Embedded system – classification, Hardware Components of an Embedded system.
Microcontrollers 8051 – Introduction, Architecture, Memory Organization, Instruction Set –
Programming.
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
What is the purpose of the Sabbath Law in the Torah. It is interesting to compare how the context of the law shifts from Exodus to Deuteronomy. Who gets to rest, and why?
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
3. OUTLINE
1) Embedded system and general purpose systems
2) What is microcontroller?
3) What are different types of microcontroller?
4) How to select controller for a given application?
5) Applications..
4. EMBEDDED SYSTEM AND
GENERAL PURPOSE COMPUTERS
System:-
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.
For example, a watch is a time displaying system.
If one of its parts fails, the watch will stop working. So we can say, in
a system, all its subcomponents depend on each other.
5. EMBEDDED SYSTEM
• Embedded means something that is attached to another thing.
• An embedded system can be thought of as a computer hardware
system having software embedded in it.
• An embedded system can be an independent system or it can be
a part of a large system.
• An embedded system is a microcontroller or microprocessor
based system which is designed to perform a specific task.
• For example, a fire alarm is an embedded system; it will sense
only smoke.
6.
7.
8. • An embedded system has three components −
• It has hardware.
• It has application software.
• It has Real Time Operating system (RTOS)
• RTOS defines the way the system works. It sets the rules
during the execution of application program.
• A small scale embedded system may not have RTOS.
11. A Microprocessor System
Contains the same 6 basic components:
–Arithmetic logic unit (ALU)
–Register array
–Control unit
–Memory
–Input unit
–Output unit
Basic Microprocessor Systems
12. MICROPROCESSOR
• Microprocessor: a CPU on a single
integrated chip (IC)
• a special type of CPU
• The brain of a computer
• E.g.:
• – 8086, 80286, 80386, 80486,
Pentium, Core 2 Duo, Core 2
Quad, K5, K6, Atholon, Atholon
64, Opteron, Phenon, PowerPC
G4, PowerPC G5, Xenon,
Broadway, Cell, …
• Contains no RAM, no ROM, no I/O
ports on chip.
14. MICROCONTROLLER :
• A microprocessor, and RAM, ROM, I/O ports, and
timer on a single chip. Also called MCU
(MicroController Unit)
• , uC
• “Computer on a chip”
• Usually not as powerful as general purpose
microprocessor
• Low power consumption, small in size, low cost.
• A lot of MCUs are application specific (as against
the general purpose microprocessor).μC
15. DIFFERENCE BETWEEN ΜP AND ΜC
Sr. No
µP µC
1 Several Instructions for moving Data from
external memory to CPU.
One or two instructions for
moving the data from
external memory to CPU.
2 In µP few pins are multi functioned. In µC large number of
pins are multi
functioned.
3 Designer can decide on the amount of
ROM, RAM and I/O ports.
Fixed program and data
memory.
4 Uses different ICs for memory and I/O Inbuilt Memory and I/O.
5 No Inbuilt timer. Inbuilt timer is there.
16.
17. 1. Meeting the computing needs of the task efficiently and
cost effectively
• speed, the amount of ROM and RAM, the number of
I/O ports and timers, size, packaging, power
consumption
• easy to upgrade
• cost per unit
2. Availability of software development tools
• assemblers, debuggers, C compilers, emulator,
simulator, technical support
3. Wide availability and reliable sources of the
microcontrollers.
Three criteria in Choosing a Microcontroller
18. – Speed
– Power consumption
– Amount of RAM and ROM on chip
– Number of I/O pins
– Cost per unit
– Packaging
HOW DO WE DECIDE WHICH MCU TO
USE?
21. BASIC MICROPROCESSOR
SYSTEMS
Architecture uses physically separate memories for
their instructions and data, requiring dedicated buses
for each of them. Instructions and operands can
therefore be fetched simultaneously.
Different program and data bus widths are possible,
allowing program and data memory to be better
optimized to the architectural requirements.
E.g.: If the instruction format requires 14 bits then program bus
and memory can be made 14-bit wide, while the data bus and
data memory remain 8-bit wide.
22. IF A DEVICE OR AN APPLICATION INVOLVES
MEASURING, STORING, CALCULATING,
CONTROLLING OR DISPLAYING INFORMATION,
THEN DEVICE CONTAINS A MICROCONTROLLER IN
IT.
24. Brief History of 8051
• 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.
25. 8051 BASIC COMPONENT
• Central Processing Unit (CPU)
• Program Memory (ROM – Read Only Memory)
• Data Memory (RAM – Random Access Memory)
• Timers and Counters
• I/O Ports (I/O – Input/Output)
• Serial Communication Interface
• Clock Circuit (Oscillator Circuit)
• Interrupt Mechanism
RAM
I/O
Port
counter
Timer
Serial
COM
Port
Microcontroller
CPU
A single chip
ROM
28. BASIC COMPONENTS PRESENT INSIDE
8051 MICROCONTROLLER
ARCHITECTURE ARE:
1. CPU (Central Processing Unit):
• CPU act as a mind of any processing machine. It synchronizes and
manages all processes that are carried out in microcontroller.
• It interprets the program stored in ROM and carries out from storage and
then performs it projected duty.
• CPU manage the different types of registers available in 8051
microcontroller.
2. Interrupts: Interrupts is a sub-routine call that given by the
microcontroller when some other program with high priority is request for
acquiring the system buses then interrupts occur in current running
program.
29. • interrupts provide a method to postpone or delay the current
process, performs a sub-routine task and then restart the
standard program again.
Types of interrupt in 8051 Microcontroller:
The five sources of interrupts in 8051 Microcontroller:
1) Timer 0 overflow interrupt - TF0
2) Timer 1 overflow interrupt - TF1
3) External hardware interrupt - INT0
4) External hardware interrupt - INT1
5) Serial communication interrupt - RI/TI
30. MEMORY:
1. For operation Micro-controller required a program.
2. This program guides the microcontroller to perform the specific
tasks.
3. This program installed in microcontroller required some on chip
memory for the storage of the program.
4. Microcontroller also required memory for storage of data and
operands for the short duration.
5. In microcontroller 8051 there is code or program memory of 4 KB
that is it has 4 KB ROM and it also comprise of data memory
(RAM) of 128 bytes.
31. BUS :
1. Bus is a group of wires which uses as a
communication canal or acts as means of
data transfer.
2. The different bus configuration includes 8,
16 or more cables. Therefore, a bus can
bear 8 bits, 16 bits all together.
32. • Timers/Counters
• Timers are used to create a time gap or delay between two events.
• The timer produces the delay according to the demand of the processor and sends the signal to the
processor once the respective delay gets produced.
• As the microcontroller is digital circuit therefore it needs timer for their operation.
• Oscillator:
• To perform timer operation inside microcontroller it required externally connected or on-chip
oscillator.
• Microcontroller is used inside an embedded system for managing the function of devices.
• Therefore, 8051 uses the two 16 bit counters and timers.
• For the operation of this timers and counters the oscillator is used inside microcontroller.
33. • Input/Output Port
• 8051 consists of 4 parallel ports of 8 bit each thereby providing
32 input-output pins.
• All the 4 ports function bidirectionally i.e., either input or
output according to the software control.
34. ACCUMULATOR
• ACC is the accumulator register. It holds most of the
results of mathematical and logical operations of the
8051.
• It is also used for all data transfer between the 8051 and
any external memory.
Register B
The register B is Used during multiply and divide
operations.
Serial Data Buffer
When transmitting data ,it holds the data to be
transmitted and while receiving ,it holds the receiving
data.
35. 1. An 8-bit CPU with two registers A (ACC or accumulator) and B
2. Internal Flash ROM of 8KB – It is a flash memory that supports in – system
programming.
3. Internal RAM of 256 bytes – The first 128 Bytes of the RAM i.e. 00H to 7FH is again
divided in to 4 banks with 8 registers (R0 – R7) in each bank, 16 bit addressable
registers and 80 general purpose registers.
4. The higher 128 Bytes of the RAM i.e. 80H to FFH consists of Special Function
Registers (SFR) which are used to control different peripherals such as Timers, Serial
Port, all I/O Ports, etc.
5. 32 I/O Pins – Arranged as 4 Ports: P0, P1, P2 and P3
6. 8-bit Stack Pointer (SP) and Processor Status Word (PSW)
7. 16-bit Program Counter (PC) and Data Pointer (DPTR)
8. Two 16-bit timers – T0 and T1
9. Interrupts – Two external and three internal
10. Oscillator and clock circuit
11. Serial Data Transmitter and Receiver for Full-Duplex operation – SBUF
12. Control Registers – SCON, PCON, TCON, TMOD, IP and IE
37. PORT
1. Term "port" refers to a group of pins on a microcontroller
which can be accessed simultaneously, or on which we can
set the desired combination of zeros and ones, or read from
them an existing status.
2. Physically, port is a register inside a microcontroller which is
connected by wires to the pins of a microcontroller. Ports
represent physical connection of Central Processing Unit with
an outside world.
3. Microcontroller uses them in order to monitor or control
other components or devices.
4. Due to functionality, some pins have twofold roles.
5. All port pins can be designated as input or output, according
to the needs of a device that's being developed.
38. IMPORTANT PINS (IO PORTS)
• One of the most useful features = 4 I/O ports (P0 - P3)
Port 0 :-P0 = (P0.0 - P0.7)
8-bit R/W - General Purpose I/O
low byte address and data bus for external
memory
Port 1 :- P1= (P1.0 - P1.7)
Only 8-bit R/W - General Purpose I/O
Port 2 :- P2 = (P2.0 - P2.7)
8-bit R/W - General Purpose I/O
high byte address for external memory
Port 3:- P3 = (P3.0 - P3.7)
General Purpose I/O
Timers(T0,T1) – ext. int (INT0, INT1) – Serial
(TXD, RXD)- RD,WR
Each port can be used as input or output (bi-direction)
40. IMPORTANT PINS
• Pins 1 to 8 − These pins are known as Port 1. This port doesn’t serve any other functions. It is
internally pulled up, bi-directional I/O port.
• Pin 9 − It is a RESET pin, which is used to reset the microcontroller to its initial values.
• Pins 10 to 17 − These pins are known as Port 3. This port serves some functions like interrupts, timer
input, control signals, serial communication signals RxD and TxD, etc.
• Pins 18 & 19 − These pins are used for interfacing an external crystal to get the system clock.
• Pin 20 − This pin provides the power supply to the circuit.
• Pins 21 to 28 − These pins are known as Port 2. It serves as I/O port. Higher order address bus signals
are also multiplexed using this port.
• Pin 29 − This is PSEN pin which stands for Program Store Enable. It is used to read a signal from the
external program memory.
• Pin 30 − This is EA pin which stands for External Access input. It is used to enable/disable the external
memory interfacing.
• Pin 31 − This is ALE pin which stands for Address Latch Enable. It is used to demultiplex the address-
data signal of port.
• Pins 32 to 39 − These pins are known as Port 0. It serves as I/O port. Lower order address and data
bus signals are multiplexed using this port.
• Pin 40 − This pin is used to provide power supply to the circuit.
41. OSCILLATOR CIRCUIT
• Oscillator circuit is used for providing a
microcontroller with a clock. Clock is needed
so that microcontroller could execute a
program or program instructions.
Machine cycle
• 8051 Clock and Instruction Cycle In 8051, one instruction
cycle consists of twelve (12) clock cycles. Instruction cycle
is sometimes called as Machine cycle by some authors.
42. •Instruction cycle of 8051
•In 8051, each instruction cycle has six states (S 1 - S 6 ).
•Each state has two pulses (P1 and P2)