IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -1 1 UNIT 1

Size: px
Start display at page:

Download "IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -1 1 UNIT 1"

Transcription

1 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -1 1 UNIT 1 1. Embedded Systems Introduction (Definition, Applications and Classification) Elements of Embedded systems RISC Vs CISC Harvard Architecture & Von-Neumann Memory mapped I/O and Isolated I/O Little-Endian and Big-Endian Low Power RISC- MSP 430 : Introduction & Variants of MSP 430 family MSP430F Block diagram & features Memory map of MSP MSP430 CPU architecture & registers Addressing modes of MSP Instruction formats & Instruction Timings of MSP Instruction set of MSP Sample Embedded system on MSP EMBEDDED SYSTEMS - INTRODUCTION 1.1. Definition : An embedded system is an electronic/electro-mechanical system designed to perform a specific function and is combination of both hardware and firmware (software). The program instructions written for embedded systems are referred to as firmware, and are stored in Read-Only-Memory or Flash memory. Every ES is unique, and the hardware as well as software is highly specialized to the application domain. Embedded systems are designed to do some specific task, rather than be a general purpose computer for multiple tasks Characteristics of Embedded System Unlike general purpose computing system, embedded systems have certain specific characteristics. These characteristics are unique to each embedded system. 1. Application and Domain Specific 2. Reactive and Real Time 3. Operates in harsh environments 4. Distributed 5. Small size and weight 6. Power concerns 1.3. Quality attributes of Embedded Systems (a) Operational Quality Attributes : These are related to the embedded system when it is in the operational mode (or) online mode. 1. Response 2. Throughput 3. Reliability 4. Maintainability 5. Security 6. Safety

2 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -1 2 (b) Non-Operational Quality Attributes: These attributes are addressed for the product. 1. Testability and Debug ability 2. Evolvability can be modified to take advantage of new technology 3. Portability 4. Time to prototype and market 5. Per Unit & Total cost 1.4. Application of Embedded Systems The embedded systems are used in various domains. Within the domain itself, according to the application, they may have different functionalities. Each embedded system is designed to serve the purpose of any one or a combination of the following tasks: Purpose of Embedded System Data Collection/Storage/Representation Data communication Data signal processing Monitoring Control Application specific user interface The different applications/examples of Embedded systems are given below 1. Consumer Electronics: Camcorders, Cameras. 2. Household appliances: Digital TVs, DVD players, Set top boxes, Washing machine, Refrigerator. 3. Automotive industry: Anti-lock breaking system (ABS), engine control, automatic navigation system, engine control 4. Home automation & security systems: Air conditioners, sprinklers, fire alarms, closed circuit television cameras, home security system 5. Telecom: Cellular phones, telephone switches, handset multimedia applications 6. Computer peripherals: Printers, scanners, fax machines 7. Computer networking systems: Network routers, switches, hubs, firewalls 8. Healthcare: EEG, ECG machines. 9. Banking & Retail: Automatic teller machines(atm), currency counters, point of sales. 10. Card Readers: Barcode, smart card readers. 11. Measurements & Instrumentation : Logic Analyzers, Spectrum analyzers, PLC systems, Electronic data acquisition and supervisory control system, industrial process controller, digital meters 12. Missiles and Satellites : Defense, Aerospace, Communication, tracking system 13. Robotics : stepper motor controllers for a robotic system 14. Motor control systems : accurate control of speed and position of dc motor 15. Entertainment systems : video games, music system 16. Signal & Image processing : speech processing, pattern recognizer, video processing

3 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT General Purpose Computing System Vs Embedded System : General Purpose Computing system It is combination of generic hardware and a general purpose OS for executing a variety of applications. It contains general purpose operating system Applications are alterable (programmable) by the user. Performance is the key deciding factor in the selection of the system. Always faster is better. Less tailored towards reduced operating power requirements, options for different levels of power management. Response requirements are not time-critical. Need not be deterministic in execution behavior. Embedded system It is combination of special purpose hardware and embedded OS for executing specific set of applications It may or may not contain an operating system for functioning. Applications are non-alterable by the user. Application specific Requirements (performance, power requirements, memory usage, size, design and manufacturing cost, etc) are the key deciding factors. Highly tailored to take the advantage of the power saving modes supported by the hardware and the operating system. For certain category of embedded systems like mission critical systems, the response time requirement is highly critical. Execution behavior is deterministic for certain types of Embedded systems like Hard Real Time systems Classification of Embedded Systems The classification of embedded system is based on following criteria's: (a) On generation (b) On complexity & performance (c) On deterministic behaviour (d) On triggering (a) Classification based on generation 1. First generation(1g): Built around 8-bit microprocessors like 8085, Z80 and 4-bit microcontrollers. Simple in hardware circuit with firmware developed in Assembly code. Examples: Digital telephone keypads, stepper motor control units 2. Second generation(2g): Built around 16-bit μp and 8-bit μc. They are more complex & powerful than 1G μp & μc. Examples: Data Acquisition system (DAS), Supervisory Control and Data Acquisition systems (SCADA)

4 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT Third generation(3g): Built around 32-bit μp & 16-bit μc. A new concept of application and domain specific processors / controllers like Digital Signal Processors(DSPs), Application Specific Integrated Circuits(ASICs). Examples: Robotics, Media, Industrial process control, networking, etc. 4. Fourth generation: Built around 64-bit μp & 32-bit μc. The concept of System on Chips (SoC), reconfigurable processors, multi-core processors High performance, tight integration, miniaturization, and very powerful. Examples: Smart Phones, Mobile Internet Devices (b) Classification based on Complexity and performance 1. Small-scale: Simple applications where the performance requirements are not time-critical. Built around low performance and low cost 8 or 16 bit μp/μc. Example: an electronic toy 2. Medium-scale: Slightly complex in hardware and firmware requirement. Built around medium performance and low cost 16 or 32 bit μp/μc. Usually contain embedded operating system ( either general purpose / RTOS) for functioning Examples: Industrial machines. 3. Large-scale: Highly complex hardware & firmware. Built around 32 or 64 bit RISC μp/μc or PLDs or SoC or multi-core processors. Response is time-critical. Examples: Mission critical applications. (c) Classification based on deterministic behavior This classification is applicable for Real Time systems. The task execution behavior for an embedded system may be deterministic or nondeterministic. Based on execution behavior Real Time embedded systems are divided into Hard and Soft. (d) Classification based on triggering Embedded systems which are Reactive in nature can be based on triggering. Reactive systems can be Event triggered (or) Time triggered

5 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT ELEMENTS OF EMBEDDED SYSTEM : Embedded systems are basically designed to regulate a physical variable (or) to manipulate the state of some devices by sending some signals to the actuators or devices connected to the output ports of the system, in response to the input signals provided by the end users or sensors which are connected to the input ports. Hence the embedded systems can be viewed as a reactive system. The control is achieved by processing the information coming from the sensors and user interfaces and controlling some actuators that regulate the physical variable. Common user interface input devices : Keyboards, push button, switches, etc. Common user interface output devices : LEDs, LCD, Buzzers etc Note that it is not necessary that all ES should incorporate these I/O user interfaces. It depends on the type of application in which the ES is designed. For ex., if the ES is designed for any handheld application such as a mobile handset, the system should contain user interfaces like keyboard, display unit, speakers, microphone etc. Some Embedded Systems do not require any manual intervention for their operation. They automatically sense the variations in the input parameters using sensors which are connected to the input port, and the processor performs some pre-defined operations with the help of firmware embedded in the system and sends some actuating signals to the actuators connected to the output port of the Embedded system. Sensors connected to the input port to sense/detect the changes in the input variables converts input variables into electrical signals for any measurements/ control purpose Actuators connected at the output port converts electrical signals into corresponding physical action. Figure.1 : Elements of an Embedded System The memory of the system is responsible for holding the control algorithm and other important configuration details. Memory for implementing the code may be present on the processor or may be implemented as a separate chip interfacing the processor. In a controller based embedded system, the controller may contain internal memory for storing code.

6 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -1 6 Embedded systems are domain and application specific and are built around a central core. The core of the embedded system falls into any of the following categories: 1. General purpose and Domain Specific Processors 2. Microprocessors 3. Microcontrollers 4. Digital Signal Processors 5. Application Specific Integrated Circuits (ASIC) 6. Complex Programmable Logic Devices (CPLD s) 7. Field Programmable Gate Arrays (FPGA) 8. Commercial off-the-shelf components (COTS) Almost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor or a microcontroller or digital signal processor, depending on the domain and application. Most of the ES in industrial control and monitoring applications make use of the commonly available microprocessors and microcontrollers whereas domains which require signal processing such as speech coding, speech recognition..etc make use of special kind of digital signal processors supplied by manufacturers like Analog Devices, Texas Instruments,..etc Microprocessors A microprocessor is a silicon chip representing a central processing unit (CPU), which is capable of performing arithmetic and logic operations according to a pre-defined set of instructions. In general, the CPU contains ALU, Control Unit and working registers. A microprocessor is a dependent unit and it requires the combination of other hardware like memory, timers, interrupt controller and I/O ports, etc. for proper functioning. Microprocessors are used in general purpose applications. Microcontrollers A microcontroller is an integrated chip that contains CPU, data and program memory ( RAM and ROM), special and general purpose registers, Timers, Interrupt control unit and dedicated I/O ports. Since a microcontroller contains all the necessary functional blocks for independent working, they found greater place in embedded domain. Microcontrollers are application oriented and used in domain-specific applications. Digital Signal Processors DSPs are powerful special purpose 8/16/32 bit processors, designed specifically to meet the computational demands and power constraints of today s embedded audio, video and communication applications. DSP are 2 to 3 times faster than general purpose microprocessors in signal processing applications. This is because of the architectural difference between DSP and general purpose microprocessors. DSPs implement algorithms in hardware which speeds up the execution whereas general purpose processor implement the algorithm in software and the speed of execution depends primarily on the clock for the processors. DSP performs large amount of real-time calculations like FFT(Fast Fourier Transform), DFT(Discrete Fourier Transform), Convolution, SOP(Sum of Products) calculation etc. Audio video signal processing, telecommunication and multimedia applications are typical examples where DSPs are employed.

