SlideShare uma empresa Scribd logo
1 de 33
Baixar para ler offline
Maths is not everything

Embedded Systems
4 - Hardware Architecture

CPU
Input/Output mechanisms
Memory
Buses and Aux I/O
Input/Output interfaces
RMR©2012

Power Management
Maths is not everything

CPU Buses

RMR©2012
CPU bus

Connects CPU to:
memory;
devices.

Maths is not everything

RMR©2012

3

© 2008 Wayne Wolf

Protocol controls communication between
entities.
Bus protocol

Determines who gets to use the bus at
any particular time.

Maths is not everything

RMR©2012

4

© 2008 Wayne Wolf

Governs length, style of communication.
Four-cycle handshake

Basis of many bus protocols.
Uses two wires:
enq (enquiry);
ack (acknowledgment).

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

enq

dev1

data
ack

dev2
Four-cycle example

enq
1

3
2

data

4

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

ack

time
Typical bus signals

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

Clock.
R/W’: true when bus is reading.
Address: a-bit bundle.
Data: n-bit bundle.
Data ready’.
Timing diagrams
one
rising

A
zero

falling

10 ns

stable
B

changing

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

C

time
Typical bus timing for read

CPU:
set R/W’=1;
asserts address, address enable.

Memory:

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

asserts data;
asserts data ready’.

CPU:
deasserts address, address enable.
Bus read state diagram

Get
data

Done

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

See ack

Adrs

Wait
Transaction types

Wait state:
state in a bus transaction to wait for acknowledgment.

Disconnected transfer:
bus is freed during wait state.

Burst:
Maths is not everything

RMR©2012

© 2008 Wayne Wolf

multiple transfers.
Maths is not everything

Auxiliary Mechanisms
Timers

RMR©2012
Timers and counters

Very similar:
a timer is incremented by a periodic signal;
a counter is incremented by an asynchronous,
occasional signal.

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

Rollover causes interrupt.
Timers

The main applications of timers are to:
generate events of fixed time-period
allow periodic wakeup from sleep of the device
count transitional signal edges
replace delay loops allowing the CPU to sleep
between operations, consuming less power
maintain synchronization clocks
Maths is not everything

RMR©2012

14
Timers (MSP430)

System timing is fundamental for real-time
applications
The MSP430F2274 has 2 timers, namely
Timer_A and Timer_B
The timers may be triggered by internal or
external clocks

Maths is not everything

RMR©2012

Timer_A and Timer_B also include multiple
independent capture/compare blocks that
are used for applications such as timed
events and Pulse Width Modulation (PWM)
Timers (MSP430) - TxCTL Control Register
15

14

13

12

11

10

(Used by Timer_B)

Bit

9

8

TxSSELx

7

6
IDx

5

4
MCx

3

2

1

0

-

TxCLR

TxIE

TxIFG

Description

9-8

0 0 ⇒ TxCLK
0 1 ⇒ ACLK
1 0 ⇒ SMCLK
1 1 ⇒ INCLK

IDx

Clock signal divider:

00⇒/1
01⇒/2
10⇒/4
11⇒/8

5-4

MCx

Clock timer operating mode:

0 0 ⇒ Stop mode
0 1 ⇒ Up mode
1 0 ⇒ Continuous mode
1 1 ⇒ Up/down mode

2

TxCLR

Timer_x clear when TxCLR = 1

1

TxIE

Timer_x interrupt enable when TxIE = 1

0
RMR©2012

Timer_x clock source:

7-6

Maths is not everything

TxSSELx

TxIFG

Timer_x interrupt pending when TxIFG = 1
Timers (MSP430) - 4 Modes of Operation

Timer reset by writing a 0 to TxR
Clock timer operating modes:
MCx Mode

Description

00

Up

The timer repeatedly counts from 0x0000 to
the value in the TxCCR0 register.

10

Continuous

The timer repeatedly counts from 0x0000 to
0xFFFF.

11

