Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
ETU 07421:
MICROPROCESSOR
APPLICATIONS
CLASS NOTES
MICROPROCESSORS
Overview
MICROPROCESSOR
Microprocessor
• Is a programmable digital component that in cooperates
the function of CPU on a single se...
Functional Block of
Microprocessor
Basic architecture
• Von neumann Architecture.
• Harvard architecture
Von Neumann Architecture.
• The design has a single memory bank for
storing both program and data.
• It has single bus whi...
Harvard Architecture
• Separate memory banks for program and data
storage.
• It has RAM for data storage and separate ROM
...
Comparison
Von Neumann Versus Harvard
Von Neumann Harvard
• Single memory for both
program and data
• Separate memory for
...
Advantages of Von Neumann
Architecture
• It simplifies the microcontroller chip design
because only one memory is accessed...
Advantages of Harvard
Architecture
• The Harvard architecture tends to execute
instruction in fewer instruction cycle than...
Instruction Set
• CISC- Complex Instruction Set Computer
• RISC- Reduced Instruction Set Computer
Complex Instruction Set
Computer
• Is Microprocessor that understand large number
of complex instruction but it process th...
Reduced Instruction Set
Computer
• Is Microprocessor that uses relatively
simple architecture with fewer built in
command....
Comparison
RISC versus RISC
RISC CISC
• Less number of Instruction • More number of Instruction
• All are single cycle ins...
MICROCONTROLLERS
 Is a small (micro) single chip computer designed to
perform a specific function, and the specific funct...
Functional block of
Microcontroller
Comparison
Microprocessor Versus Microcontroller
Microprocessor Microcontroller
• Memoryhastobeinterfacedexternally • Hasi...
In Summary
Microprocessor
Is a general purpose chip and is used in multifunction
computer or device with the help of mult...
Why Microcontroller?
• Task specific.
• Add computer power to the device to enable it to perform
more better at low cost.
...
Embedded System
• The system to control, monitor or assist the
operation of equipment, machinery or plant.
The term “Embed...
Common characteristics of
Embedded Systems
• Specific and single functioned
Execute a single instruction repeatedly
• Opti...
PIC Microcontrollers
MICROCONTROLLER BASED
PROJECTS
HOW TO SELECT A SUITABLE
MICROCONTROLLER FOR THE
PROJECT
Step 1: Make a list of required
hardware interfaces
Step 2: Examine the software
architecture
• How heavy or how light the processing requirements will
determine whether you ...
Step 3: Select the architecture
• Can the application get by with eight bit
architectures? How about 16 bits? Does it
requ...
Step 4: Identify Memory Needs
• Flash and RAM are two very critical
components of any microcontrollers.
Making sure that y...
Step 5: Start searching for
microcontrollers
• One place that can be a good place to
start is with a microcontroller suppl...
Step 6: Examine Costs and
Power Constraints
• Examine the power requirements and cost
of the part.
 If the device will be...
Step 7: Check part availability
• Starts checking on how available the part
is.
• What are your requirements for
availabil...
Step 8: Select a development kit
• One of the best parts of selecting a new
microcontroller is finding a development kit
t...
Step 9: Investigate compilers
and tools
• Examine the compiler and tools that are
available.
 It is important to make sur...