7 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -1 7 Application Specific Integrated Circuit (ASIC) ASIC is a microchip designed to perform a specific or unique application. It integrates several functions into a single chip there by reduces the system development cost. CPLD and FPGA The PLDs consists of a large no. of programmable gates on a VLSI chip With programmable logic devices like CPLDs and FPGAs, the designs can be quickly simulated, tested and programmed into devices and immediately tested in live circuits. During the design phase, the circuit can be changed by programming the device to get the desired outputs, because these devices are based on re-writable memory technology. These devices are used in Network routers, DSL modem, an automotive navigation system Commercial off-the-shelf components (COTS) Commercial off-the-shelf (COTS) product is one which is used as-is COTS products are designed in such a way to provide easy integration with existing system components. The COTS component itself may be developed around a general purpose or domain specific processor or ASIC or PLDs. The example for COTS product is TCP/IP plug-in module

8 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT RISC Vs CISC : RISC and CISC are the two common Instruction Set Architectures (ISA) available for processor design. RISC (Reduced Instruction Set Computer)) CISC (Complex Instruction Set Computer) 1 Supports lesser number of instructions. Supports greater number of instructions. 2 Supports few addressing modes for memory access and data transfer instructions. Supports many addressing modes for memory access and data transfer instructions. 3 Single, fixed length instructions Variable length instructions Instructions take fixed amounts of time for execution Instruction pipelining works effectively and increases the execution speed. Orthogonal instruction set (allows each instruction to operate on any register and use any addressing mode.) Less silicon usage and decoding logic is not complex. Because of the simple instructions, the design of compiler is easy. Instructions take varying amounts of time for execution Instruction pipelining concept is not effectively works as different sizes and different execution times of instructions. Non-orthogonal set (all instructions are not allowed to operate on any register and use any addressing mode. More silicon usage since more additional decoder logic is required to implement the complex instruction decoding. Because of large amount of different and complex instructions, the design of compiler is complex. 9 A larger number of registers are available. Limited no. of general purpose registers 10 Operations are performed on registers only. Memory operations are load and store only. Operations are performed either on registers or memory depending on instruction. 11 With Harvard Architecture. Can be Harvard or Von-Neumann Architecture. 12 Programmer needs to write more code to execute a task since instructions are simpler ones. ( large code sizes) The programmer can achieve the desired functionality with a single instruction. (small code sizes)

9 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT HARVARD ARCHITECTURE Vs VON-NEUMANN ARCHITECTURE : Architectures used for processor design are Harvard or Von- Neumann. Harvard architecture Von-Neumann architecture It has separate buses for instruction as well as data fetching. This means that, the data memory and program memory are separated. Easier to pipeline, so high performance can be achieve. It allows simultaneous access to the program and data memories. For instance, the CPU can read an operand from the data memory at the same time as it reads the next instruction from the program memory. Since data memory and program memory are stored physically in different locations, no chances exist for accidental corruption of program memory A problem with the Harvard architecture is that constant data (often lookup tables) must be stored in the program memory because it is nonvolatile. This means that constants cannot be read in the same way as volatile values from the data memory. Special table read instructions must therefore be provided or part of the program memory is mapped into data memory Separate decoding logic is required, because separate buses and control signals are used for accessing data memory and program memory Comparatively high cost It shares single common bus for instruction and data fetching. This means that only one set of addresses covers both data memory and program memory. The memory map shows the addresses at which each type of memory is located. Low performance as compared to Harvard architecture First fetches the instruction and then fetches the data. The two separate fetches slows down the controller s operation. Because several memory cycles are needed to extract a full instruction from memory, this architecture is intrinsically less efficient. Accidental corruption of program memory may occur if data memory and program memory are stored physically in the same chip. The system is simpler and there is no difference between access to constant and variable data. No additional logic is required because, Same bus and control signals are used for accessing for both data memory and program memory. Low cost

10 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT MEMORY MAPPED I/O & I/O MAPPED I/O : Memory mapped I/O Port mapped I/O 1 2 I/O devices are mapped into the system memory map. i.e Common address space for memory and I/O ports (The I/O ports are viewed as memory locations and are addressed likewise) The control signals used for memory operation and I/O operation are same. M/IO = 1 for both Memory and I/O operations I/O devices are mapped into a separate address space. i.e., there is separate address space for memory and I/O ports. Different control signals are used for memory and I/O operations. M/IO =1 for memory operation M/IO =0 for I/O operation 3 All instruction which can access memory can be used to access I/O ports. 4 The data can be moved from any register to I/O port and vice-versa. Less no. of instructions are for I/O access. ( only IN and OUT instructions) The data transfer takes place between Accumulator and I/O port only 5 The arithmetic, logic and bit manipulation instructions which are available for data in memory can also be used for I/O operations. Hence the processor can directly manipulate data from I/O port. No instructions are available for direct manipulation of I/O data. First the processor reads data from I/O port and then manipulates. 6 Large number of I/O devices can be interfaced Less no. of I/O devices can be interfaced 7 8 Full address space can t be used for addressing Memory, because some locations are allotted for I/O ports. The entire address bus must be fully decoded for every device, which increases the cost Full address space can be used for addressing Memory, because I/O locations are separated from memory. Less logic is needed to decode a discrete address and therefore less cost

11 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT LITTLE-ENDIAN & BIG-ENDIAN PROCESSORS Endianness specifies the order which the data is stored in the memory by processor operations in a multi byte system. Little-endian means lower order data byte is stored in memory at the lowest address and the higher order data byte at the highest address. For ex., 4 byte long integer Byte3, Byte2, Byte1, Byte0 will be stored in memory as follows: Base address Base address+1 Base address+2 Base address H 2001H 2002 H 2003 H Big-endian means the higher order data byte is stored in memory at the lowest and the lower order data byte at the highest address. For ex., 4 byte long integer Byte3, Byte2, Byte1, Byte0 will be stored in memory as follows: Base address Base address+1 Base address+2 Base address H 2001 H 2002 H 2003 H

12 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT INTRODUCTION TO MSP430 MICROCONTROLLERS: Introduction : 1. The MSP430 microcontroller from Texas Instruments (TI) is a 16-bit RISC based Mixed Signal Processor with Von-Neumann architecture, designed for low power and portable applications. 2. The architecture supports different low-power modes, and it is optimized to achieve extended battery life in portable measurement applications. The digitally controlled oscillator (DCO) allows wake-up from low-power modes to active mode in less than 1 micro second. 3. It is extremely easy to put the device into a low-power mode. No special instruction is needed: The mode is controlled by bits in the status register. The MSP430 is awakened by an interrupt and returns automatically to its low-power mode after handling the interrupt. 4. The address and data buses are 16-bits wide and the registers in CPU are also 16-bits wide. Hence the registers can be used for either data (or) addresses. 5. Since it has 16-bit address bus, it can address 64KB of memory (RAM/ROM/Flash/Reg). The amount of on-chip memory varies for different families of MSP A wide range of peripherals are available, many of which can run autonomously without the CPU for most of the time. 7. Many portable devices include liquid crystal displays, which the MSP430 can drive directly. 8. Some MSP430 devices are classed as application-specific standard products (ASSPs) and contain specialized analog hardware for various types of measurements. 9. The MSP430 family consists of several devices featuring different sets of peripherals targeted for various applications : Internal oscillator, Timer including PWM, WDT, Serial communication interface (USART, I2C, SPI), ADC, DAC, Comparators, Multipliers, Brownout reset circuitry, Op-Amps for signal conditioning, LCD driver, DMA, built-in bootstrap loader (BSL) using UART such as RS232 or USB, JTAG interface.. etc.

13 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT MAIN CHARACTERISTICS OF MSP430 MICROCONTROLLER Although there are variants in devices in the family, a MSP430 microcontroller can be characterized by: Flash (or) ROM-based low-power MCUs CPU clock : 8/16 MHz Operating voltage : V Power specification overview, as low as: 0.1 μa RAM retention 0.7 μa real-time clock mode peration µa/mips at active operation Fast wake-up from standby mode in less than 1 µs. Device parameters Flash/ ROM options: 1 KB 60 KB RAM options: 128 B 8 KB GPIO options: pins Other integrated peripherals: 10/12/16-bit Analogue-to-Digital Converter (ADC); 12-bit dual Digital-to-Analogue Converter (DAC); Comparator-gated Timers; Watch Dog Timer SPI, I2C, UART Operational Amplifiers (OP Amps) multiplier Comparator_A Temp. sensor LCD driver Supply Voltage Supervisor (SVS) Brown out Reset 16 bit RISC CPU: Instructions processing on either bits, bytes or words; Compact core design reduces power consumption and cost; Compiler efficient; 27 core instructions; 7 addressing modes; Extensive vectored-interrupt capability. MSP430X : There is a new extended version of original MSP430 architecture, called MSP430X, which can address extra memory with other improvements as well. If CPU is MSP430, it has 16-bit address bus and it can address 64 KB of memory (0x0000 0xFFFF) If the CPU is MSP430X, it has 20-bit address bus and it can address 1 MB of memory. The bottom 64 KB of memory from 0x0000 to 0xFFFF is same way as in the original MSP430. The additional memory from 0x10000 to 0xFFFFF, is available for additional ROM. This allows larger programs and tables to be stored.

14 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT VARIANTS OF MSP430 FAMILY MSP430 part numbering: MSP 430 F G (optional) 4 The letters MSP stand for mixed signal processor, which is a reminder that many practical applications require analog inputs. MSP430 indicates the member of the 430 MCU platforms. The letter after MSP430 shows the type of memory. F : flash memory, C : masked ROM There is a second letter for ASSPs (Application Specific Standard Products) to show the type of measurement for which they are intended. E : for electricity (Energy meters), W : for water (flow meters), and G : for signals that require gain stage (Medical), provided by Op-Amps. It indicates the generation of the device 1 series : upto 8 MHz, 2 series : upto 16 MHz 3 series : Legacy OTP (one time programmable) 4 series : upto 16 MHz with w/lcd 5 series : upto 25 MHz 6 series : upto 25 MHz with w/lcd 6 Model within generation (Various levels of integration within a series) 19 I QZW R (optional) Memory size and peripheral configuration 03 : 128 byes RAM & 1 KB ROM 13 : 128 byes RAM & 2 KB ROM Temperature range I : -40 to 85 o C, T : -40 to 105 o C, S : 0 to 50 o C Package (Ball Grid Array/ Pin Grid Array/ Dual In-line Package) Tape and Reel T = Small Reel (7 in) R = Large Reel (11 in)

15 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT MSP430x1xx : MSP430x1xx Provides a wide range of general-purpose devices from simple versions to complete systems for processing signals. There is a broad selection of peripherals and some include a hardware multiplier, which can be used as a basic digital signal processor. Flash- or ROM-based low-power MCUs 8 MHz Clock, V operation Power specification overview, as low as: 0.1 μa RAM retention 0.7 μa real-time clock mode 200 μa / MIPS active Features fast wake-up from standby mode in less than 6 µs. Device parameters Flash/ROM options: 1 60 KB RAM options: 128 B 2 KB GPIO options: 14/22/48 pins ADC options: Slope, 10 & 12-bit SAR Other integrated peripherals: 12-bit DAC, up to 2 16-bit timers, WDT, brown-out reset, SVS, USART module (UART, SPI), DMA, multiplier, Comparator_A, Temp. sensor MSP430F2xx : The MSP430F2xx Series are similar to the '1xx generation, but operate at even lower power, support up to 16 MHz operation, double the speed of earlier devices, while consuming only half the current at the same speed. It has On-chip clock (VLO) that makes it easier to operate without an external crystal. Pull-up or pull-down resistors are provided on the inputs to reduce the number of external components needed. Some come in 14-pin package with PDIP option, which is attractive for anybody who has to build circuits by hand. Flash- or ROM-based low-power MCUs 16 MHz Clock, V operation Power specification overview, as low as: 0.1 μa RAM retention 0.3 μa standby mode (VLO) 0.7 μa real-time clock mode 220 μa / MIPS active Feature ultra-fast wake-up from standby mode in less than 1 μs Device parameters Flash/ROM options: 1 KB 60 KB RAM options: 128 B 8 KB GPIO options: 10/16/24/32/48 pins ADC options: Slope, 10 & 12-bit SAR, 16 & 24-bit Sigma Delta Other integrated peripherals: operational amplifiers, 12-bit DAC, up to 2 16-bit timers, watchdog timer, brown-out reset, SVS, USI module (I²C, SPI), USCI module, DMA, multiplier, Comparator_A+, Temperature sensor

16 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT MSP430x3xx : The MSP430x3xx Series is the oldest generation, designed for portable instrumentation with an embedded LCD controller. This also includes a frequency-locked loop oscillator that can automatically synchronize to a low-speed (32 khz) crystal. This generation does not support EEPROM memory, only mask ROM and UV- eraseable and onetime programmable EPROM. UV erasable and One Time Programmable ROM 16 MHz Clock, V operation Power specification overview, as low as: 0.1 μa RAM retention 0.9 μa real-time clock mode 160 μa / MIPS active Features fast wake-up from standby mode in less than 6 µs. Device parameters: ROM options: 2 32 KB RAM options: 512 B 1 KB GPIO options: 14/40 pins ADC options: Slope, 14-bit SAR Other integrated peripherals: LCD controller, multiplier MSP430x4xx : MSP430x4xx series can drive LCDs with up to 160 segments. Many of them are ASSPs, but there are general-purpose devices as well. These devices are used for low power metering and medical applications. Flash- or ROM-based ultra-low-power MCUs 16 MHz Clock, V operation FLL and SVS Power specification overview, as low as: 0.1 μa RAM retention 0.7 μa real-time clock mode 200 μa / MIPS active Features fast wake-up from standby mode in less than 6 µs. Device parameters: Flash/ROM options: 4 KB 60 KB RAM options: 256 B 8 KB GPIO options: 14/32/48/56/68/72/80 pins ADC options: Slope, 10 & 12-bit SAR, 16-bit Sigma Delta Other integrated peripherals: 12-bit DAC, Op Amps, RTC, up to two 16-bit timers, watchdog timer, basic timer, brown-out reset, SVS, USART module (UART, SPI), USCI module, LCD Controller, DMA, & 32x32 multiplier, Comparator_A, Temp. sensor

17 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT MSP430x5xx series : The MSP430x5xx Series are able to run up to 25 MHz, have up to 512 KB flash memory and up to 66 KB RAM. Includes an innovative power management module for optimal power consumption and integrated USB. Flash- or ROM-based ultra-low-power MCUs 25 MHz Clock, V operation Power specification overview, as low as: 0.1 μa RAM retention 2.5 μa real-time clock mode 165 μa / MIPS active Features fast wake-up from standby mode in less than 5 µs. Device parameters: Flash options: up to 512 KB RAM options: up to 66 KB ADC options: 10 & 12-bit SAR GPIO options: 29/31/47/48/63/67/74/87 pins Other integrated peripherals: High resolution PWM, 5 V I/O's, USB, backup battery switch, up to 4 16-bit timers, watchdog timer, Real-Time Clock, brown-out reset, SVS, USCI module, DMA, 32x32 multiplier, Comp B, temperature sensor MSP430x6xx series The MSP430x6xx Series are able to run up to 25 MHz, have up to 512 KB flash memory and up to 66 KB RAM. It includes an innovative power management module for optimal power consumption and integrated USB. Flash- or ROM-based ultra-low-power MCUs 25 MHz Clock, V operation Power specification overview, as low as: 0.1 μa RAM retention 2.5 μa real-time clock mode 165 μa / MIPS active Features fast wake-up from standby mode in less than 5 µs. Device parameters: Flash options: up to 512 KB RAM options: up to 66 KB ADC options: 10 & 12-bit SAR GPIO options: 74/90 pins Other integrated peripherals: USB, LCD, DAC, Comparator_B, DMA, 32x32 multiplier, power management module (BOR, SVS, SVM, LDO), watchdog timer, RTC, Temp sensor

18 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT BLOCK DIAGRAM OF MSP430 F2013/ F2003 MICROCONTROLLER The MSP430 microcontroller from Texas Instruments (TI) is a 16-bit RISC based Mixed Signal Processor with Von-Neumann architecture, designed for low power and portable applications. It is extremely easy to put the device into a low-power mode. No special instruction is needed: The mode is controlled by bits in the status register. The MSP430 is awakened by an interrupt and returns automatically to its low-power mode after handling the interrupt. The address and data buses are 16-bits wide and the registers in CPU are also 16-bits wide. Hence the registers can be used for either data (or) addresses. The functional block diagram of the MSP430 F2003/F2013 consists of the following blocks : On the left is the 16-bit CPU and its supporting hardware, including the clock generator. The emulation, JTAG interface and Spy-Bi-Wire are used to communicate with a desktop computer when downloading a program and for debugging. The main blocks are linked by the memory address bus (MAB) and memory data bus (MDB). It has flash memory, 1KB in the F2003 or 2KB in the F2013, and 128 bytes of RAM.

19 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT Six blocks are shown for peripheral functions (there are many more in larger devices). Input/output ports, Timer_A, and a watchdog timer, Universal serial interface (USI) and sigma delta analog-to-digital converter (SD16_A) are particular features of this device. The brownout protection comes into action if the supply voltage drops to a dangerous level. Most devices include this but not some of the MSP430x1xx family. There are ground and power supply connections. Ground is labeled V SS and is taken to define 0V. The supply connection is V CC. For many years, the standard for logic was V CC =+5V but most devices now work from lower voltages and a range of V is specified for the F2013. The performance of the device depends on V CC. For ex., it is unable to program the flash memory if V CC < 2.2V and the maximum clock frequency of 16MHz is available only if V CC 3.3V. The brownout reset circuit detects low supply voltages such as when a supply voltage is applied to (or) removed from the VCC terminal. The brownout reset circuit resets the device by triggering a POR (Power on Reset) signal when power is applied (or) removed. The brownout circuit is used to provide the proper internal reset signal to the device during power ON and power OFF.) The Watchdog Timer (WDT) module restarts the system on occurrence of a software problem (or) if a selected time interval expires. It is used to detect and recover from computer malfunction. During normal operation, the system regularly restarts the watchdog timer to prevent it from elapsing, or "timing out". If the system fails to restart the watchdog due to a hardware fault or program error,, the timer will elapse and generate a timeout signal. The timeout signal is used to initiate corrective actions like placing the system in a safe state and restoring normal system operation. Remember that the watchdog is active by default and must either be disabled or regularly cleared before it rolls over. The WDT can also be used to generate timely interrupts for an application. The Supply Voltage Supervisor (SVS) is used to monitor the supply voltage or an external voltage. The SVS can be configured to set a flag or generate a POR reset when the supply voltage or external voltage drops below a user selected threshold. The SVS features include: Supply voltage V CC monitoring Selectable generation of POR Output of SVS comparator accessible by software Low-voltage condition latched and accessible by software 14 selectable threshold levels External channel to monitor external voltage

