embedded systems design. general purpose processors: software basic architecture - datapath basic...

Post on 27-Dec-2015

222 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Embedded Embedded SystemsSystems

DesignDesign

General Purpose Processors: General Purpose Processors: SoftwareSoftware

BASIC ARCHITECTUREBASIC ARCHITECTURE - Datapath - Datapath

2

3

ControllerController

4

MemoryMemory

5

Operation: PipeliningOperation: Pipelining

6

Instruction Set: Addressing ModeInstruction Set: Addressing Mode

7

Instruction SetInstruction Set

8

Program Memory SpaceProgram Memory Space

The programmer must be aware of the size The programmer must be aware of the size of the available memoryof the available memory

9

RegistersRegisters

The programmer must know the general The programmer must know the general purpose registers and special function purpose registers and special function registers.registers.

Example: registers for storing Wireless Example: registers for storing Wireless configurationconfiguration

10

I/OI/O

The programmer must be aware of the The programmer must be aware of the processor’s input and output settings.processor’s input and output settings.

What registers are assigned for bit I/O What registers are assigned for bit I/O settingsetting

11

InterruptsInterrupts

An interrupt causes the processor to An interrupt causes the processor to suspend execution of the main program, and suspend execution of the main program, and jump to an Interrupt Service Routine.jump to an Interrupt Service Routine.

The programmer must know the name of The programmer must know the name of the ISR.the ISR.

Example: Timer, Port Interrupt, ADC Example: Timer, Port Interrupt, ADC Interrupt and Data Ready interruptInterrupt and Data Ready interrupt

12

Operating SystemOperating System

An operating system is a layer of software An operating system is a layer of software that provides low level services to the that provides low level services to the application layerapplication layer

13

Development EnvironmentDevelopment Environment AssemblerAssembler CompilerCompiler DebuggerDebugger Device ProgrammerDevice Programmer EmulatorEmulator Development boardDevelopment board Breakout boardBreakout board

14

Selecting MicrocontrollersSelecting Microcontrollers

15

Standard Processors - PeripheralsStandard Processors - Peripherals

TimerTimer Question:Question:

16

TimerTimer

17

TimerTimer

18

Peripheral - PWMPeripheral - PWM

QuestionQuestion

19

Stepper MotorStepper Motor

20

Stepper MotorStepper Motor

21

ADCADC An analog-to-digital converter (ADC, A/D or

A2D) converts an analog signal to adigital signal, and a digital-to-analog converter (DAC, D/A or D2A) does the opposite.Such conversions are necessary because, while embedded systems deal with digitalvalues, an embedded system’s surroundings typically involve many analog signals.

22

ADCADC

23

ADCADC

24

SolutionSolution

25

ADC: Successive ApproximationADC: Successive Approximation

26

SolutionSolution

27

UARTUART A UART (Universal Asynchronous Receiver/Transmitter)

receives serial data and stores it as parallel data (usually one byte), and takes parallel data and transmits it as serial data

Require creating a routine to send data serially over an I/O port, making use of a timer to control the rate. It would also require using an interrupt service routine to capture serial data coming from another I/O port whenever such data begins arriving.

28

What is wrong with serial port?What is wrong with serial port? Because serial ports are Because serial ports are asynchronousasynchronous (no clock data (no clock data

is transmitted), devices using them must agree ahead is transmitted), devices using them must agree ahead of time on a data rate.of time on a data rate.

Asynchronous serial ports require hardware Asynchronous serial ports require hardware overhead–the UART at either end is relatively.overhead–the UART at either end is relatively.

Another core fault in asynchronous serial ports is that Another core fault in asynchronous serial ports is that they are inherently suited to communications between they are inherently suited to communications between two, and only two, devicestwo, and only two, devices

29

SPISPI The Serial Peripheral Interface (SPI) bus is a synchronous The Serial Peripheral Interface (SPI) bus is a synchronous

serial communication interface specification used for serial communication interface specification used for short distance communication, primarily in embedded short distance communication, primarily in embedded systems. The interface was developed by systems. The interface was developed by MotorolaMotorola and and has become a de facto standard.has become a de facto standard.

30

How SPI works?How SPI works?

31

SPI Logic AnalyzerSPI Logic Analyzer

32

What is wrong with SPI?What is wrong with SPI? The most obvious drawback of SPI is the The most obvious drawback of SPI is the

number of pins required. Connecting a number of pins required. Connecting a single master to a single slave with an SPI single master to a single slave with an SPI bus requires four linesbus requires four lines

33

I2CI2C I²C (Inter-Integrated Circuit), pronounced I-I²C (Inter-Integrated Circuit), pronounced I-

squared-C, is a multi-master, multi-slave, squared-C, is a multi-master, multi-slave, single-ended, serial computer bus invented single-ended, serial computer bus invented by Philips Semiconductor (known today as by Philips Semiconductor (known today as NXP Semiconductors)NXP Semiconductors)

34

How I2C works?How I2C works?

35

I2C Logic AnalyzerI2C Logic Analyzer

36

I2CI2C most Imost I22C devices can communicate at C devices can communicate at

100kHz or 400kHz.100kHz or 400kHz. There is some overhead with IThere is some overhead with I22C; for every C; for every

