SlideShare a Scribd company logo
CSE 477 Introduction to Microcontrollers 1
Processors
 Execute programs
 Serial execution of instructions
 Simple, Universal
 Instruction execution engine: fetch/execute cycle
 flow of control determined by modifications to program counter
 instruction classes:
data: move, arithmetic and logical operations
control: branch, loop, subroutine call
interface: load, store from external memory
 Traditional architecture goal: Performance
 Caches
 Branch prediction
 Multiple/OOO issue
CSE 477 Introduction to Microcontrollers 2
Embedded Processors
 Processor is a Universal computing engine
 Program can compute arbitrary functions
 Use a processor for simple/specific tasks
 Advantages:
 High-level language
 Compilers/Debuggers
 arbitrary control structures
 arbitrary data structures
 Disadvantages:
 Cost/Size
CSE 477 Introduction to Microcontrollers 3
Embedded Processor (Microcontroller)
 Processor optimized for low cost
 No cache
 Small memory
 No disks
 4 bit/8 bit/16 bit
 No FP
 No complicated datapath
 Multicycle instruction interpretation
 Simple/no operating system
 Programs are static
 Low performance
 1 MIPS is enough if 1 ms is the time scale
 Integrate on a single chip
CSE 477 Introduction to Microcontrollers 4
General-purpose processor
 Programmed by user
 New applications are developed routinely
 General-purpose
 must handle a wide ranging variety of applications
 Interacts with environment through memory
 all devices communicate through memory
 DMA operations between disk and I/O devices
 dual-ported memory (as for display screen)
 oblivious to passage of time (takes all the time it needs)
CSE 477 Introduction to Microcontrollers 5
Embedded processors
 Programmed once by manufacturer of system
 Executes a single program (or a limited suite) with few
parameters
 Task-specific
 can be optimized for specific application
 Interacts with environment in many ways
 direct sensing and control of signal wires
 communication protocols to environment and other devices
 real-time interactions and constraints
CSE 477 Introduction to Microcontrollers 6
CPU Memory
Display
(with
dual-port
video RAM)
Disk
I/O
(serial line,
keyboard,
mouse)
Network
Interface
standard interfaces
system bus
all the parts around the
processor are usually required
Typical general-purpose architecture
CSE 477 Introduction to Microcontrollers 7
Microcontroller
ROM
I/O
Interface RAM custom
logic
medium-speed
interactions
high-speed
interactions
low-speed
interactions
standard interface
any of the parts around the
microcontroller are optional
Typical task-specific architecture
CSE 477 Introduction to Microcontrollers 8
How does this change things?
 Sense and control of environment
 processor must be able to “read” and “write” individual signal wires
 controls I/O devices directly
 Program has to do everything
 sense input bits
 change output bits
 do computation
 measure time
many applications require precise spacing of events
 Problems with this
 Precise timing?
 Too slow?
CSE 477 Introduction to Microcontrollers 9
Connecting to inputs/outputs
 Map external wire to a bit of a variable (memory or register)
 if (a & 1) . . .
 X = 2;
CSE 477 Introduction to Microcontrollers 10
Example Problem: Accelerometer Interface
 Accelerometer output has one wire!
 Acceleration coded as the duty cycle
pulse-width/cycle-length
• 20% = -128
• 80% = +127
cycle time = 10ms
 Write a C program that measures the acceleration
 Input is low-order bit of variable X
 Assign result to variable Z
 Make up whatever you need
CSE 477 Introduction to Microcontrollers 11
RD
WR
WAIT
ADDR
DATA
CPU
OE
IN
OUT
from environment
to data bus
RD
decoder
ADDR
Memory-mapped inputs
 Map external wire to a bit in the address space
of the processor
 External register buffers values coming
from environment
 map register into address space
 decoder needed to select register for reading
 output enable (OE) so that many registers can use the same data bus
CSE 477 Introduction to Microcontrollers 12
RD
WR
WAIT
ADDR
DATA
Micro-
processor
EN
IN
OUT
DATA
WR
decoder
ADDR
to environment
Memory-mapped outputs
 Map external wire to a bit in the address space
of the processor
 Connect output of memory-mapped register
to environment
 map register into address space
 decoder need to select register for writing (holds value indefinitely)
 input enable (EN) so that many registers can use the same data bus
CSE 477 Introduction to Microcontrollers 13
On-chip support for communication
 Processor may not be fast enough
 Offload standard protocols
 Built-in device drivers
 for common communication protocols
 serial-line protocols most common as they require few pins
 e.g. RS-232 serial interface
 special registers in memory space for interaction
 Increases level of integration
 pull external devices on-chip