20 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT MEMORY MAP OF MSP430 : The MSP430 von-neumann architecture has address space shared with special function registers (SFRs), peripherals, RAM, and Flash/ROM memory. The following shows the memory map of the F2013. Most MSP430 devices have a similar memory map, differing only in the size of the regions for RAM and ROM. Figure : Memory map of the MSP430F F Special Function Registers (byte access) FF Peripheral registers with Byte access FF Peripheral registers with Word access 0200 xxxx RAM ( upper boundary varies) 0C00 0FFF Bootstrap loader ( not in F20xx) FF Flash Information memory ( available in Flash devices only) xxxx - FFBF FFC0 - FFFF Flash / ROM ( lower boundary varies) Interrupt & Reset Vector Table

21 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT Special function registers : The SFRs are located in the lower 16 bytes of the address space. Some peripheral functions are configured in the SFRs for enabling and signaling interrupts from peripherals. SFRs must be accessed using byte instructions only. Peripheral registers with byte access and peripheral registers with word access: Provide the main communication between the CPU and peripherals. Some must be accessed as words and others as bytes. They are grouped in this way to avoid wasting addresses. The address space from 010h to 0FFh is reserved for 8-bit peripheral modules. These modules should be accessed with byte instructions. The address space from 0x0100 to 0x01FF is reserved for 16-bit peripheral modules. These modules should be accessed with word instructions. Random access memory: Used for variables. RAM always starts at address 0x0200 and the end address of RAM depends on the amount of RAM present on the device. The F2013 has 128 Bytes of RAM. Bootstrap loader (Flash devices only) : The MSP430 flash devices contain an address space for boot memory, located between addresses 0xC00 through to 0x0FFF. The bootstrap loader is located in this memory space, which is an external interface that can be used to program the flash memory in addition to the JTAG. This memory region is not accessible by other applications, so it cannot be overwritten accidentally. Information memory (Flash devices only) : A 256B block of flash memory that is intended for storage of nonvolatile data. This might include serial numbers to identify equipment an address for a network, for instance or variables that should be retained even when power is removed. (It is like an onboard EEPROM, where variables needed for the next power up can be stored during power down.) For example, a printer might remember the settings from when it was last used and keep a count of the total number of pages printed. Flash memory may be written one byte or word at a time, but must be erased in segments. The information memory is divided into 2 segments (of 128-bytes each) in 4xx devices, and 4 segments (of 64 bytes each) in 2xx devices. Segment A contains factory calibration data for the DCO in the MSP430F2xx family and is protected by default. Flash/ROM /Code memory: Holds the program, including the executable code itself and any constant data. The start address of Flash/ROM depends on the amount of Flash/ROM present on the device. The end address for Flash/ROM is 0x0FFFF for devices with less that 60KB of Flash/ROM. The F2013 has 2 KB but the F2003 only 1KB. Flash can be used for both code and data. Word or byte tables can be stored and used in Flash/ROM without the need to copy the tables to RAM before using them. The interrupt vector table is mapped into the upper 16 words of Flash/ROM address space, with the highest priority interrupt vector at the highest Flash/ROM word address (0x0FFFE).