8 bits of data to be sent, one extra bit of 8 bits of data to be sent, one extra bit of meta data (the “ACK/NACK” bit) must be meta data (the “ACK/NACK” bit) must be transmitted.transmitted.

37

Real Time Clock (RTC)Real Time Clock (RTC) Much like a digital wristwatch, a real-time

clock (RTC) keeps the time and date inan embedded system. Read-time clocks are typically composed of a crystal-controlledoscillator, numerous cascaded counters, and a battery backup.

38

LCDLCD

39

Others PeripheralsOthers Peripherals

40

Watchdog TimerWatchdog Timer A watchdog timer (WDT; sometimes

called a computer operating properly or COP timer, or simply a watchdog) is an electronic timer that is used to detect and recover from computer malfunctions.

41

AESAES AES (advanced encryption standard)AES (advanced encryption standard) Secure Microcontrollers Keep Data SafeSecure Microcontrollers Keep Data Safe Secure MCU offerings range from 8-bit to Secure MCU offerings range from 8-bit to

32-bit CPUs with dedicated encryption 32-bit CPUs with dedicated encryption engines, random number generators, and engines, random number generators, and additional features to secure communication additional features to secure communication channels and protected datachannels and protected data

42

CRCCRC

A Cyclic Redundancy Check (CRC) is a A Cyclic Redundancy Check (CRC) is a verification method used to ensure that data verification method used to ensure that data being sent is not corrupted during transfer. being sent is not corrupted during transfer.

The use of CRCs is common in The use of CRCs is common in communication mediums that transmit communication mediums that transmit digital data, such as WiFi and Ethernet.digital data, such as WiFi and Ethernet.

43

Analog ComparatorAnalog Comparator An analog comparator is a device that An analog comparator is a device that

compares two (2) analog values and compares two (2) analog values and indicate which is greater. In electronics it is indicate which is greater. In electronics it is basically an amplifier without feedback and basically an amplifier without feedback and thus very high gain, as shown below. When thus very high gain, as shown below. When the positive input (+) is greater the output the positive input (+) is greater the output voltage is saturated to its positive supply voltage is saturated to its positive supply (logic 1), otherwise the output is saturated (logic 1), otherwise the output is saturated to is negative supply ( logic 0). to is negative supply ( logic 0).

44

IrDAIrDA IrDA, similar to UART, is a standard used IrDA, similar to UART, is a standard used

for transmitting data by IR (infrared). The for transmitting data by IR (infrared). The standard is optimized based on various standard is optimized based on various factors such as resistance to environmental factors such as resistance to environmental noise, etc.noise, etc.

45

Hardware MultiplierHardware Multiplier

Processing of digital signals is very Processing of digital signals is very demanding. One of the biggest problems is demanding. One of the biggest problems is the multiplication required for processing of the multiplication required for processing of digital signals.digital signals.

The multipliers owing to their high The multipliers owing to their high complexities are difficult to be built-in in complexities are difficult to be built-in in the majority of micoprocessors or the majority of micoprocessors or microcontrollers. microcontrollers.

46

Cont.Cont. A multiplier is a part of the microprocessor A multiplier is a part of the microprocessor

or microcontroller only in the applications or microcontroller only in the applications when it is absolutely necessary, such as when it is absolutely necessary, such as digital signal processingdigital signal processing

47

ContCont

The megaAVR is a series of new devices in the AVR RISC Microcontroller family that includes, among other new enhancements, a hardware multiplier. This multiplier is capable of multiplying two 8-bit numbers, giving a 16-bit result using only two clock cycles.

The component that makes a dedicated digital signal processor (DSP) specially suitable for signal processing is the Multiply-Accumulate (MAC) unit. This unit isfunctionally equivalent to a multiplier directly connected to an Arithmetic Logic Unit(ALU).

48

USBUSB

The Universal Serial Bus, or USB, has grown in The Universal Serial Bus, or USB, has grown in popularity due to its simple physical layer popularity due to its simple physical layer interface, its flexibility, and ease of integrating – interface, its flexibility, and ease of integrating – both at the hardware and software levels. both at the hardware and software levels. Standardized and integrated connectors make it Standardized and integrated connectors make it easy to interface an MCU to the USB cableeasy to interface an MCU to the USB cable

49

LCD controller and driver LCD controller and driver Our new LCD drivers are also ideal to drive Our new LCD drivers are also ideal to drive

touch sensitive LCDs in combination with touch sensitive LCDs in combination with an capacitive touch controller to implement an capacitive touch controller to implement touch buttons on the display touch buttons on the display

50

Capacitive TouchCapacitive Touch Many modern MCU come with an Many modern MCU come with an

integrated peripheral touch controller (PTC) integrated peripheral touch controller (PTC) for capacitive touch applicationsfor capacitive touch applications

Ideal for capacitive touch button, slider, Ideal for capacitive touch button, slider, wheel or proximity sensing applications wheel or proximity sensing applications

51

CrossbarCrossbar Silicon Labs’ patented crossbar technology Silicon Labs’ patented crossbar technology

enables maximum flexibility and allows designers enables maximum flexibility and allows designers to select needed peripherals without pin out to select needed peripherals without pin out conflicts.conflicts.

52

top related