must be standard
 eliminate need for shared memory or system bus
CSE 477 Introduction to Microcontrollers 14
Measuring Time
 Keep track of detailed timing of each instruction's execution
 highly dependent on code
 hard to use with compilers
 not enough control over code generation
 interactions with caches/instruction-buffers
 Loops to implement delays
 keep track of time in counters
 keeps processor busy counting and not doing other useful things
 Real-time clock
 sample at different points in the program
 simple difference to measure time delay
CSE 477 Introduction to Microcontrollers 15
Timers
 Separate and parallel counting unit(s)
 co-processor to microprocessor
 does not require microprocessor intervention
 in simple case, like a real-time clock
set timer/read timer
 interrupt generated when expired
 More interesting timer units
 self reloading timers for regular interrupts
 pre-scaling for measuring larger times
 started by external events
CSE 477 Introduction to Microcontrollers 16
Input/output events
 Input capture
 record precise time when input event occurred
 to be used in later handling of event
 Output compare
 set output to happen at a point in the future
 reactive outputs – set output to happen a pre-defined
time after some input
 processor can go on to do other things in the meantime
CSE 477 Introduction to Microcontrollers 17
Example Microcontroller: 8051
 Very old, very common and very cheap microcontroller
 Lots of variants
 Review online documentation
 learn how to read documentation
 Instruction set
 instruction capabilities
 timing
 Special registers and integrated I/O devices
 I/O ports
 serial interface
 Interrupt organization
 Memory space and its allocation
 Timers
CSE 477 Introduction to Microcontrollers 18
Why this choice?
 Used on the XESS board we are using
 Atmel part with 20K on-chip flash memory
 dispense with external memory for instructions
 8051
 very common microcontroller with simple instruction set
 lots of features
 lots of alternatives
 lots of support and resources
 good tools available: we will use the Keil software
Assembler
C compiler
Debugger
 we will use the C compiler mostly
requires a good understanding of the 8051 architecture

More Related Content

Similar to introduction to Microcontrollers CT8.ppt

Low cost embedded system
Low cost embedded systemLow cost embedded system
Low cost embedded systemece svit
 
An introduction to digital signal processors 1
An introduction to digital signal processors 1An introduction to digital signal processors 1
An introduction to digital signal processors 1Hossam Hassan
 
Embedded systems 101 final
Embedded systems 101 finalEmbedded systems 101 final
Embedded systems 101 finalKhalid Elmeadawy
 
typicales-210510062115.pdf
typicales-210510062115.pdftypicales-210510062115.pdf
typicales-210510062115.pdfssuser136534
 
Typical Embedded System
Typical Embedded SystemTypical Embedded System
Typical Embedded Systemanand hd
 
System_on_Chip_SOC.ppt
System_on_Chip_SOC.pptSystem_on_Chip_SOC.ppt
System_on_Chip_SOC.pptzahixdd
 
11. Computer Systems Hardware 1
11. Computer Systems   Hardware 111. Computer Systems   Hardware 1
11. Computer Systems Hardware 1New Era University
 
Embedded systems-unit-1
Embedded systems-unit-1Embedded systems-unit-1
Embedded systems-unit-1Prabhu Mali
 
Microcontroller from basic_to_advanced
Microcontroller from basic_to_advancedMicrocontroller from basic_to_advanced
Microcontroller from basic_to_advancedImran Sheikh
 
Msp 430 architecture module 1
Msp 430 architecture module 1Msp 430 architecture module 1
Msp 430 architecture module 1SARALA T
 
Software for embedded systems complete
Software for embedded systems completeSoftware for embedded systems complete
Software for embedded systems completeAnand Kumar
 
Using the Cypress PSoC Processor
Using the Cypress PSoC ProcessorUsing the Cypress PSoC Processor
Using the Cypress PSoC ProcessorLloydMoore
 
VJITSk 6713 user manual
VJITSk 6713 user manualVJITSk 6713 user manual
VJITSk 6713 user manualkot seelam
 
How to Select Hardware for Internet of Things Systems?
How to Select Hardware for Internet of Things Systems?How to Select Hardware for Internet of Things Systems?
How to Select Hardware for Internet of Things Systems?Hannes Tschofenig
 
3 embedded gr_ppapag_msp430_arch
3 embedded gr_ppapag_msp430_arch3 embedded gr_ppapag_msp430_arch
3 embedded gr_ppapag_msp430_archchandrika
 