22 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT Interrupt and reset vectors : Used to handle exceptions, when normal operation of the processor is interrupted or when the device is reset. This table was smaller and started at 0xFFE0 in earlier devices. The range of addresses has been extended from 64KB to 1MB in the MSP430X. This means that addresses require 20 bits rather than 16 and the MAB is therefore 20- bits wider. The bottom 64KB of memory from 0x00000 to 0x0FFFF is laid out in exactly the same way as in the original MSP430. The additional memory, from 0x10000 to 0xFFFFF, is available for additional ROM. This permits larger programs and tables to be stored. The above figure shows - Bits, Bytes, and Words in a Byte-Organized Memory. For all devices, each memory location is formed by 1 data byte. The CPU is capable of addressing data values either as bytes (8 bits) or words (16 bits). Bytes are located at even or odd addresses. Words are always addressed at an even address, which contain the least significant byte, followed by the next odd address, which contains the most significant byte. For 8-bit operations, the data can be accessed from either odd or even addresses, but for 16-bit operations, the data values can only be accessed from even addresses. For example, if a data word is located at address 0x0200, then the low byte of that data word is located at address 0x0200, and the high byte of that word is located at address 0x0201. This is called as Little-endian ordering, in which the low-order byte is stored at lower memory address and high-order byte is at the higher address. For example, if a word contains the hexadecimal value 0x1234. Its less significant (low-order) byte is 0x34 and it is stored at lower memory address 0x0200 and the most significant (high-order) byte 0x12 is store at higher memory address 0x0201.

23 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT CPU ARCHITECTURE & REGISTERS OF MSP430 The central processing unit (CPU) executes the instructions stored in memory. It steps through the instructions in the sequence in which they are stored in memory until it encounters a branch or when an exception occurs (interrupt or reset). The CPU can run at a maximum clock frequency f MCLK of 16MHz in the MSP430F2xx family and some newer MSP430x4xx devices, and 8MHz in the others. It is built using static logic, which means that there is no minimum frequency of operation: The CPU can be stopped and will retain its state until it is restarted. This is essential for low-power operation to be straightforward.

24 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT The CPU features include: 16-bit RISC architecture with 27 instructions and 7 addressing modes. Orthogonal architecture with every instruction usable with every addressing mode. Full register access including program counter, status registers, and stack pointer. Single-cycle registers operations Large 16-bit register file reduces fetches to memory. 16-bit address bus allows direct access and branching throughout entire memory range. 16-bit data bus allows direct manipulation of word-wide arguments. Constant generator provides six most used immediate values and reduces code size. Word and byte addressing and instruction formats. It can address the complete address range without paging It includes the arithmetic logic unit (ALU), which performs computation, a set of 16 registers designated R0 R15 and the logic needed to decode the instructions and implement them. Figure : CPU Registers of MSP430 MSP430 CPU registers The CPU incorporates sixteen 16-bit registers: Four registers (R0, R1, R2 and R3) have dedicated functions; 12 working registers (R4 to R15) for general use. R0: Program Counter (PC) : The 16-bit Program Counter (PC/R0) points to the next instruction to be fetched from memory and executed by the CPU. The Program counter is incremented by the number of bytes used by the instruction (2, 4, or 6 bytes, always even). It is important to remember that the PC is aligned at even addresses, because the instructions are composed of 1-3 words. Hence the LSB of PC is hard-wired to 0. R1: Stack Pointer (SP) The stack memory is a memory block where the data is stored in LIFO manner. The Stack Pointer (SP/R1) holds the address of the stack-top. In the MSP430, as in many other processors, the stack is allocated at the top of the RAM and grows down towards low addresses. The LSB of of the stack pointer is hardwired to 0 in the MSP430, which guarantees that it always points to valid words. A byte is therefore wasted to preserve the alignment to words if a single byte is placed on the stack.

25 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT Operation of the Stack : The operation of the stack is illustrated in the following figure. The specific addresses are for MSO430F2013 with 128 Bytes of RAM are from 0x0200 to 0x027F. Hence, Before the execution, the initially the value of SP = 0x0280 The purpose of the stack : It used by subroutine calls to store the program counter value for return at the end of subroutine (RET). When a subroutine is called, the CPU jumps to the subroutine, executes the code there, then returns to the instruction after the call. It must therefore keep track of the contents of the PC before jumping to the subroutine, so that it can return afterward. This is the primary purpose of the stack. It is used by interrupt - system stores the actual PC value first, then the actual status register content on top of the stack. After servicing the interrupt, the system get the same status as just before the interrupt happened by executing the instruction return from interrupt (RETI). It can be used by compiler for subroutine parameters It can be used by user to store data for later use (store by PUSH, retrieve by POP).

26 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT R2: Status Register (SR) The Status Register (SR/R2) stores the status bits and control bits. Status Flags: Indicate some condition produced by an instruction execution. The system flags are changed automatically by the CPU depending on the result of an operation. C : Carry Flag : It is set to 1, if a carry is generated in an Addition (or) borrow in Subtraction. Z : Zero Flag : It is set to 1, if the result of an operation is ZERO. A common application of Zero flag is to check whether two values are equal or not N : Negative Flag : It is made equal to the MSB of the result. It is used with signed numbers only. N=1 for negative results and N =0 for positive results. V: Signed overflow flag : It is set to 1, when the result of a signed operation has overflowed, even though a carry may not be generated. For ex., the sum of 0x75 + 0x67 = 0xDC. There is no problem if the variables are unsigned. But, if they are signed, the overflow flag will be set. Enable Interrupts : Setting the general interrupt enable (GIE) bit enables maskable interrupts. Clearing the bit disables all maskable interrupts. There are also nonmaskable interrupts, which cannot be disabled with GIE. Control of Low-Power Modes : The CPUOFF, OSCOFF, SCG0, and SCG1 bits control the mode of operation of the MSP430MCU. All systems are fully operational when all bits are clear. Setting combinations of these bits puts the device into one of its low-power modes. SCG1 (System clock generator 1) : When set, turns off the SMCLK. SCG0 (System clock generator 0) : When set, turns off the DCO DC generator for DCO. if DCO-CLK is not used for MCLK or SMCLK. OSCOFF (Oscillator OFF ) : When set, turns off the VLO and LF XT1 crystal oscillator if LFXT1-CLK is not used for MCLK or SMCLK. CPUOFF : When set, turns off the MCLK, which stops the CPU.

27 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT R2/R3: Constant Generator Registers (CG1/CG2) Depending of the source-register addressing modes (As) value, six commonly used constants can be generated without a code word or code memory access to retrieve them. This is a very powerful feature, which allows the implementation of emulated instructions, for example, instead of implementing a core instruction for an increment, the constant generator is used. The registers R2 and R3 can be used to generate six different constants commonly used in programming, without the need to add an extra 16-bit word of code to the instruction. The constants below are chosen based on the bit (As) of the instruction that selects the addressing mode. Register Addressing mode Constant R R R R R R (FFFF) The constant generator advantages are: No special instructions required No additional code word for the six constants No code memory access required to retrieve the constant The assembler uses the constant generator automatically if one of the 6- constants is used as an immediate source operand. Registers R2 and R3, used in the constant mode, cannot be addressed explicitly; they act as source-only registers. Constant Generator - Expanded Instruction Set The RISC instruction set of the MSP430 has only 27 instructions. However, the constant generator allows the MSP430 assembler to support 24 additional, emulated instructions. For example, the single-operand instruction clr.w dst is replaced by : mov.w R3,dst where the #0 is replaced by the assembler, and R3 is used with As = 00 inc.w dst is replaced by : add.w 0(R3), dst R4 - R15: General Purpose Registers : These general-purpose registers are used to store data values, address pointers, or index values and can be accessed with byte or word instructions.

28 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT ADDRESSING MODES : The method of specifying data to be operated by an instruction is called as addressing mode. The different ways that a processor can access the data are referred to as addressing mode. For MSP430, Seven addressing modes for the source operand and four addressing modes for the destination operand can address the complete address space with no exceptions. S.No. Addressing Mode Syntax Description As / Ad 1 Register mode R n Register contents are operand 00 / 0 2 Indexed mode X(R n) (Rn + X) points to the operand. 3 Symbolic mode / PC relative LABLE 4 Absolute mode &ADDR 5 6 Indirect register mode Indirect autoincrement (PC + X) points to the operand. X = Offset address = Address of LABLE - PC Indexed mode X(PC) is used The word following the instruction contains the absolute address. Indexed mode X(SR) is used, where X= ADDR, SR =0. 01 / R n is used as a pointer to the operand. 10 / n+ 7 Immediate mode #N Rn is used as a pointer to the operand. Rn is incremented afterwards by 1 for.b instructions and by 2 for.w instructions. 11 / -- The word following the instruction contains the immediate constant N. 1. Register mode : In this addressing mode, the data is available in any one of the registers in the CPU. This is available for both source and destination Ex: mov.w R5, R6 ; copies word from R5 to R6 2. Indexed mode : In this addressing mode, the address of data is the sum of constant base address and the contents of a CPU register. This mode is available for both source and destination Ex: mov.b 3(R5), R6 ; load byte from address (3+R5) into R6 If R5 = 0004 then, the content of memory address 0007 is moved to R6

29 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT Symbolic mode / PC Relative : In this addressing mode, PC is used as the base address. So the address of data is the sum of PC and relative offset address of data. The assembler calculates the relative offset address of the data Ex: mov.w LABLE, R6 ; load word LABLE into R6 The assembler replaces the above instruction by the indexed form mov.w X(PC), R6 ; load word LABLE into R6 where X = relative offset = LABLE PC 4. Absolute mode : In this addressing mode, the absolute address of the data is available in the instruction. This is already the complete address required, so that it should be added to a register that contains ZERO. Hence, in indexed addressing, the Status Register is used as constant generator (CG1) and it contains 0 when it is used as the base for indexed addressing. Absolute addressing is shown by the prefix & Ex: mov.b &P 1IN, R6 ; load byte from port address P 1IN into R6 The assembler replaces the above instruction by the indexed form mov.b P 1IN(SR), R6 ; load byte from port address P 1IN into R6 The above instruction moves the content of source address to the register R6 5. Indirect Register mode : In this addressing mode, the address of the data is available in the register. Indirect register addressing is shown by the in front of a register such In other words, R5 is used as a pointer. This mode is available for only source operand. Ex: R6 ; load word from address (R5) into R6 If R5 = 0004 then, the content of memory address 0004 is moved to R6