RMR©2012

The timer is halted.

01

Maths is not everything

Stop

Up/down

The timer repeatedly counts from 0x0000 to
the value in the TxCCR0 register and
back down to zero.
Timers (MSP430) - Timer Modes
Up Mode

Continuous
Mode

Maths is not everything

RMR©2012

Up/Down Mode
Timers (MSP430): Timer_A Example

Use Timer A to interrupt every 1 ms
SMCLK
.set
TIME_1MS .set

1200000
1000

TA_CTL
TA_FREQ

TASSEL_2+ID_0+MC_1+TAIE ; SMCLK, /1, UP, IE
SMCLK/TIME_1MS ; clocks / 1 ms

.set
.set

clr.w
mov.w
mov.w
bis.w
jmp

Maths is not everything

RMR©2012

&TAR
#TA_CTL,&TACTL
#TA_FREQ,&TACCR0
#LPM0+GIE,SR
$

; 1200000 clocks / second
; 1 ms = 1/1000 s

;
;
;
;
;

reset timerA
set timerA control reg
set interval (frequency)
enter LPM0 w/interrupts
will never get here!

TA_isr:
; timer A ISR
bic.w #TAIFG,&TACTL
; acknowledge interrupt
;
<<add interrupt code here>>
reti
.sect
.word

".int08"
TA_isr

; timer A section
; timer A isr
Watchdog timer

Watchdog timer is periodically reset by
system timer.
If watchdog is not reset, it generates an
interrupt to reset the host.
interrupt

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

host CPU

reset

watchdog
timer
Watchdog Timer (MSP430)

The primary function of the watchdog timer+
(WDT+) module is to perform a controlled
system restart after a software problem
occurs.
If the selected time interval expires, a
system reset is generated.

Maths is not everything

RMR©2012

If the watchdog function is not needed in an
application, the module can be configured as
an interval timer and can generate interrupts
at selected time intervals.
Watchdog Timer (MSP430)

Features of the watchdog timer+ module
include:
Four software-selectable time intervals
Watchdog mode
Interval mode
Access to WDT+ control register is password protected
Control of RST/NMI pin function
Selectable clock source
Maths is not everything

Can be stopped to conserve power
Clock fail-safe feature

RMR©2012
Watchdog Timer (MSP430) - Watchdog Power-up

After a power-up clear (PUC), the WDT+
module is automatically configured in the
watchdog mode with an initial 32768 clock
cycle reset interval using the DCOCLK.
The user must setup or halt the WDT+ prior
to the expiration of the initial reset interval.

Maths is not everything

RMR©2012
Watchdog (MSP430) example: stoping it

In Assembly
RESET:
!
mov.w
!
mov.w
!
bis.b
!
mov.w
...

In C

Maths is not everything

RMR©2012

passwd = 0x5A

#0x0300,SP
#WDTPW+WDTHOLD,&WDTCTL
#0x0f,&P1DIR
#0,r14

; Initialize stack pointer
; Stop WDT
; Set P1.0-3 output
Maths is not everything

Auxiliary I/O
Buttons & Displays

RMR©2012
Switch debouncing

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

A switch must be debounced to multiple
contacts caused by eliminate mechanical
bouncing:
Encoded keyboard

An array of switches is read by an
encoder.
N-key rollover remembers multiple key
depressions.

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

row
LED

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

Must use resistor to limit current:
Maths is not everything

Auxiliary I/O
DAC & ADC

RMR©2012
Digital-to-analog conversion

Use resistor tree:
R

bn
bn-1

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

bn-2
bn-3

2R
4R
8R

Vout
Flash A/D conversion

N-bit result requires 2n comparators:
Vin

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

encoder

...
Dual-slope conversion

Use counter to time required to charge/
discharge capacitor.
Charging, then discharging eliminates nonlinearities.

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

Vin

timer
Sample-and-hold

Required in any A/D:

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

Vin

converter

Mais conteúdo relacionado