Ppt on embedded system
Ppt on embedded systemPpt on embedded system
Ppt on embedded systemPankaj joshi
 
Microcontroller presentation
Microcontroller presentationMicrocontroller presentation
Microcontroller presentationxavierpaulino
 
Overview of ST7 8-bit Microcontrollers
Overview of ST7 8-bit MicrocontrollersOverview of ST7 8-bit Microcontrollers
Overview of ST7 8-bit MicrocontrollersPremier Farnell
 

Similar to introduction to Microcontrollers CT8.ppt (20)

Low cost embedded system
Low cost embedded systemLow cost embedded system
Low cost embedded system
 
An introduction to digital signal processors 1
An introduction to digital signal processors 1An introduction to digital signal processors 1
An introduction to digital signal processors 1
 
Embedded systems 101 final
Embedded systems 101 finalEmbedded systems 101 final
Embedded systems 101 final
 
typicales-210510062115.pdf
typicales-210510062115.pdftypicales-210510062115.pdf
typicales-210510062115.pdf
 
Typical Embedded System
Typical Embedded SystemTypical Embedded System
Typical Embedded System
 
System_on_Chip_SOC.ppt
System_on_Chip_SOC.pptSystem_on_Chip_SOC.ppt
System_on_Chip_SOC.ppt
 
11. Computer Systems Hardware 1
11. Computer Systems   Hardware 111. Computer Systems   Hardware 1
11. Computer Systems Hardware 1
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
The Cell Processor
The Cell ProcessorThe Cell Processor
The Cell Processor
 
Embedded systems-unit-1
Embedded systems-unit-1Embedded systems-unit-1
Embedded systems-unit-1
 
Microcontroller from basic_to_advanced
Microcontroller from basic_to_advancedMicrocontroller from basic_to_advanced
Microcontroller from basic_to_advanced
 
Msp 430 architecture module 1
Msp 430 architecture module 1Msp 430 architecture module 1
Msp 430 architecture module 1
 
Software for embedded systems complete
Software for embedded systems completeSoftware for embedded systems complete
Software for embedded systems complete
 
Using the Cypress PSoC Processor
Using the Cypress PSoC ProcessorUsing the Cypress PSoC Processor
Using the Cypress PSoC Processor
 
VJITSk 6713 user manual
VJITSk 6713 user manualVJITSk 6713 user manual
VJITSk 6713 user manual
 
How to Select Hardware for Internet of Things Systems?
How to Select Hardware for Internet of Things Systems?How to Select Hardware for Internet of Things Systems?
How to Select Hardware for Internet of Things Systems?
 
3 embedded gr_ppapag_msp430_arch
3 embedded gr_ppapag_msp430_arch3 embedded gr_ppapag_msp430_arch
3 embedded gr_ppapag_msp430_arch
 
Ppt on embedded system
Ppt on embedded systemPpt on embedded system
Ppt on embedded system
 
Microcontroller presentation
Microcontroller presentationMicrocontroller presentation
Microcontroller presentation
 
Overview of ST7 8-bit Microcontrollers
Overview of ST7 8-bit MicrocontrollersOverview of ST7 8-bit Microcontrollers
Overview of ST7 8-bit Microcontrollers
 

More from camillebaybayon

Baseball, Coaches and Asst coaches and Chaperon.pptx
Baseball, Coaches and Asst coaches and Chaperon.pptxBaseball, Coaches and Asst coaches and Chaperon.pptx
Baseball, Coaches and Asst coaches and Chaperon.pptxcamillebaybayon
 
SINTESIS PILING LARANG EIM FILIPINO 12.pptx
SINTESIS PILING LARANG EIM FILIPINO 12.pptxSINTESIS PILING LARANG EIM FILIPINO 12.pptx
SINTESIS PILING LARANG EIM FILIPINO 12.pptxcamillebaybayon
 
New-First-Aid-with-BLS-Presentation.pptx
New-First-Aid-with-BLS-Presentation.pptxNew-First-Aid-with-BLS-Presentation.pptx
New-First-Aid-with-BLS-Presentation.pptxcamillebaybayon
 
Module-2-Intro-to-First-Aid.pptx
Module-2-Intro-to-First-Aid.pptxModule-2-Intro-to-First-Aid.pptx
Module-2-Intro-to-First-Aid.pptxcamillebaybayon
 
Bandaging-Techniques (1).pptx
Bandaging-Techniques (1).pptxBandaging-Techniques (1).pptx
Bandaging-Techniques (1).pptxcamillebaybayon
 