30 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT Indirect Auto-increment Register mode : In this addressing mode, the address of the data is available in the register. This addressing mode is shown by the in front of a register with + sign after it such In other words, R5 is used as a pointer and it is automatically incremented by 1 for BYTE operation and 2 by WORD operation. This mode is available for only source operand. Ex: R6 ; load word from address (R5) into R6 and increment R5 by 2 If R5 = 0004 then, the content of memory address 0004 is moved to R6 and the pointer R5 is incremented by Immediate mode : In this addressing mode, the data is available immediately after the instruction. The PC is automatically incremented after the instruction is fetched and therefore points to the following word. Hence it is a special case of Indirect auto-increment register addressing mode. This mode is available for only source operand. Ex: mov.b #45, R6 ; move the immediate constant into R6. R6 ;

31 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT INSTRUCTION FORMATS OF MSP430 : An instruction is a command given to the processor/controller to perform a given task on specified data. Each instruction has 2- parts: (a) The task to be performed called as Operation code (Opcode) (b) The data to be operated on called as Operand. Instruction OPCODE OPERAND There are three core-instruction formats: (i) Dual-operand (ii) Single-operand (iii) Jump The source and destination of an instruction are defined by the following fields: src : dst : As : Ad : S-reg : D-reg : B/W : The source operand defined by As and S-reg The destination operand defined by Ad and D-reg Addressing bits responsible for the addressing mode used for the source (src) Addressing mode used for the destination (dst) The working register used for the source (src) The working register used for the destination (dst) Byte or word operation: 0: word operation 1: byte operation All single-operand and dual-operand instructions can be byte or word instructions by using.b or.w extensions. Byte instructions are used to access byte data (or) byte peripherals. Word instructions are used to access word data (or) word peripherals. If no extension is used, the instruction is a word instruction.

32 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT INSTRUCTION TIMINGS: The number of CPU clock cycles required for an instruction depends on the instruction format and the addressing modes used - not the instruction itself. The number of clock cycles refers to the MCLK. The number of MCLK cycles required for most instructions is limited by access to memory.

33 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT The general principle for Format-I instructions (Two operands) is as follows : (i) It takes one cycle to fetch the instruction word itself. This is all if both source and destination are in CPU registers. Ex: mov.w R5, R6 (ii) One more cycle is needed to fetch the source if it is given indirectly in which case the address is already in the CPU. This includes immediate data. Ex: R6 (iii) Alternatively, two more cycles are needed if one of the indexed modes is used. The first is to fetch the base address, which is added to the value in a CPU register to get the address of the source. A second cycle is necessary to fetch the operand itself. This includes absolute and symbolic modes. Ex: mov.w 25(R5), R6 (iv) Two more cycle are needed to fetch the destination in the same way, if it is indexed. Ex: 25(R6) (v) A final cycle is needed to write the destination back to memory if required; no allowance is needed for a register in the CPU. 13. INSTRUCTION SET OF MSP430 The complete MSP430 instruction set consists of 27 core instructions & 24 emulated instructions. The core instructions are instructions that have unique op-codes decoded by the CPU. The emulated instructions are instructions that make code easier to write and read, but do not have op-codes themselves; instead they are replaced automatically by the assembler with an equivalent core instruction. For the emulated instructions, the operand is always a destination. (i) (ii) (iii) (iv) Movement Instructions (Data Transfer) Arithmetic and Logic Instructions Shift and Rotate Instructions Control Transfer instructions (Branch/Subroutine/Interrupt)

34 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT (i) Movement Instructions Instruction Operation Example 1 mov.w src, dst Copies data from source to destination dst src mov.w R5, R6 R6 R5 2 push.w src 3 pop.w dst Push data onto stack ( first the SP is decremented by 2 and the source content is stored at stacktop) Pop data from --SP = src ( first the content of stacktop is moved to destination and SP is incremented by 2) dst + + push.w R5 SP SP R5 push.w R6 SP SP SP+2 (ii) Arithmetic and Logic Instructions (a) Binary Arithmetic Instructions with Two operands Instruction Operation Example 1 add.w src, dst Add the content of source to destination dst dst + src add.w R5, R6 2 addc.w src, dst Add with carry dst dst + (src + C) addc.w R5, R6 3 adc.w dst Add carry bit to the destination dst dst + C adc.w R6 4 sub.w src, dst Subtract the content of source from destination dst dst - src sub.w R5, R6 5 subc.w src, dst Subtract with borrow dst dst ( src + C) subc.w R5, R6 6 sbc.w dst 7 cmp.w src,dst Subtract borrow bit from the destination Compares source and destination. dst dst C Performs ( dst src), but Only flags are changed If dst > src : C=0, Z=0 If dst < src : C=1, Z=0 If dst = src : C=0, Z=1 sbc.w R6 cmp.w R5,R6

35 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT (b) Arithmetic Instructions with One operand : All these instructions are emulated, which means that the operand is always a destination Instruction Operation Example 1 clr.w dst Clear destination dst 0 clr.w R6 R6 0 2 dec.w dst 3 decd.w dst 4 inc.w dst 5 incd.w dst 6 tst.w dst The content of destination is decremented by 1 Double decrement The content of destination is decremented by 2 dst dst 1 dst dst 2 The content of destination is inccremented by 1 Double increment dst dst + 1 The content of destination is inccremented by 2 Test ( compare with zero) Performs ( dst 0), but Only flags are changed If dst > 0 : C=0, Z=0 If dst < 0 : C=1, Z=0 If dst = 0 : C=0, Z=1 dst dst + 2 dec.w R6 R6 R6-1 decd.w R6 R6 R6 2 inc.w R6 R6 R6 + 1 incd.w R6 R6 R6 + 2 tsd.w R6 (c) Decimal Arithmetic Instructions : These instructions are used to perform BCD addition Instruction Operation Example 1 dadd.w src, dst 2 dadc.w dst Perfroms the decimal addtion of destination and source with carry dst dst + src + C Performs the decimal addition of destination and carry. dst dst + C dadd.w R5, R6 R6 R6 + R5+C dadc.w R6 R6 R6 + C

36 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT (d) Logic Instructions with Two operands Instruction Operation Example 1 and.w src, dst 2 xor.w src, dst 3 bit.w src, dst 4 bis.w src, dst 5 bic.w src, dst Performs bit-wise logic AND operation dst dst AND src Performs bit-wise logic Ex-OR operation Performs bit-wise Test operation dst dst XOR src It performs Logic AND operation, But Only flags are affected Set bits in destination The source operand and the destination operand are logically ORed. The result is placed into the destination. The source operand is not affected. Clear bits in destination dst dst OR src The inverted source operand and the destination operand are logically ANDed. The result is placed into the destination. The source operand is not affected dst dst AND ~src and.w R5, R6 xor.w R5, R6 bit.w R5, R6 bis.w R5, R6 bic.w R5, R6 (e) Logic Instructions with ONE operand Instruction Operation Example 1 inv.w dst Invert destination Performs bit-wise NOT operation (1 s complement) dst ~dst inv.w R6 (f) Byte manipulation Instruction Operation Example 1 swpb dst 2 sxt dst Swap upper and lower bytes The high and the low byte of the operand are exchanged dst.15:8 dst.7:0 Extend sign of lower byte The sign of the low byte of the operand is extended into the high byte dst. 15:8 dst.7 If dst.7 = 0: high byte = 00 H afterwards If dst.7 = 1: high byte = FF H afterwards swpb R6 sxt R6

37 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT (g) Operations on Bits in Status Register These instructions are used to set orclear the falgs in Status Register. All these instructions are emulated instructions. Instruction Operation Flag affected 1 clrc Clear Carry bit C = 0 2 clrn Clear Negative bit N = 0 3 clrz Clear Zero bit Z = 0 4 setc Set Carry bit C = 1 5 setn Set Negative bit N = 1 6 setz Set Zero bit Z = 1 7 dint Disable General Interrupts GIE = 0 8 eint Enable General Interrupts GIE = 1 (iii) Shift and Rotate Instructions Instruction Description Operation rla dst Arithmetic shift Left rra dst Arithmetic shift Right rlc dst Rotate Left through Carry rrc dst Rotate Right through Carry

38 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT (iii) Control Trasnfer Instructions Instruction Description Operation 1 br src Branch ( go to) PC src 2 call src Call Subroutine SP SP PC PC src 3 ret Return from Subroutine SP SP SP+2 4 reti 5 nop Return from Interrupt No operation ( consumes single cycle ) SP SP SP+2 SP SP SP+2 JUMP Instructions Condition 1 jmp label Unconditional Jump 2 jc / jlo label Jump if carry / Jump if lower Jump if C =1 3 jnc / jhs label Jump if not carry / Jump higher or same Jump if C =0 4 Jz / jeq label Jump if zero / Jump if equal Jump if Z =1 5 Jnz / jne label Jump if not zero / Jump if not equal Jump if Z =0 6 jn label Jumpif negative Jump if N =1 7 jge label Jump if greater or equal (signed values) Jump if (N xor V) =0 8 jl label Jump if less than (signed values) Jump if (N xor V) =1

39 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT SAMPLE EMBEDDED SYSTEM ON MSP 430 : Note : Write about the introduction to MSP430 The letters MSP stand for mixed signal processor, which is a reminder that many practical applications require analog inputs. There is a selection of analog-to-digital converters with a resolution of up to 16 bits. An example of a system where this choice is important is the weighing machine shown in above Figure. It includes the following functional blocks: The sensor has four resistive elements arranged as a Wheatstone bridge. Ideally, this is balanced when there is no load, giving V + = V. Two of the resistances increase and two decrease when a weight is placed on the scale pan, driving the bridge out of balance. A differential amplifier magnifies the difference in voltage between its input terminals, giving Vout = A(V + V ), where A is the gain. The analog output of the amplifier is converted to a binary value by A/D converter. The microcontroller multiplies the input by an appropriate factor so that the display gives the weight in grams or ounces and subtracts an offset so that the display reads zero when no weight is present. It also reads the buttons and supervises the complete system. There is a serial interface between the microcontroller and the liquid crystal display, which has a built-in controller. This system clearly needs a lot of components, including several integrated circuits. In contrast, the whole system can be constructed from a sensor, an MSP430F42x, a simple LCD without a controller, and a couple of decoupling capacitors. The MSP430x4xx family drives segmented LCDs directly, which eliminates the need for a controller. Several devices contain ADCs with high-resolution, differential inputs, which would work directly from the sensor without the need for an amplifier. The microcontroller can also manage the power drawn by the circuit so that the processor would be switched off when it was not needed and the whole system shut down after a period of inactivity.