Mais procurados

Program, Code of Program and Screen Shot of Output (UNIVERSAL DRIVER USING µ...
Program, Code of Program and  Screen Shot of Output (UNIVERSAL DRIVER USING µ...Program, Code of Program and  Screen Shot of Output (UNIVERSAL DRIVER USING µ...
Program, Code of Program and Screen Shot of Output (UNIVERSAL DRIVER USING µ...Er. Ashish Pandey
 
Part-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentPart-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentFastBit Embedded Brain Academy
 
Mastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWER
Mastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWERMastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWER
Mastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWERFastBit Embedded Brain Academy
 
Introduction to pic microcontroller
Introduction to pic microcontrollerIntroduction to pic microcontroller
Introduction to pic microcontrollerRAMPRAKASHT1
 
Arm cortex (lpc 2148) based motor speed
Arm cortex (lpc 2148) based motor speedArm cortex (lpc 2148) based motor speed
Arm cortex (lpc 2148) based motor speedUday Wankar
 
GPIO In Arm cortex-m4 tiva-c
GPIO In Arm cortex-m4 tiva-cGPIO In Arm cortex-m4 tiva-c
GPIO In Arm cortex-m4 tiva-cZakaria Gomaa
 
Manual micrologix 1100
Manual micrologix 1100Manual micrologix 1100
Manual micrologix 1100pedrocu
 
atmega 128 and communication protocol
atmega 128 and communication protocolatmega 128 and communication protocol
atmega 128 and communication protocolRashmi Deoli
 
AAME ARM Techcon2013 006v02 Implementation Diversity
AAME ARM Techcon2013 006v02 Implementation DiversityAAME ARM Techcon2013 006v02 Implementation Diversity
AAME ARM Techcon2013 006v02 Implementation DiversityAnh Dung NGUYEN
 
Fpga based motor controller
Fpga based motor controllerFpga based motor controller
Fpga based motor controllerUday Wankar
 

Mais procurados (20)

STM32 Microcontroller Clocks and RCC block
STM32 Microcontroller Clocks and RCC blockSTM32 Microcontroller Clocks and RCC block
STM32 Microcontroller Clocks and RCC block
 
Program, Code of Program and Screen Shot of Output (UNIVERSAL DRIVER USING µ...
Program, Code of Program and  Screen Shot of Output (UNIVERSAL DRIVER USING µ...Program, Code of Program and  Screen Shot of Output (UNIVERSAL DRIVER USING µ...
Program, Code of Program and Screen Shot of Output (UNIVERSAL DRIVER USING µ...
 
Part-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentPart-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver development
 
PLC
PLCPLC
PLC
 
Lecture 2 timers, pwm, state machine IN PIC
Lecture 2   timers, pwm, state machine IN PIC Lecture 2   timers, pwm, state machine IN PIC
Lecture 2 timers, pwm, state machine IN PIC
 
Mastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWER
Mastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWERMastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWER
Mastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWER
 
Introduction to pic microcontroller
Introduction to pic microcontrollerIntroduction to pic microcontroller
Introduction to pic microcontroller
 
Arm cortex (lpc 2148) based motor speed
Arm cortex (lpc 2148) based motor speedArm cortex (lpc 2148) based motor speed
Arm cortex (lpc 2148) based motor speed
 
GPIO In Arm cortex-m4 tiva-c
GPIO In Arm cortex-m4 tiva-cGPIO In Arm cortex-m4 tiva-c
GPIO In Arm cortex-m4 tiva-c
 
Timers
TimersTimers
Timers
 
Manual micrologix 1100
Manual micrologix 1100Manual micrologix 1100
Manual micrologix 1100
 
Vt plc
Vt plcVt plc
Vt plc
 
Pheripheral interface
Pheripheral interfacePheripheral interface
Pheripheral interface
 
atmega 128 and communication protocol
atmega 128 and communication protocolatmega 128 and communication protocol
atmega 128 and communication protocol
 
Micro controller
Micro controllerMicro controller
Micro controller
 
AAME ARM Techcon2013 006v02 Implementation Diversity
AAME ARM Techcon2013 006v02 Implementation DiversityAAME ARM Techcon2013 006v02 Implementation Diversity
AAME ARM Techcon2013 006v02 Implementation Diversity
 
Atmega 128 datasheet
Atmega 128   datasheetAtmega 128   datasheet
Atmega 128 datasheet
 
ARM AAE - System Issues
ARM AAE - System IssuesARM AAE - System Issues
ARM AAE - System Issues
 
Fpga based motor controller
Fpga based motor controllerFpga based motor controller
Fpga based motor controller
 
Ec8791 lpc2148 timer unit
Ec8791 lpc2148 timer unitEc8791 lpc2148 timer unit
Ec8791 lpc2148 timer unit
 

Semelhante a S emb t7-arch_bus

Lecture on PIC-1.pptx
Lecture on PIC-1.pptxLecture on PIC-1.pptx
Lecture on PIC-1.pptxgodfrey35
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxMeghdeepSingh
 
ARDUINO BASED HEART BEAT MONITORING SYSTEM
ARDUINO BASED HEART BEAT MONITORING SYSTEMARDUINO BASED HEART BEAT MONITORING SYSTEM
ARDUINO BASED HEART BEAT MONITORING SYSTEMMOHAMMAD HANNAN
 
embedded system introduction to microcontrollers
embedded system introduction to microcontrollersembedded system introduction to microcontrollers
embedded system introduction to microcontrollersBarER4
 
An Entire Concept of Embedded systems
An Entire Concept of Embedded systems An Entire Concept of Embedded systems
An Entire Concept of Embedded systems Prabhakar Captain
 
An entire concept of embedded systems entire ppt
An entire concept of embedded systems entire pptAn entire concept of embedded systems entire ppt
An entire concept of embedded systems entire pptPrabhakar Captain
 
MCF51AG ColdFire MCUs for Large Appliance And Industrial Applications
MCF51AG ColdFire MCUs for Large Appliance And Industrial ApplicationsMCF51AG ColdFire MCUs for Large Appliance And Industrial Applications
MCF51AG ColdFire MCUs for Large Appliance And Industrial ApplicationsPremier Farnell
 
Design and development of programmable controller for air sampling machine
Design and development of programmable controller for air sampling machineDesign and development of programmable controller for air sampling machine
Design and development of programmable controller for air sampling machineeSAT Journals
 
Siemens s7 300 programming
Siemens s7 300 programming Siemens s7 300 programming
Siemens s7 300 programming satyajit patra
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and RoboticsNIT Raipur
 
Temp based fan speed control
Temp based fan speed controlTemp based fan speed control
Temp based fan speed controlSai Malleswar
 
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C ProtocolInterfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C ProtocolIJERA Editor
 
Industrial training report of embedded system and robotics
Industrial training report of embedded system and roboticsIndustrial training report of embedded system and robotics
Industrial training report of embedded system and roboticsPallavi Bharti
 

Semelhante a S emb t7-arch_bus (20)

PLC General
PLC   GeneralPLC   General
PLC General
 
Lecture on PIC-1.pptx
Lecture on PIC-1.pptxLecture on PIC-1.pptx
Lecture on PIC-1.pptx
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
 
ARDUINO BASED HEART BEAT MONITORING SYSTEM
ARDUINO BASED HEART BEAT MONITORING SYSTEMARDUINO BASED HEART BEAT MONITORING SYSTEM
ARDUINO BASED HEART BEAT MONITORING SYSTEM
 
embedded system introduction to microcontrollers
embedded system introduction to microcontrollersembedded system introduction to microcontrollers
embedded system introduction to microcontrollers
 
Automation-PLC
Automation-PLCAutomation-PLC
Automation-PLC
 
An Entire Concept of Embedded systems
An Entire Concept of Embedded systems An Entire Concept of Embedded systems
An Entire Concept of Embedded systems
 
An entire concept of embedded systems entire ppt
An entire concept of embedded systems entire pptAn entire concept of embedded systems entire ppt
An entire concept of embedded systems entire ppt
 
MCF51AG ColdFire MCUs for Large Appliance And Industrial Applications
MCF51AG ColdFire MCUs for Large Appliance And Industrial ApplicationsMCF51AG ColdFire MCUs for Large Appliance And Industrial Applications
MCF51AG ColdFire MCUs for Large Appliance And Industrial Applications
 
Design and development of programmable controller for air sampling machine
Design and development of programmable controller for air sampling machineDesign and development of programmable controller for air sampling machine
Design and development of programmable controller for air sampling machine
 
Siemens s7 300 programming
Siemens s7 300 programming Siemens s7 300 programming
Siemens s7 300 programming
 
embedded system
embedded systemembedded system
embedded system
 
Embedded system
Embedded  systemEmbedded  system
Embedded system
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and Robotics
 
Temp based fan speed control
Temp based fan speed controlTemp based fan speed control
Temp based fan speed control
 
Basic plc
Basic plcBasic plc
Basic plc
 
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C ProtocolInterfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
 
BHAVESH AGRAWAL.pptx
BHAVESH AGRAWAL.pptxBHAVESH AGRAWAL.pptx
BHAVESH AGRAWAL.pptx
 
28 c64a mimemory
28 c64a  mimemory28 c64a  mimemory
28 c64a mimemory
 
Industrial training report of embedded system and robotics
Industrial training report of embedded system and roboticsIndustrial training report of embedded system and robotics
Industrial training report of embedded system and robotics
 

Mais de João Moreira

Mais de João Moreira (13)

Bolt mld1717 11100975
Bolt mld1717 11100975Bolt mld1717 11100975
Bolt mld1717 11100975
 
S emb t12-os
S emb t12-osS emb t12-os
S emb t12-os
 
S emb t11-processes
S emb t11-processesS emb t11-processes
S emb t11-processes
 
S emb t10-development
S emb t10-developmentS emb t10-development
S emb t10-development
 
S emb t9-arch_power (1)
S emb t9-arch_power (1)S emb t9-arch_power (1)
S emb t9-arch_power (1)
 
S emb t9-arch_power
S emb t9-arch_powerS emb t9-arch_power
S emb t9-arch_power
 
S emb t8-arch_itfio
S emb t8-arch_itfioS emb t8-arch_itfio
S emb t8-arch_itfio
 
S emb t6-arch_mem
S emb t6-arch_memS emb t6-arch_mem
S emb t6-arch_mem
 
S emb t5-arch_io
S emb t5-arch_ioS emb t5-arch_io
S emb t5-arch_io
 
S emb t4-arch_cpu
S emb t4-arch_cpuS emb t4-arch_cpu
S emb t4-arch_cpu
 
S emb t2-definition
S emb t2-definitionS emb t2-definition
S emb t2-definition
 
S emb t1-introduction
S emb t1-introductionS emb t1-introduction
S emb t1-introduction
 
S emb t13-freertos
S emb t13-freertosS emb t13-freertos
S emb t13-freertos
 

Último

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 

Último (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

S emb t7-arch_bus

  • 1. Maths is not everything Embedded Systems 4 - Hardware Architecture CPU Input/Output mechanisms Memory Buses and Aux I/O Input/Output interfaces RMR©2012 Power Management
  • 2. Maths is not everything CPU Buses RMR©2012
  • 3. CPU bus Connects CPU to: memory; devices. Maths is not everything RMR©2012 3 © 2008 Wayne Wolf Protocol controls communication between entities.
  • 4. Bus protocol Determines who gets to use the bus at any particular time. Maths is not everything RMR©2012 4 © 2008 Wayne Wolf Governs length, style of communication.
  • 5. Four-cycle handshake Basis of many bus protocols. Uses two wires: enq (enquiry); ack (acknowledgment). Maths is not everything RMR©2012 © 2008 Wayne Wolf enq dev1 data ack dev2
  • 6. Four-cycle example enq 1 3 2 data 4 Maths is not everything RMR©2012 © 2008 Wayne Wolf ack time
  • 7. Typical bus signals Maths is not everything RMR©2012 © 2008 Wayne Wolf Clock. R/W’: true when bus is reading. Address: a-bit bundle. Data: n-bit bundle. Data ready’.
  • 8. Timing diagrams one rising A zero falling 10 ns stable B changing Maths is not everything RMR©2012 © 2008 Wayne Wolf C time
  • 9. Typical bus timing for read CPU: set R/W’=1; asserts address, address enable. Memory: Maths is not everything RMR©2012 © 2008 Wayne Wolf asserts data; asserts data ready’. CPU: deasserts address, address enable.
  • 10. Bus read state diagram Get data Done Maths is not everything RMR©2012 © 2008 Wayne Wolf See ack Adrs Wait
  • 11. Transaction types Wait state: state in a bus transaction to wait for acknowledgment. Disconnected transfer: bus is freed during wait state. Burst: Maths is not everything RMR©2012 © 2008 Wayne Wolf multiple transfers.
  • 12. Maths is not everything Auxiliary Mechanisms Timers RMR©2012
  • 13. Timers and counters Very similar: a timer is incremented by a periodic signal; a counter is incremented by an asynchronous, occasional signal. Maths is not everything RMR©2012 © 2008 Wayne Wolf Rollover causes interrupt.
  • 14. Timers The main applications of timers are to: generate events of fixed time-period allow periodic wakeup from sleep of the device count transitional signal edges replace delay loops allowing the CPU to sleep between operations, consuming less power maintain synchronization clocks Maths is not everything RMR©2012 14
  • 15. Timers (MSP430) System timing is fundamental for real-time applications The MSP430F2274 has 2 timers, namely Timer_A and Timer_B The timers may be triggered by internal or external clocks Maths is not everything RMR©2012 Timer_A and Timer_B also include multiple independent capture/compare blocks that are used for applications such as timed events and Pulse Width Modulation (PWM)
  • 16. Timers (MSP430) - TxCTL Control Register 15 14 13 12 11 10 (Used by Timer_B) Bit 9 8 TxSSELx 7 6 IDx 5 4 MCx 3 2 1 0 - TxCLR TxIE TxIFG Description 9-8 0 0 ⇒ TxCLK 0 1 ⇒ ACLK 1 0 ⇒ SMCLK 1 1 ⇒ INCLK IDx Clock signal divider: 00⇒/1 01⇒/2 10⇒/4 11⇒/8 5-4 MCx Clock timer operating mode: 0 0 ⇒ Stop mode 0 1 ⇒ Up mode 1 0 ⇒ Continuous mode 1 1 ⇒ Up/down mode 2 TxCLR Timer_x clear when TxCLR = 1 1 TxIE Timer_x interrupt enable when TxIE = 1 0 RMR©2012 Timer_x clock source: 7-6 Maths is not everything TxSSELx TxIFG Timer_x interrupt pending when TxIFG = 1
  • 17. Timers (MSP430) - 4 Modes of Operation Timer reset by writing a 0 to TxR Clock timer operating modes: MCx Mode Description 00 Up The timer repeatedly counts from 0x0000 to the value in the TxCCR0 register. 10 Continuous The timer repeatedly counts from 0x0000 to 0xFFFF. 11 RMR©2012 The timer is halted. 01 Maths is not everything Stop Up/down The timer repeatedly counts from 0x0000 to the value in the TxCCR0 register and back down to zero.
  • 18. Timers (MSP430) - Timer Modes Up Mode Continuous Mode Maths is not everything RMR©2012 Up/Down Mode
  • 19. Timers (MSP430): Timer_A Example Use Timer A to interrupt every 1 ms SMCLK .set TIME_1MS .set 1200000 1000 TA_CTL TA_FREQ TASSEL_2+ID_0+MC_1+TAIE ; SMCLK, /1, UP, IE SMCLK/TIME_1MS ; clocks / 1 ms .set .set clr.w mov.w mov.w bis.w jmp Maths is not everything RMR©2012 &TAR #TA_CTL,&TACTL #TA_FREQ,&TACCR0 #LPM0+GIE,SR $ ; 1200000 clocks / second ; 1 ms = 1/1000 s ; ; ; ; ; reset timerA set timerA control reg set interval (frequency) enter LPM0 w/interrupts will never get here! TA_isr: ; timer A ISR bic.w #TAIFG,&TACTL ; acknowledge interrupt ; <<add interrupt code here>> reti .sect .word ".int08" TA_isr ; timer A section ; timer A isr
  • 20. Watchdog timer Watchdog timer is periodically reset by system timer. If watchdog is not reset, it generates an interrupt to reset the host. interrupt Maths is not everything RMR©2012 © 2008 Wayne Wolf host CPU reset watchdog timer
  • 21. Watchdog Timer (MSP430) The primary function of the watchdog timer+ (WDT+) module is to perform a controlled system restart after a software problem occurs. If the selected time interval expires, a system reset is generated. Maths is not everything RMR©2012 If the watchdog function is not needed in an application, the module can be configured as an interval timer and can generate interrupts at selected time intervals.
  • 22. Watchdog Timer (MSP430) Features of the watchdog timer+ module include: Four software-selectable time intervals Watchdog mode Interval mode Access to WDT+ control register is password protected Control of RST/NMI pin function Selectable clock source Maths is not everything Can be stopped to conserve power Clock fail-safe feature RMR©2012
  • 23. Watchdog Timer (MSP430) - Watchdog Power-up After a power-up clear (PUC), the WDT+ module is automatically configured in the watchdog mode with an initial 32768 clock cycle reset interval using the DCOCLK. The user must setup or halt the WDT+ prior to the expiration of the initial reset interval. Maths is not everything RMR©2012
  • 24. Watchdog (MSP430) example: stoping it In Assembly RESET: ! mov.w ! mov.w ! bis.b ! mov.w ... In C Maths is not everything RMR©2012 passwd = 0x5A #0x0300,SP #WDTPW+WDTHOLD,&WDTCTL #0x0f,&P1DIR #0,r14 ; Initialize stack pointer ; Stop WDT ; Set P1.0-3 output
  • 25. Maths is not everything Auxiliary I/O Buttons & Displays RMR©2012
  • 26. Switch debouncing Maths is not everything RMR©2012 © 2008 Wayne Wolf A switch must be debounced to multiple contacts caused by eliminate mechanical bouncing:
  • 27. Encoded keyboard An array of switches is read by an encoder. N-key rollover remembers multiple key depressions. Maths is not everything RMR©2012 © 2008 Wayne Wolf row
  • 28. LED Maths is not everything RMR©2012 © 2008 Wayne Wolf Must use resistor to limit current:
  • 29. Maths is not everything Auxiliary I/O DAC & ADC RMR©2012
  • 30. Digital-to-analog conversion Use resistor tree: R bn bn-1 Maths is not everything RMR©2012 © 2008 Wayne Wolf bn-2 bn-3 2R 4R 8R Vout
  • 31. Flash A/D conversion N-bit result requires 2n comparators: Vin Maths is not everything RMR©2012 © 2008 Wayne Wolf encoder ...
  • 32. Dual-slope conversion Use counter to time required to charge/ discharge capacitor. Charging, then discharging eliminates nonlinearities. Maths is not everything RMR©2012 © 2008 Wayne Wolf Vin timer
  • 33. Sample-and-hold Required in any A/D: Maths is not everything RMR©2012 © 2008 Wayne Wolf Vin converter