Process-of-Program-Development-process.pdf
Process-of-Program-Development-process.pdfProcess-of-Program-Development-process.pdf
Process-of-Program-Development-process.pdfcamillebaybayon
 
Course-Overview-with-Diagnostic-Exam.pptx
Course-Overview-with-Diagnostic-Exam.pptxCourse-Overview-with-Diagnostic-Exam.pptx
Course-Overview-with-Diagnostic-Exam.pptxcamillebaybayon
 

More from camillebaybayon (8)

Baseball, Coaches and Asst coaches and Chaperon.pptx
Baseball, Coaches and Asst coaches and Chaperon.pptxBaseball, Coaches and Asst coaches and Chaperon.pptx
Baseball, Coaches and Asst coaches and Chaperon.pptx
 
SINTESIS PILING LARANG EIM FILIPINO 12.pptx
SINTESIS PILING LARANG EIM FILIPINO 12.pptxSINTESIS PILING LARANG EIM FILIPINO 12.pptx
SINTESIS PILING LARANG EIM FILIPINO 12.pptx
 
New-First-Aid-with-BLS-Presentation.pptx
New-First-Aid-with-BLS-Presentation.pptxNew-First-Aid-with-BLS-Presentation.pptx
New-First-Aid-with-BLS-Presentation.pptx
 
Module-2-Intro-to-First-Aid.pptx
Module-2-Intro-to-First-Aid.pptxModule-2-Intro-to-First-Aid.pptx
Module-2-Intro-to-First-Aid.pptx
 
Bandaging-Techniques (1).pptx
Bandaging-Techniques (1).pptxBandaging-Techniques (1).pptx
Bandaging-Techniques (1).pptx
 
ATHLET DJ.docx
ATHLET DJ.docxATHLET DJ.docx
ATHLET DJ.docx
 
Process-of-Program-Development-process.pdf
Process-of-Program-Development-process.pdfProcess-of-Program-Development-process.pdf
Process-of-Program-Development-process.pdf
 
Course-Overview-with-Diagnostic-Exam.pptx
Course-Overview-with-Diagnostic-Exam.pptxCourse-Overview-with-Diagnostic-Exam.pptx
Course-Overview-with-Diagnostic-Exam.pptx
 

Recently uploaded

Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxJenilouCasareno
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya - UEM Kolkata Quiz Club
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resourcesdimpy50
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxShibin Azad
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...Sayali Powar
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...Nguyen Thanh Tu Collection
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePedroFerreira53928
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportAvinash Rai
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesRased Khan
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTechSoup
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17Celine George
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345beazzy04
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfjoachimlavalley1
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online PresentationGDSCYCCE
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17Celine George
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasiemaillard
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointELaRue0
 

Recently uploaded (20)

Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptx
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matrices
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPoint
 