Hacettepe University

Hacettepe University www.msp430.ubi.pt MSP430 Teaching Materials Introductory Overview Week2 Hacettepe University Outline Microcontrollers Versus Microprocessors Central Processing Unit System Buses Memory Organization I/O

More information

CPE 323 MSP430 INSTRUCTION SET ARCHITECTURE (ISA)

CPE 323 MSP430 INSTRUCTION SET ARCHITECTURE (ISA) CPE 323 MSP430 INSTRUCTION SET ARCHITECTURE (ISA) Aleksandar Milenković Email: milenka@uah.edu Web: http://www.ece.uah.edu/~milenka Objective Introduce MSP430 Instruction Set Architecture (Class of ISA,

More information

Copyright 2009 Texas Instruments All Rights Reserved

Copyright 2009 Texas Instruments All Rights Reserved MSP430 Teaching Materials Week 3 Further into the MSP430 Hacettepe University Anatomy of a Typical Small Microcontroller Central processing unit Arithmetic logic unit (ALU), which performs computation.

More information

Hacettepe University

Hacettepe University MSP430 Teaching Materials Week 3 Further into the MSP430 Hacettepe University Anatomy of a Typical Small Microcontroller Central processing unit Arithmetic logic unit (ALU), which performs computation.

More information

Chapter 1 Microprocessor architecture ECE 3120 Dr. Mohamed Mahmoud http://iweb.tntech.edu/mmahmoud/ mmahmoud@tntech.edu Outline 1.1 Computer hardware organization 1.1.1 Number System 1.1.2 Computer hardware

More information

MICROPROCESSOR BASED SYSTEM DESIGN

MICROPROCESSOR BASED SYSTEM DESIGN MICROPROCESSOR BASED SYSTEM DESIGN Lecture 5 Xmega 128 B1: Architecture MUHAMMAD AMIR YOUSAF VON NEUMAN ARCHITECTURE CPU Memory Execution unit ALU Registers Both data and instructions at the same system

More information

CPE/EE 421 Microcomputers

CPE/EE 421 Microcomputers CPE/EE 421 Microcomputers Instructor: Dr Aleksandar Milenkovic Lecture Note S09 *Material used is in part developed by Dr. D. Raskovic and Dr. E. Jovanov CPE/EE 421/521 Microcomputers 1 Performance Outline

More information

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud.

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud. Chapter 1 Microprocessor architecture ECE 3130 Dr. Mohamed Mahmoud The slides are copyright protected. It is not permissible to use them without a permission from Dr Mahmoud http://www.cae.tntech.edu/~mmahmoud/

More information

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction.

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction. AVR XMEGA TM Product Introduction 32-bit AVR UC3 AVR Flash Microcontrollers The highest performance AVR in the world 8/16-bit AVR XMEGA Peripheral Performance 8-bit megaavr The world s most successful

More information

IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -2 1 UNIT 2

IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -2 1 UNIT 2 IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -2 1 UNIT 2 1. Block diagram of MSP430x5xx series micro-controller --------------------- 1 2. CPU architecture of MSP430x5xx ------------------------------------------------

More information

Hello, and welcome to this presentation of the STM32L4 power controller. The STM32L4 s power management functions and all power modes will also be

Hello, and welcome to this presentation of the STM32L4 power controller. The STM32L4 s power management functions and all power modes will also be Hello, and welcome to this presentation of the STM32L4 power controller. The STM32L4 s power management functions and all power modes will also be covered in this presentation. 1 Please note that this

More information

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100) (Revision-10) FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100) PART-A (Maximum marks : 10) I. Answer all

More information

Overview of Microcontroller and Embedded Systems

Overview of Microcontroller and Embedded Systems UNIT-III Overview of Microcontroller and Embedded Systems Embedded Hardware and Various Building Blocks: The basic hardware components of an embedded system shown in a block diagram in below figure. These

More information

Micro computer Organization

Micro computer Organization Micro computer Organization I Base Basic Components CPU SYSTEM BUSES VDD CLK RESET 1 MPU vs MCU Microprocessor Unit (MPU) CPU (called Microprocessor) is a die All components external to die Basically on

More information

AVR Microcontrollers Architecture

AVR Microcontrollers Architecture ก ก There are two fundamental architectures to access memory 1. Von Neumann Architecture 2. Harvard Architecture 2 1 Harvard Architecture The term originated from the Harvard Mark 1 relay-based computer,

More information

Team 3. By: Miriel Garcia. Microcontrollers/ TI MSP430F5438A. ECE 480 senior Design. Application Note 4/3/15

Team 3. By: Miriel Garcia. Microcontrollers/ TI MSP430F5438A. ECE 480 senior Design. Application Note 4/3/15 Microcontrollers/ TI MSP430F5438A ECE 480 senior Design Team 3 Application Note By: Miriel Garcia 4/3/15 Abstract Microcontrollers are key components on today s modern world. These devices have the ability

More information

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor 1 2 A microprocessor is a single, very-large-scale-integration (VLSI) chip that contains many digital circuits that perform arithmetic, logic, communication, and control functions. When a microprocessor

More information

EMBEDDED SYSTEM BASICS AND APPLICATION

EMBEDDED SYSTEM BASICS AND APPLICATION EMBEDDED SYSTEM BASICS AND APPLICATION Dr.Syed Ajmal IIT- Robotics TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications 2 INTRODUCTION

More information

Embedded Systems Design (630414) Lecture 1 Introduction to Embedded Systems Prof. Kasim M. Al-Aubidy Computer Eng. Dept.

Embedded Systems Design (630414) Lecture 1 Introduction to Embedded Systems Prof. Kasim M. Al-Aubidy Computer Eng. Dept. Embedded Systems Design (630414) Lecture 1 Introduction to Embedded Systems Prof. Kasim M. Al-Aubidy Computer Eng. Dept. Definition of an E.S. It is a system whose principal function is not computational,

More information

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, CISC and RISC processors etc. Knows the architecture and

More information

Intro. MEB/ Texas Instruments Inc, Slide 1

Intro. MEB/ Texas Instruments Inc, Slide 1 Intro MEB/0404 2004 Texas Instruments Inc, Slide 1 MSP430 Agenda Core Architecture Integrated Peripherals Device Roadmap Ideal Applications Development Tools MEB/0404 2004 Texas Instruments Inc, Slide

More information

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an Microcontroller Basics MP2-1 week lecture topics 2 Microcontroller basics - Clock generation, PLL - Address space, addressing modes - Central Processing Unit (CPU) - General Purpose Input/Output (GPIO)

More information

Alex Milenkovich 1. CPE/EE 421 Microcomputers: The MSP430 Introduction. Outline

Alex Milenkovich 1. CPE/EE 421 Microcomputers: The MSP430 Introduction. Outline Outline CPE/EE 421 Microcomputers: The MSP430 Introduction Instructor: Dr Aleksandar Milenkovic Lecture Notes MSP430: An Introduction The MSP430 family Technology Roadmap Typical Applications The MSP430

More information

Microcomputer Architecture and Programming

Microcomputer Architecture and Programming IUST-EE (Chapter 1) Microcomputer Architecture and Programming 1 Outline Basic Blocks of Microcomputer Typical Microcomputer Architecture The Single-Chip Microprocessor Microprocessor vs. Microcontroller

More information

Introduction to ARM LPC2148 Microcontroller

Introduction to ARM LPC2148 Microcontroller Introduction to ARM LPC2148 Microcontroller Dr.R.Sundaramurthy Department of EIE Pondicherry Engineering College Features of LPC2148 in a Nut Shell CPU = ARM 7 Core Word Length = 32 Bit ROM = 512 KB RAM

More information

Department of Electronics and Instrumentation Engineering Question Bank

Department of Electronics and Instrumentation Engineering Question Bank www.examquestionpaper.in Department of Electronics and Instrumentation Engineering Question Bank SUBJECT CODE / NAME: ET7102 / MICROCONTROLLER BASED SYSTEM DESIGN BRANCH : M.E. (C&I) YEAR / SEM : I / I

More information

Microprocessors/Microcontrollers

Microprocessors/Microcontrollers Microprocessors/Microcontrollers A central processing unit (CPU) fabricated on one or more chips, containing the basic arithmetic, logic, and control elements of a computer that are required for processing

More information

WHICH MICRO? What does MCU needs to do in my system? What are the tasks? Dr. Adriana Becker-Gomez

WHICH MICRO? What does MCU needs to do in my system? What are the tasks? Dr. Adriana Becker-Gomez 1 WHICH MICRO? What does MCU needs to do in my system? What are the tasks? Dr. Adriana Becker-Gomez Email: axbeec@rit.edu Office: 9-3477 2 Specs System design: High level definition (functional specs)

More information

Universität Dortmund. ARM Architecture

Universität Dortmund. ARM Architecture ARM Architecture The RISC Philosophy Original RISC design (e.g. MIPS) aims for high performance through o reduced number of instruction classes o large general-purpose register set o load-store architecture

More information

Microcontrollers. Microcontroller

Microcontrollers. Microcontroller Microcontrollers Microcontroller A microprocessor on a single integrated circuit intended to operate as an embedded system. As well as a CPU, a microcontroller typically includes small amounts of RAM and

More information

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers Lecture (4) Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers Prof. Kasim M. Al-Aubidy Philadelphia University-Jordan DERTS-MSc, 2015 Prof. Kasim Al-Aubidy 1 Lecture Outline:

More information

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems MT2 Introduction Embedded Systems MT2.1 Mechatronic systems Mechatronics is the synergistic integration of mechanical engineering, with electronics and intelligent computer control in the design and manufacturing

More information

Chapter 7 Central Processor Unit (S08CPUV2)

Chapter 7 Central Processor Unit (S08CPUV2) Chapter 7 Central Processor Unit (S08CPUV2) 7.1 Introduction This section provides summary information about the registers, addressing modes, and instruction set of the CPU of the HCS08 Family. For a more

More information