Step 10: Start Experimenting
Programming Language
The preferred programming language is C
language.
Why C language is preferable
language
Software Architecture
Software architecture that will be used is
Super loop Architecture.
Super loop
• A super loop is a program structure comprised of an
infinite loop, with all the tasks of the system
contained...
Why Super-loop is needed
• We have no operating system to return to,
so the application will keep looping until
the system...
Strength of Super loop
Weakness of Super loop
Compiler
• A compiler is a computer program (or set
of programs) that transforms source code
written in a programming lang...
Why Mikro C is the preferred compiler?
• lots of hardware and software libraries.
• Compiler comes with comprehensive Help...
Characteristics
• RISC CPUs
– 8-bit
– 16-bit
• Number of I/O pins: 4-70
• Memory types and sizes:
– Flash; OTP; ROM
– 0.5k...
Speeds
• All PICs require oscillators to execute
instructions:
– Internal*
(low speeds, up to 8 MHz)
– External (high spee...
A/D converters and C/C modules
• All PICs have between 0 and 16 A/D
converters with 8/10-bit resolution
• 8-16 bit Timers/...
Example: PIC16F877A
5/6 Programming pins
8 A/D channels
2 Oscillator Inputs
2 RS-232 inputs
33 I/O ports
Upcoming SlideShare
Loading in …5
×

1

Share

Download to read offline

Basics of micro controllers for biginners

Download to read offline

By Eng. Lihakanga

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Basics of micro controllers for biginners

  1. 1. ETU 07421: MICROPROCESSOR APPLICATIONS CLASS NOTES
  2. 2. MICROPROCESSORS Overview
  3. 3. MICROPROCESSOR Microprocessor • Is a programmable digital component that in cooperates the function of CPU on a single semiconducting integrated circuit. • Is the integration of number of useful function into a single IC package that has; -Ability to execute a stored set of instruction to carry out user defined task. - Ability to access the external memory chips to both read and write data to and from the memory
  4. 4. Functional Block of Microprocessor
  5. 5. Basic architecture • Von neumann Architecture. • Harvard architecture
  6. 6. Von Neumann Architecture. • The design has a single memory bank for storing both program and data. • It has single bus which is multiplexed to be used as both address bus and data bus. • The content of RAM can be used for both variable storage as well as program storage.
  7. 7. Harvard Architecture • Separate memory banks for program and data storage. • It has RAM for data storage and separate ROM for storing program • It has two separate address bus for -Program memory - Data memory
  8. 8. Comparison Von Neumann Versus Harvard Von Neumann Harvard • Single memory for both program and data • Separate memory for program and data • Single bus used to access both data and memory • Separate buses available to access program and data • Instruction parallelism is not possible • Instruction parallelism can be done • It takes more than one machine cycle (Fetching and execution are done) • It takes only one machine cycle. Fetching and execution are done simultaneous
  9. 9. Advantages of Von Neumann Architecture • It simplifies the microcontroller chip design because only one memory is accessed. • The content of RAM can be used for both variable (data) as well as program (instruction) storage
  10. 10. Advantages of Harvard Architecture • The Harvard architecture tends to execute instruction in fewer instruction cycle than Von Neumann architecture. This is because greater amount of parallelism is possible.
  11. 11. Instruction Set • CISC- Complex Instruction Set Computer • RISC- Reduced Instruction Set Computer
  12. 12. Complex Instruction Set Computer • Is Microprocessor that understand large number of complex instruction but it process them relatively slowly • Internal instruction involves many individual execution steps and thus many clock cycles. • The design is complex, costly and also instruction set consist of more than 100 instruction
  13. 13. Reduced Instruction Set Computer • Is Microprocessor that uses relatively simple architecture with fewer built in command. • Increase in speed. • Design is relatively simpler, economical and usually has less than 100 instructions
  14. 14. Comparison RISC versus RISC RISC CISC • Less number of Instruction • More number of Instruction • All are single cycle instruction • Each instruction take at least 2 or 3 machine cycle. • Design of architecture is easier and cheap • Design of architecture is complex and costly • Program length get increased due to shortage of instructions • Program length is less because variety of instructions is available • Execution speed is faster since most instruction are single cycled • Execution speed is low since the instruction takes many machine cycles • Example; PIC series, ARM processors • Examples; 8051 families, Pentium
  15. 15. MICROCONTROLLERS  Is a small (micro) single chip computer designed to perform a specific function, and the specific function is to control objects, process or events.  It is dedicated to one task or set of closely related task. It is similar to PC(it has similar components but onto a single chip) -CPU, memory (ROM and RAM). -I/O ports, serial ports. - Timers e.t.c
  16. 16. Functional block of Microcontroller
  17. 17. Comparison Microprocessor Versus Microcontroller Microprocessor Microcontroller • Memoryhastobeinterfacedexternally • Hasinbuiltprogramanddatamemory • I/Oportshastobeinterfaced • HasInbuiltdigital/analogueI/Oports • HasnointernalTimers,serialportsetc • HasTimer,serialportsandotherfeatures • Highclockrates >3GHz • Slowclockrates(4–20MHz) • Buswidthverywide • Buswidthverynarrow • Expensive • Lessexpensive
  18. 18. In Summary Microprocessor Is a general purpose chip and is used in multifunction computer or device with the help of multiple chips to handle various tasks Microcontroller Is a self contained, CPU, RAM, ROM, I/O ports and Timers on the same chip function independently as a single chip computer dedicated to specific task to control single system
  19. 19. Why Microcontroller? • Task specific. • Add computer power to the device to enable it to perform more better at low cost. • Low cost, small packaging, low power requirements. • Ideal for application in which low cost, power and space is crucial. • Easy integration with other circuits • Programmable and re-programmable.
  20. 20. Embedded System • The system to control, monitor or assist the operation of equipment, machinery or plant. The term “Embedded” reflect the fact that they are integral part of the system they control.
  21. 21. Common characteristics of Embedded Systems • Specific and single functioned Execute a single instruction repeatedly • Optimized for hardware Compact, low cost, fast, low power. • Reactive and operated in real time
  22. 22. PIC Microcontrollers
  23. 23. MICROCONTROLLER BASED PROJECTS HOW TO SELECT A SUITABLE MICROCONTROLLER FOR THE PROJECT
  24. 24. Step 1: Make a list of required hardware interfaces
  25. 25. Step 2: Examine the software architecture • How heavy or how light the processing requirements will determine whether you go with an 80 MHz DSP or an 8 MHz 8051 • Are there any high frequency control loops or sensors? • Estimate how long and how often each task will need to run • How much processing power will be needed. • The amount of computing power required will be one of the biggest requirements for the architecture and frequency of the microcontroller.(how fast a machine can perform an operation).
  26. 26. Step 3: Select the architecture • Can the application get by with eight bit architectures? How about 16 bits? Does it require a 32 bit ARM core? • Microcontroller selection can be an iterative process. You may select a 16-bit part in this step but then in a later step find that a 32 bit ARM part works better.
  27. 27. Step 4: Identify Memory Needs • Flash and RAM are two very critical components of any microcontrollers. Making sure that you don’t run out of program space or variable space is undoubtedly of highest priority.
  28. 28. Step 5: Start searching for microcontrollers • One place that can be a good place to start is with a microcontroller supplier
  29. 29. Step 6: Examine Costs and Power Constraints • Examine the power requirements and cost of the part.  If the device will be powered from a battery and mobile, then making sure the parts are low-power  If it doesn’t meet power requirements then keep weeding the list down until you have a select few.
  30. 30. Step 7: Check part availability • Starts checking on how available the part is. • What are your requirements for availability?
  31. 31. Step 8: Select a development kit • One of the best parts of selecting a new microcontroller is finding a development kit to play with and learn the inner working of the controller.
  32. 32. Step 9: Investigate compilers and tools • Examine the compiler and tools that are available.  It is important to make sure that all the necessary tools are available for the part. Without the right tools the development process could become tedious and expensive.
  33. 33. Step 10: Start Experimenting
  34. 34. Programming Language The preferred programming language is C language.
  35. 35. Why C language is preferable language
  36. 36. Software Architecture Software architecture that will be used is Super loop Architecture.
  37. 37. Super loop • A super loop is a program structure comprised of an infinite loop, with all the tasks of the system contained in that loop. • General pseudo-code for a super-loop implementation is given as: Function Main_Function() { Initialization(); Do_Forever { Check_Status(); Do_Calculations(); Output_Response(); } }
  38. 38. Why Super-loop is needed • We have no operating system to return to, so the application will keep looping until the system power is removed. • It help to perform all the tasks of the system in a reasonable amount of time • It help task to be performed in good order.
  39. 39. Strength of Super loop
  40. 40. Weakness of Super loop
  41. 41. Compiler • A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code). • The preferred compiler is Mikro C compiler
  42. 42. Why Mikro C is the preferred compiler? • lots of hardware and software libraries. • Compiler comes with comprehensive Help file and lots of ready-to-use examples designed to get you started in no time.
  43. 43. Characteristics • RISC CPUs – 8-bit – 16-bit • Number of I/O pins: 4-70 • Memory types and sizes: – Flash; OTP; ROM – 0.5k – 256k
  44. 44. Speeds • All PICs require oscillators to execute instructions: – Internal* (low speeds, up to 8 MHz) – External (high speeds, up to 40 MHz) • Instructions are executed at least at ¼ oscillator speed (4 clocks/instruction) (* Note: not all PICs have internal oscillators)
  45. 45. A/D converters and C/C modules • All PICs have between 0 and 16 A/D converters with 8/10-bit resolution • 8-16 bit Timers/Counters • Comparator Modules (0-2)
  46. 46. Example: PIC16F877A 5/6 Programming pins 8 A/D channels 2 Oscillator Inputs 2 RS-232 inputs 33 I/O ports
  • praveenpaul1806

    May. 10, 2017

By Eng. Lihakanga

Views

Total views

270

On Slideshare

0

From embeds

0

Number of embeds

3

Actions

Downloads

14

Shares

0

Comments

0

Likes

1

×