introduction to Microcontrollers CT8.ppt

  • 1. CSE 477 Introduction to Microcontrollers 1 Processors  Execute programs  Serial execution of instructions  Simple, Universal  Instruction execution engine: fetch/execute cycle  flow of control determined by modifications to program counter  instruction classes: data: move, arithmetic and logical operations control: branch, loop, subroutine call interface: load, store from external memory  Traditional architecture goal: Performance  Caches  Branch prediction  Multiple/OOO issue
  • 2. CSE 477 Introduction to Microcontrollers 2 Embedded Processors  Processor is a Universal computing engine  Program can compute arbitrary functions  Use a processor for simple/specific tasks  Advantages:  High-level language  Compilers/Debuggers  arbitrary control structures  arbitrary data structures  Disadvantages:  Cost/Size
  • 3. CSE 477 Introduction to Microcontrollers 3 Embedded Processor (Microcontroller)  Processor optimized for low cost  No cache  Small memory  No disks  4 bit/8 bit/16 bit  No FP  No complicated datapath  Multicycle instruction interpretation  Simple/no operating system  Programs are static  Low performance  1 MIPS is enough if 1 ms is the time scale  Integrate on a single chip
  • 4. CSE 477 Introduction to Microcontrollers 4 General-purpose processor  Programmed by user  New applications are developed routinely  General-purpose  must handle a wide ranging variety of applications  Interacts with environment through memory  all devices communicate through memory  DMA operations between disk and I/O devices  dual-ported memory (as for display screen)  oblivious to passage of time (takes all the time it needs)
  • 5. CSE 477 Introduction to Microcontrollers 5 Embedded processors  Programmed once by manufacturer of system  Executes a single program (or a limited suite) with few parameters  Task-specific  can be optimized for specific application  Interacts with environment in many ways  direct sensing and control of signal wires  communication protocols to environment and other devices  real-time interactions and constraints
  • 6. CSE 477 Introduction to Microcontrollers 6 CPU Memory Display (with dual-port video RAM) Disk I/O (serial line, keyboard, mouse) Network Interface standard interfaces system bus all the parts around the processor are usually required Typical general-purpose architecture
  • 7. CSE 477 Introduction to Microcontrollers 7 Microcontroller ROM I/O Interface RAM custom logic medium-speed interactions high-speed interactions low-speed interactions standard interface any of the parts around the microcontroller are optional Typical task-specific architecture
  • 8. CSE 477 Introduction to Microcontrollers 8 How does this change things?  Sense and control of environment  processor must be able to “read” and “write” individual signal wires  controls I/O devices directly  Program has to do everything  sense input bits  change output bits  do computation  measure time many applications require precise spacing of events  Problems with this  Precise timing?  Too slow?
  • 9. CSE 477 Introduction to Microcontrollers 9 Connecting to inputs/outputs  Map external wire to a bit of a variable (memory or register)  if (a & 1) . . .  X = 2;
  • 10. CSE 477 Introduction to Microcontrollers 10 Example Problem: Accelerometer Interface  Accelerometer output has one wire!  Acceleration coded as the duty cycle pulse-width/cycle-length • 20% = -128 • 80% = +127 cycle time = 10ms  Write a C program that measures the acceleration  Input is low-order bit of variable X  Assign result to variable Z  Make up whatever you need
  • 11. CSE 477 Introduction to Microcontrollers 11 RD WR WAIT ADDR DATA CPU OE IN OUT from environment to data bus RD decoder ADDR Memory-mapped inputs  Map external wire to a bit in the address space of the processor  External register buffers values coming from environment  map register into address space  decoder needed to select register for reading  output enable (OE) so that many registers can use the same data bus
  • 12. CSE 477 Introduction to Microcontrollers 12 RD WR WAIT ADDR DATA Micro- processor EN IN OUT DATA WR decoder ADDR to environment Memory-mapped outputs  Map external wire to a bit in the address space of the processor  Connect output of memory-mapped register to environment  map register into address space  decoder need to select register for writing (holds value indefinitely)  input enable (EN) so that many registers can use the same data bus
  • 13. CSE 477 Introduction to Microcontrollers 13 On-chip support for communication  Processor may not be fast enough  Offload standard protocols  Built-in device drivers  for common communication protocols  serial-line protocols most common as they require few pins  e.g. RS-232 serial interface  special registers in memory space for interaction  Increases level of integration  pull external devices on-chip must be standard  eliminate need for shared memory or system bus
  • 14. CSE 477 Introduction to Microcontrollers 14 Measuring Time  Keep track of detailed timing of each instruction's execution  highly dependent on code  hard to use with compilers  not enough control over code generation  interactions with caches/instruction-buffers  Loops to implement delays  keep track of time in counters  keeps processor busy counting and not doing other useful things  Real-time clock  sample at different points in the program  simple difference to measure time delay
  • 15. CSE 477 Introduction to Microcontrollers 15 Timers  Separate and parallel counting unit(s)  co-processor to microprocessor  does not require microprocessor intervention  in simple case, like a real-time clock set timer/read timer  interrupt generated when expired  More interesting timer units  self reloading timers for regular interrupts  pre-scaling for measuring larger times  started by external events
  • 16. CSE 477 Introduction to Microcontrollers 16 Input/output events  Input capture  record precise time when input event occurred  to be used in later handling of event  Output compare  set output to happen at a point in the future  reactive outputs – set output to happen a pre-defined time after some input  processor can go on to do other things in the meantime
  • 17. CSE 477 Introduction to Microcontrollers 17 Example Microcontroller: 8051  Very old, very common and very cheap microcontroller  Lots of variants  Review online documentation  learn how to read documentation  Instruction set  instruction capabilities  timing  Special registers and integrated I/O devices  I/O ports  serial interface  Interrupt organization  Memory space and its allocation  Timers
  • 18. CSE 477 Introduction to Microcontrollers 18 Why this choice?  Used on the XESS board we are using  Atmel part with 20K on-chip flash memory  dispense with external memory for instructions  8051  very common microcontroller with simple instruction set  lots of features  lots of alternatives  lots of support and resources  good tools available: we will use the Keil software Assembler C compiler Debugger  we will use the C compiler mostly requires a good understanding of the 8051 architecture