DERTS Design Requirements (1): Microcontroller Architecture & Programming

DERTS Design Requirements (1): Microcontroller Architecture & Programming Lecture (5) DERTS Design Requirements (1): Microcontroller Architecture & Programming Prof. Kasim M. Al-Aubidy Philadelphia University 1 Lecture Outline: Features of microcomputers and microcontrollers.

More information

EE 308: Microcontrollers

EE 308: Microcontrollers EE 308: Microcontrollers AVR Architecture Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA January 23, 2018 Aly El-Osery (NMT) EE 308:

More information

Advanced Microcontrollers Grzegorz Budzyń Lecture. 4: 16-bit. microcontrollers

Advanced Microcontrollers Grzegorz Budzyń Lecture. 4: 16-bit. microcontrollers Advanced Microcontrollers Grzegorz Budzyń Lecture 4: 16-bit microcontrollers Plan MSP430 family PIC24 family Introduction MSP430 TI microcontrollersportfolio Source: [1] TI microcontrollersportfolio Source:

More information

SYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET

SYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET 1 SYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET Intel 8086/8088 Architecture Segmented Memory, Minimum and Maximum Modes of Operation, Timing Diagram, Addressing Modes, Instruction Set,

More information

2006 Mixed Signal Products SLAU049F

2006 Mixed Signal Products SLAU049F User s Guide 2006 Mixed Signal Products SLAU049F Related Documentation From Texas Instruments Preface About This Manual This manual discusses modules and peripherals of the MSP430x1xx family of devices.

More information

Computer Hardware Requirements for Real-Time Applications

Computer Hardware Requirements for Real-Time Applications Lecture (4) Computer Hardware Requirements for Real-Time Applications Prof. Kasim M. Al-Aubidy Computer Engineering Department Philadelphia University Real-Time Systems, Prof. Kasim Al-Aubidy 1 Lecture

More information

Basic Components of Digital Computer

Basic Components of Digital Computer Digital Integrated Circuits & Microcontrollers Sl. Mihnea UDREA, mihnea@comm.pub.ro Conf. Mihai i STANCIU, ms@elcom.pub.ro 1 Basic Components of Digital Computer CPU (Central Processing Unit) Control and

More information

EE 354 Fall 2015 Lecture 1 Architecture and Introduction

EE 354 Fall 2015 Lecture 1 Architecture and Introduction EE 354 Fall 2015 Lecture 1 Architecture and Introduction Note: Much of these notes are taken from the book: The definitive Guide to ARM Cortex M3 and Cortex M4 Processors by Joseph Yiu, third edition,

More information

Microprocessors And Microcontroller

Microprocessors And Microcontroller Microprocessors And Microcontroller Semester : 4 th, 5 th (TL, ES) Course Code : ES256, ES313 By: Dr. Attiya Baqai Assistant Professor, Department of Electronics, MUET. Internal block diagram of CPU Internal

More information

Chapter 1: Basics of Microprocessor [08 M]

Chapter 1: Basics of Microprocessor [08 M] Microprocessor: Chapter 1: Basics of Microprocessor [08 M] It is a semiconductor device consisting of electronic logic circuits manufactured by using either a Large scale (LSI) or Very Large Scale (VLSI)

More information

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly.

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly. Unit I 8085 and 8086 PROCESSOR Introduction to microprocessor A microprocessor is a clock-driven semiconductor device consisting of electronic logic circuits manufactured by using either a large-scale

More information

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS UNIT I INTRODUCTION TO 8085 8085 Microprocessor - Architecture and its operation, Concept of instruction execution and timing diagrams, fundamentals of

More information

ATmega128. Introduction

ATmega128. Introduction ATmega128 Introduction AVR Microcontroller 8-bit microcontroller released in 1997 by Atmel which was founded in 1984. The AVR architecture was conceived by two students (Alf-Egil Bogen, Vergard-Wollen)

More information

Architecture of Computers and Parallel Systems Part 6: Microcomputers

Architecture of Computers and Parallel Systems Part 6: Microcomputers Architecture of Computers and Parallel Systems Part 6: Microcomputers Ing. Petr Olivka petr.olivka@vsb.cz Department of Computer Science FEI VSB-TUO Architecture of Computers and Parallel Systems Part

More information

BASIC INTERFACING CONCEPTS

BASIC INTERFACING CONCEPTS Contents i SYLLABUS UNIT - I 8085 ARCHITECTURE Introduction to Microprocessors and Microcontrollers, 8085 Processor Architecture, Internal Operations, Instructions and Timings, Programming the 8085-Introduction

More information

acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs.

acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs. acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs.) Module 0 Introduction Introduction to Embedded Systems, Real Time

More information

ARDUINO MEGA INTRODUCTION

ARDUINO MEGA INTRODUCTION ARDUINO MEGA INTRODUCTION The Arduino MEGA 2560 is designed for projects that require more I/O llines, more sketch memory and more RAM. With 54 digital I/O pins, 16 analog inputs so it is suitable for

More information

AVR XMEGA TM. A New Reference for 8/16-bit Microcontrollers. Ingar Fredriksen AVR Product Marketing Director

AVR XMEGA TM. A New Reference for 8/16-bit Microcontrollers. Ingar Fredriksen AVR Product Marketing Director AVR XMEGA TM A New Reference for 8/16-bit Microcontrollers Ingar Fredriksen AVR Product Marketing Director Kristian Saether AVR Product Marketing Manager Atmel AVR Success Through Innovation First Flash

More information

Lecture 1. Course Overview and The 8051 Architecture

Lecture 1. Course Overview and The 8051 Architecture Lecture 1 Course Overview and The 8051 Architecture MCUniversity Program Lectures 8051 architecture t System overview of C8051F020 8051 instruction set System clock, crossbar and GPIO Assembler directives

More information

Chapter 1 MSP430 Microcontroller Family

Chapter 1 MSP430 Microcontroller Family Chapter 1 1-1 Introduction 1.1 Introduction The MSP430 is a 16-bit microcontroller that has a number of special features not commonly available with other microcontrollers: Complete system on-a-chip includes

More information

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Ali Karimpour Associate Professor Ferdowsi University of Mashhad AUTOMATIC CONTROL SYSTEMS Ali Karimpour Associate Professor Ferdowsi University of Mashhad Main reference: Christopher T. Kilian, (2001), Modern Control Technology: Components and Systems Publisher: Delmar

More information

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Ali Karimpour Associate Professor Ferdowsi University of Mashhad AUTOMATIC CONTROL SYSTEMS Ali Karimpour Associate Professor Ferdowsi University of Mashhad Main reference: Christopher T. Kilian, (2001), Modern Control Technology: Components and Systems Publisher: Delmar

More information

The ARM Cortex-M0 Processor Architecture Part-1

The ARM Cortex-M0 Processor Architecture Part-1 The ARM Cortex-M0 Processor Architecture Part-1 1 Module Syllabus ARM Architectures and Processors What is ARM Architecture ARM Processors Families ARM Cortex-M Series Family Cortex-M0 Processor ARM Processor

More information

V8-uRISC 8-bit RISC Microprocessor AllianceCORE Facts Core Specifics VAutomation, Inc. Supported Devices/Resources Remaining I/O CLBs

V8-uRISC 8-bit RISC Microprocessor AllianceCORE Facts Core Specifics VAutomation, Inc. Supported Devices/Resources Remaining I/O CLBs V8-uRISC 8-bit RISC Microprocessor February 8, 1998 Product Specification VAutomation, Inc. 20 Trafalgar Square Nashua, NH 03063 Phone: +1 603-882-2282 Fax: +1 603-882-1587 E-mail: sales@vautomation.com

More information

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR. ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR. ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1 SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1 Subject: Microcontroller and Interfacing (151001) Class: B.E.Sem V (EC-I & II) Q-1 Explain RISC

More information

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang,

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang, Network Embedded Systems Sensor Networks Fall 2013 Hardware Marcus Chang, mchang@cs.jhu.edu 1 Embedded Systems Designed to do one or a few dedicated and/or specific functions Embedded as part of a complete

More information

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE: 1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE: A microprocessor is a programmable electronics chip that has computing and decision making capabilities similar to central processing unit

More information

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing UNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Informática Architectures for Embedded Computing MEIC-A, MEIC-T, MERC Lecture Slides Version 3.0 - English Lecture 21

More information

Before next weeks lab:

Before next weeks lab: Before next weeks lab: - To sign in to lab computers use student and Phys319. - read the lab manual for week two. - look at the tools installation guide for OS of your choice and/or lab computer guide,

More information

University Program Advance Material

University Program Advance Material University Program Advance Material Advance Material Modules Introduction ti to C8051F360 Analog Performance Measurement (ADC and DAC) Detailed overview of system variances, parameters (offset, gain, linearity)

More information

The Microcontroller. Lecture Set 3. Major Microcontroller Families. Example Microcontroller Families Cont. Example Microcontroller Families

The Microcontroller. Lecture Set 3. Major Microcontroller Families. Example Microcontroller Families Cont. Example Microcontroller Families The Microcontroller Lecture Set 3 Architecture of the 8051 Microcontroller Microcontrollers can be considered as self-contained systems with a processor, memory and I/O ports. In most cases, all that is

More information

Microcontroller systems Lec 2 PIC18LF8722 Microcontroller s s core

Microcontroller systems Lec 2 PIC18LF8722 Microcontroller s s core TKT-3500 Microcontroller systems Lec 2 PIC18LF8722 Microcontroller s s core Erno Salminen Copyright notice Some figures by Robert Reese, from supplementary CD of the course book from PIC18F8722 Family

More information

STM8L and STM32 L1 series. Ultra-low-power platform

STM8L and STM32 L1 series. Ultra-low-power platform STM8L and STM32 L1 series Ultra-low-power platform 8-bit and 32-bit MCU families 2 Flash (bytes) 2 M 1 M 128 K 16 K 8-bit Core STM8S Mainstream STM8A F and STM8AL Automotive STM8L Ultra-low-power 32-bit

More information

MSP430F471xx MCUs offer high accuracy, simultaneous sampling and anti-tamper for three-phase e-metering applications

MSP430F471xx MCUs offer high accuracy, simultaneous sampling and anti-tamper for three-phase e-metering applications MSP430F471xx MCUs offer high accuracy, simultaneous sampling and antitamper for threephase emetering applications Jennifer Barry MSP430 Product Marketing Engineer The Energy Landscape Energy Sources Conventional

More information

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad Objectives To be familiar with microcontrollers, PIC18F4550 microcontroller. Tools PIC18F4550 Microcontroller, MPLAB software,

More information

ELCT708 MicroLab Session #1 Introduction to Embedded Systems and Microcontrollers. Eng. Salma Hesham

ELCT708 MicroLab Session #1 Introduction to Embedded Systems and Microcontrollers. Eng. Salma Hesham ELCT708 MicroLab Session #1 Introduction to Embedded Systems and Microcontrollers What is common between these systems? What is common between these systems? Each consists of an internal smart computer

More information

8051 Microcontroller

8051 Microcontroller 8051 Microcontroller The 8051, Motorola and PIC families are the 3 leading sellers in the microcontroller market. The 8051 microcontroller was originally developed by Intel in the late 1970 s. Today many

More information

Block diagram of processor (Harvard)

Block diagram of processor (Harvard) Block diagram of processor (Harvard) Register transfer view of Harvard architecture Separate busses for instruction memory and data memory Example: PIC 16 load path OP REG AC 16 16 store path rd wr data

More information

18-349: Embedded Real-Time Systems Lecture 2: ARM Architecture

18-349: Embedded Real-Time Systems Lecture 2: ARM Architecture 18-349: Embedded Real-Time Systems Lecture 2: ARM Architecture Anthony Rowe Electrical and Computer Engineering Carnegie Mellon University Basic Computer Architecture Embedded Real-Time Systems 2 Memory

More information

Arduino Uno R3 INTRODUCTION

Arduino Uno R3 INTRODUCTION Arduino Uno R3 INTRODUCTION Arduino is used for building different types of electronic circuits easily using of both a physical programmable circuit board usually microcontroller and piece of code running

More information

Interconnects, Memory, GPIO

Interconnects, Memory, GPIO Interconnects, Memory, GPIO Dr. Francesco Conti f.conti@unibo.it Slide contributions adapted from STMicroelectronics and from Dr. Michele Magno, others Processor vs. MCU Pipeline Harvard architecture Separate

More information

Introduction to Microcontrollers

Introduction to Microcontrollers Introduction to Microcontrollers Embedded Controller Simply an embedded controller is a controller that is embedded in a greater system. One can define an embedded controller as a controller (or computer)

More information

Embedded World Television, Radio, CD player, Washing Machine Microwave Oven Card readers, Palm devices

Embedded World Television, Radio, CD player, Washing Machine Microwave Oven Card readers, Palm devices A presentation on INTRODUCTION We are living in the Embedded World. We are surrounded with many embedded products and our daily life largely depends on the proper functioning of these gadgets. Television,

More information

Module 1. Introduction. Version 2 EE IIT, Kharagpur 1

Module 1. Introduction. Version 2 EE IIT, Kharagpur 1 Module 1 Introduction Version 2 EE IIT, Kharagpur 1 Lesson 4 Embedded Systems Components Part II Version 2 EE IIT, Kharagpur 2 Overview on Components Instructional Objectives After going through this lesson

More information

Z8 Encore! XP F1680 Series 8-Bit Flash Solution with Extended Peripherals

Z8 Encore! XP F1680 Series 8-Bit Flash Solution with Extended Peripherals Embedded Flash Solutions Z8 Encore! XP F1680 Series High-performance 8-bit Flash MCU F1680 advantage low power - 1.8 V highly integrated peripherals flexible memory options optimized cost/performance target

More information

The industrial technology is rapidly moving towards ARM based solutions. Keeping this in mind, we are providing a Embedded ARM Training Suite.

The industrial technology is rapidly moving towards ARM based solutions. Keeping this in mind, we are providing a Embedded ARM Training Suite. EMBEDDED ARM TRAINING SUITE ARM SUITE INCLUDES ARM 7 TRAINER KIT COMPILER AND DEBUGGER THROUGH JTAG INTERFACE PROJECT DEVELOPMENT SOLUTION FOR ARM 7 e-linux LAB FOR ARM 9 TRAINING PROGRAM INTRODUCTION

More information

Learning Module 9. Managing the Sensor: Embedded Computing. Paul Flikkema. Department of Electrical Engineering Northern Arizona University

Learning Module 9. Managing the Sensor: Embedded Computing. Paul Flikkema. Department of Electrical Engineering Northern Arizona University Learning Module 9 Managing the Sensor: Embedded Computing Paul Flikkema Department of Electrical Engineering Northern Arizona University Outline Networked Embedded Systems Hardware Software Languages Operating

More information

Application Report. 1 Hardware Description. John Fahrenbruch... MSP430 Applications

Application Report. 1 Hardware Description. John Fahrenbruch... MSP430 Applications Application Report SLAA309 June 2006 Low-Power Tilt Sensor Using the MSP430F2012 John Fahrenbruch... MSP430 Applications ABSTRACT The MSP430 family of low-power microcontrollers are ideal for low-power

More information

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017 Lecture Objectives Introduction to Computing Chapter The AVR microcontroller and embedded systems using assembly and c Students should be able to: Convert between base and. Explain the difference between

More information

In this tutorial, we will discuss the architecture, pin diagram and other key concepts of microprocessors.

In this tutorial, we will discuss the architecture, pin diagram and other key concepts of microprocessors. About the Tutorial A microprocessor is a controlling unit of a micro-computer, fabricated on a small chip capable of performing Arithmetic Logical Unit (ALU) operations and communicating with the other

More information

ECED3204: Microprocessor Part I--Introduction

ECED3204: Microprocessor Part I--Introduction ECED3204: Microprocessor Part I--Introduction Jason J. Gu Department of 1 Outline i. Computer ii. Processor iii. Embedded System iv. Memory v. Program Execution VI. VII. VIII. IX. AVR AVR Memory AVR CPU

More information

Digital IP Cell 8-bit Microcontroller PE80

Digital IP Cell 8-bit Microcontroller PE80 1. Description The is a Z80 compliant processor soft-macro - IP block that can be implemented in digital or mixed signal ASIC designs. The Z80 and its derivatives and clones make up one of the most commonly

More information

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O ECE2049-E17 Lecture 4 1 ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O Administrivia Homework 1: Due today by 7pm o Either place in box in ECE office or give to me o Office hours tonight!

More information

Microcontroller & Interfacing

Microcontroller & Interfacing Course Title Course Code Microcontroller & Interfacing EC406 Lecture : 3 Course Credit Practical : 1 Tutorial : 0 Total : 4 Course Objective At the end of the course the students will be able to Understand

More information

2006 Mixed Signal Products SLAU049F

2006 Mixed Signal Products SLAU049F User s Guide 2006 Mixed Signal Products SLAU049F IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements,

More information

2002 Mixed Signal Products SLAU056B

2002 Mixed Signal Products SLAU056B User s Guide 22 Mixed Signal Products SLAU56B IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements,

More information

INTEL Architectures GOPALAKRISHNAN IYER FALL 2009 ELEC : Computer Architecture and Design

INTEL Architectures GOPALAKRISHNAN IYER FALL 2009 ELEC : Computer Architecture and Design INTEL Architectures GOPALAKRISHNAN IYER FALL 2009 GBI0001@AUBURN.EDU ELEC 6200-001: Computer Architecture and Design Silicon Technology Moore s law Moore's Law describes a long-term trend in the history

More information

Description of the Simulator

Description of the Simulator Description of the Simulator The simulator includes a small sub-set of the full instruction set normally found with this style of processor. It includes advanced instructions such as CALL, RET, INT and

More information

8051 Overview and Instruction Set

8051 Overview and Instruction Set 8051 Overview and Instruction Set Curtis A. Nelson Engr 355 1 Microprocessors vs. Microcontrollers Microprocessors are single-chip CPUs used in microcomputers Microcontrollers and microprocessors are different

More information

3.1 Description of Microprocessor. 3.2 History of Microprocessor

3.1 Description of Microprocessor. 3.2 History of Microprocessor 3.0 MAIN CONTENT 3.1 Description of Microprocessor The brain or engine of the PC is the processor (sometimes called microprocessor), or central processing unit (CPU). The CPU performs the system s calculating

More information

Fig 1. Block diagram of a microcomputer

Fig 1. Block diagram of a microcomputer Computer: A computer is a multipurpose programmable machine that reads binary instructions from its memory, accepts binary data as input,processes the data according to those instructions and provides

More information

Chapter 4. Enhancing ARM7 architecture by embedding RTOS

Chapter 4. Enhancing ARM7 architecture by embedding RTOS Chapter 4 Enhancing ARM7 architecture by embedding RTOS 4.1 ARM7 architecture 4.2 ARM7TDMI processor core 4.3 Embedding RTOS on ARM7TDMI architecture 4.4 Block diagram of the Design 4.5 Hardware Design

More information

ARM Cortex-M4 Architecture and Instruction Set 1: Architecture Overview

ARM Cortex-M4 Architecture and Instruction Set 1: Architecture Overview ARM Cortex-M4 Architecture and Instruction Set 1: Architecture Overview M J Brockway January 25, 2016 UM10562 All information provided in this document is subject to legal disclaimers. NXP B.V. 2014. All

More information

MSP430. More on MSP430

MSP430. More on MSP430 MSP430 More on MSP430 CodeComposer TI recently launched Code Composer Essentials v3. This IDE s latest version (version 3) supports all available MSP430 devices. The new features of CCE v3 include: - Free

More information

ECE 1160/2160 Embedded Systems Design. Midterm Review. Wei Gao. ECE 1160/2160 Embedded Systems Design

ECE 1160/2160 Embedded Systems Design. Midterm Review. Wei Gao. ECE 1160/2160 Embedded Systems Design ECE 1160/2160 Embedded Systems Design Midterm Review Wei Gao ECE 1160/2160 Embedded Systems Design 1 Midterm Exam When: next Monday (10/16) 4:30-5:45pm Where: Benedum G26 15% of your final grade What about:

More information

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085. (1) Draw and explain the internal architecture of 8085. The architecture of 8085 Microprocessor is shown in figure given below. The internal architecture of 8085 includes following section ALU-Arithmetic

More information

BHARATHIDASAN ENGINEERING COLLEGE. III Year / V Semester / EEE MICROPROCESSORS AND MICROCONTROLLERS (R-2013)

BHARATHIDASAN ENGINEERING COLLEGE. III Year / V Semester / EEE MICROPROCESSORS AND MICROCONTROLLERS (R-2013) BHARATHIDASAN ENGINEERING COLLEGE III Year / V Semester / EEE MICROPROCESSORS AND MICROCONTROLLERS (R-2013) FREQUENTLY ASKED QUESTIONS IN UNIVERSITY EXAMINATION PART A UNIT 1-8085 PROCESSOR 1. Draw the

More information