Introduction to Embedded Systems and Chapter 1: Introduction to HCS12/MC9S12. EE383: Introduction to Embedded Systems University of Kentucky

Size: px
Start display at page:

Download "Introduction to Embedded Systems and Chapter 1: Introduction to HCS12/MC9S12. EE383: Introduction to Embedded Systems University of Kentucky"

Transcription

1 Introduction to Embedded Systems and Chapter 1: Introduction to HCS12/MC9S12 EE383: Introduction to Embedded Systems University of Kentucky Samir Rawashdeh With slides based on material by H. Huang Delmar Cengage Learning 1

2 Embedded Systems 2

3 Why learn Embedded Systems? POV Propeller Clock 3/spinning-pov-clock-doneoh-so-right/ Homework: check out hackaday.com! 3

4 Why learn Embedded Systems? Time Fountain e-time-fountain 4

5 At the Space Systems Lab 5

6 At the Space Systems Lab 6

7 Number System Issue Computer hardware uses binary numbers to perform all operations. To display numbers produced by the computer, both the octal and hexadecimal numbers have been used to shorten the representation. Human beings are used to decimal number system. Conversion is often needed to convert numbers between the internal (binary) and external (decimal) representations. It is common for mixed use of different number bases. A prefix is used to indicate the base of a number. Modulus Math Computers perform modulus math because it uses a limited number of bits (e.g., 8, 16, or 32 bits) to represent numbers. 7

8 What is a computer? Software Hardware Computer Hardware Organization 8

9 The Processor A processor consists of arithmetic logic unit (ALU), control unit, and registers. The ALU can perform many different operations. An ALU that can perform 4 operations is shown in Figure

10 Registers A register is a storage location inside the CPU. A register is used to hold data or address during the execution of an instruction. A register, very close to the ALU, provides fast access to operands for program execution. Some processors provide a dedicated register (often called an accumulator) as one of the operands of most of the instructions. Freescale HCS12, Microchip PIC18, Intel 8051 microcontrollers use this approach. Other processors provide many general-purpose registers in the CPU that can be used as operands of instructions. Atmel AVR and AVR32, Microchip PIC24 and PIC32, Freescale Coldfire use this approach. Microprocessor A processor implemented in a single integrated circuit (IC). The first microprocessor, Intel 4004, was introduced in The Intel 8008, the first 8-bit microprocessor from Intel, was introduced in A microprocessor requires peripheral ICs to interface with I/O devices. A microprocessor does not have peripheral functions such as timers, A/D converters, D/A converters, parallel I/O ports, and memory. The designer need to add peripheral ICs and memory devices to the microprocessor in order to build a product. 10

11 Microcontroller A microcontroller incorporates the processor and one or more of the following peripheral functions and memory in one very large scale integrated circuit (VLSI): 1. Memory 2. Timer functions 3. Serial communication interface such as UART, I2C, SPI, CAN, and Ethernet 4. A/D converter 5. D/A converter 6. Direct memory access 7. Parallel I/O ports 8. Memory component interface 9. Software debug support Microcontrollers have been used in almost every product that requires a certain amount of intelligence. Microcontrollers have been used as controllers for displays, printers, keyboards, modems, charge card phones, palm-top computers, home appliances such as washing machines and microwave ovens, automobile control, and so on. 11

12 Embedded Systems An embedded system is a computer designed to perform a dedicated function. An embedded system performs one or a few predefined tasks, with very specific requirements. Embedded systems are often mass-produced and benefitting from economic scale. Software written for embedded systems is often called firmware. 12

13 Memory Technologies Magnetic Memory Magnetic drums, magnetic tapes, and magnetic disks are the three major magnetic memory devices that have been invented. Only magnetic disks are still being widely used today Hard disks are rarely used in an embedded system Optical Memory Compact disk (CD) and digital video disc (DVD) are two major optical memory devices. CD was introduced in CD has two versions: CD-R and CD-RW. The capacity of a 12-inch CD is 700 MB. A 12-inch DVD has the capacity of 4.7 GB DVD has two versions: DVD-R and DVD-RW versions. Semiconductor Memory Semiconductor memory can be classified on the basis of volatility and read-writability. On the basis of volatility, semiconductor memory is divided into volatile and non-volatile memory. On the basis of read-writability, semiconductor memory is divided into random-access memory (RAM) and read-only memory (ROM). 13

14 Random-access memory There are four types of RAM: Dynamic random-access memory (DRAM): The one-bit cell of DRAM consists of one transistor and one capacitor. The information is stored in the capacitor whereas the transistor controls the access of the information stored in the capacitor. Periodic refresh is required to maintain the contents of a DRAM chip Static random-access memory (SRAM): The one-bit of SRAM consists of 4 to 6 transistors. No periodic refresh operation is required to maintain the information stored in SRAM. 14

15 Read-Only Memory ROM is nonvolatile. There are several types of ROM technologies. Mask-Programmed ROM (MROM) The contents of MROM is programmed when it is manufactured. To be cost-effective, many thousands of copies of MROM chip must be manufactured. MROM is one of the major ROM technologies to hold application programs Programmable ROM (PROM) The setting of each bit is locked by a fuse or antifuse. PROM is programmed by blowing a fuse or an antifuse. PROM can only be programmed once using a special programmer. Erasable programmable ROM (EPROM) An EPROM cell must be erased before it is programmed. EPROM is electrically programmable many times. EPROM is erased by ultraviolet light (through a window). EPROM can only be erased in bulk (whole chip in one erasure operation). 15

16 Electrically erasable programmable ROM (EEPROM) An EEPROM cell must be erased before it is programmed. EEPROM is electrically erasable and programmable many times. EEPROM can be erased one location, one row, or whole chip in one operation Flash memory Flash memory is electrically erasable and programmable many times. Flash memory can only be erased in bulk or a sector at a time Flash can achieve the density of DRAM and is the most widely used nonvolatile memory technology. 16

17 The HCS12 Features 16-bit CPU 64 KB memory space (also supports expanded memory up to 1 MB through a 16-KB window) 0 KB to 4KB of EEPROM 2KB to 14KB of on-chip SRAM 32 KB to 512KB flash memory Sophisticated timer functions that include: input capture, output compare, pulse accumulators, real-time interrupt, and COP timer Serial communication interfaces: SCI, SPI, CAN Background debug mode (BDM) 10-bit A/D converter Instructions for supporting fuzzy logic function 17

18 Computer software Computer programs are known as software A program is a sequence of instructions Machine instruction A sequence of binary digits which can be executed by the processor : A [A] + [B] : A [A] : A 6 Hard to understand, enter, debug, and maintain for human being 18

19 Assembly language Defined by assembly instructions An assembly instruction is a mnemonic representation of a machine instruction ABA: A [A] + [B] DECA: A [A] 1 Assembly programs must be translated into machine instructions before it can be executed -- translated by an assembler Programmers need to work on the program logic at a very low level and cannot achieve high productivity. 19

20 High-level language Syntax of a high-level language is similar to English A translator (called compiler) is required to translate the program written in a high-level language Source code A program written in assembly or high-level language Object code The output of an assembler or compiler 20

21 line addr. machine code source code 1: = org $2000 2: 2000 B ldaa $1000 3: 2003 BB 1001 adda $1001 4: 2006 BB 1002 adda $1002 5: A 1100 staa $1100 6: end 21

22 The HCS12 CPU Registers 7 A 0 7 B 0 15 D 0 8-bit accumulator A and B or 16-bit double accumulator D 15 X 0 Index register X 15 0 Y Index register Y 15 SP 0 Stack pointer 15 PC 0 Program counter S X H I N Z V C Condition code register Carry Overflow Zero Negative I Interrupt mask Half-Carry (from bit 3) X Interrupt Mask Stop Disable Figure 1.10 HCS12 CPU registers. 22

23 Control Unit The control unit uses a program counter to keep track of the address of the instruction to be executed next. The fetched instruction is placed in the instruction register when is decoded, and executed. The control unit decodes machine codes and performs the operations specified by the machine code. A machine instruction has several fields. A mandated field is the opcode field. Instruction execution is timed by a clock signal. The frequency of the clock signal used in an 8-bit or 16-bit microcontroller is from a few mega hertz to several hundred mega Hertz Program instructions are normally stored in sequential locations in memory. The processor may not execute instructions in sequential due to the need to execute instructions based on the condition or the need to repeat a certain group of instructions. The processor uses conditional and unconditional branch (or jump) instructions to change the program flow. 23

24 Memory System Operation A block diagram of a memory system is shown in Figure 1.2. Each memory location has two components: address and contents. The organization of a memory chip is indicated by m x n, where m is the number of locations in the chip and n indicates the number of bits in one location. The notation [reg] and [addr] specifies the contents of a register and the memory location at addr, respectively. 24

25 The HCS12 Addressing Modes A HCS12 instruction consists of one or two bytes of opcode and zero to five bytes of operand addressing information. Addressing modes specify the operand to be operated on. The addressing mode may specify a value, a register, or a memory location to be used as an operand. 25

26 26

27 Inherent Mode - Instructions that use this mode do not uses extra bytes to specify operands because the instructions either do not need operands or all operands are CPU registers. - Operands are implied by the opcode. - Examples NOP INX DECA No operation Increment X Decrement A 27

28 Immediate Mode - Operands for instructions that use immediate mode are included in the instruction. - CPU does not access memory for operands. - For example, LDAA #$55 ;A $55 Loads A with the value $55 LDX #$1000 ;X $1000 Loads X with the value $1000 Direct Mode - This mode can only specify memory locations in the range of This mode uses only one byte to specify the operand address. - Examples, LDAA $20 Loads A with a copy of the content at $0020 LDAB $40 Loads B with a copy of the content at $

29 Extended Mode - This mode uses a 16-bit value to specify memory address is in the instruction. LDAA $4000 ; A [$4000] LDX $FE60 ; X [$FE60]:[$FE61] Relative Mode - Used only by branch instructions. - Short and long conditional branch instructions use exclusively relative mode. - A short branch instructions consists of an 8-bit opcode and a signed 8-bit offset. The short relative mode can specify a range of -128 ~ A long branch instruction consists of an 8-bit opcode and a signed 16-bit offset. The range of the long relative mode is from ~ BRCLR (branch if clear) and BRSET (branch if set) instructions can also use relative mode to specify branch target. - A programmer uses a symbol to specify the branch target and the assembler will figure out the actual branch offset (distance) from the instruction that follows branch instruction. 29

30 - For example, minus bmi minus ;Branch if Minus Indexed Mode - This mode uses the sum of an index register (X, Y, PC, or SP) and an offset to specify the address of an operand. - The offset can be a 5-bit, 9-bit, and 16-bit signed value or the value in accumulator A, B, or D. - Automatic pre- or post-increment or pre- or post-decrement by -8 to +8 are options. - PC can be used as the index register for all but auto-increment or auto-decrement mode. - Indirect indexing with 16-bit offset or accumulator D as the offset is supported. 30

31 5-bit Constant Offset Indexed Addressing - The base index register can be X, Y, SP, or PC. - The range of the offset is from -16 to Examples, Loads A with the content at [X]+0 ldaa 0,X ldab 1,X Loads B with the content at [X]+1 9-bit Constant Offset Indexed Addressing - The base index register can be X, Y, SP, or PC. - The range of the offset is from -256 to Examples, ldaa $FF,X Loads A with the content at [X]+255 ldab -20,Y Loads B with the content at [Y]-20 31

32 16-bit Constant Offset Indexed Addressing - The base index register can be X, Y, SP, or PC. - This mode allows access any location in the 64-KB range. - Examples, Loads A with the content at [X]+2000 ldaa 2000,X staa 4000,Y Stores content of A at [Y] bit Constant Indirect Indexed Addressing - A 16-bit offset is added to the base index register to form the address of a memory location that contains a pointer to the memory location affected by the instruction. - The square brackets distinguish this addressing mode from the 16-bit constant offset indexing. For example, ldaa [10,X] Loads A with the content pointed to by address at [X]+10 staa [20,Y] Stores content of A in memory at the location pointed to by [Y]+20 32

33 Auto Pre/Post Decrement/Increment Indexed Addressing - The base index register can be X, Y, or SP. - The index register can be incremented or decremented by an integer value either before or after indexing taking place. - The index register retains the changed value after indexing. - The value to be incremented or decrement is in the ranges -8 thru -1 or 1 thru 8. - The value need to be related to the size of the operand or the current instruction. - Examples, staa 1,-SP ; decrement SP by 1 and then store the contents of A in the location ; pointed to by SP and staa 1,SP- ; store the contents of A in the location pointed by SP and then ; decrement SP by 1 ldx 2,+SP ldx 2,SP+ 33

34 Accumulator Offset Indexed Addressing - The effective address of the operand is the sum of the accumulator and the base index register. - The base register can be X, Y, SP, or PC. - The accumulator can be the 8-bit A or B or the 16-bit accumulator D. - For example, ldaa B,X stab B,Y ldy D,X 34

35 HCS12 Instruction Examples The LOAD and STORE Instructions - The LOAD instruction copies the contents of a memory location or places an immediate value into an accumulator or a CPU register. - STORE instructions save the contents of a CPU register into a memory location. - N and Z flags of the CCR register are automatically updated and the V flag is cleared. - All except for the relative mode can be used to select the memory location or value to be loaded into an accumulator or CPU register. - All except for the relative and immediate modes can be used to select memory location to store contents of the CPU register. For example, ldaa 0,X staa $20 stx $8000 ldd #100 35

36 36

37 Transfer and Exchange Instructions - Transfer instructions copy the contents of a CPU register or accumulator into another CPU register or accumulator. - TFR is the universal transfer instruction, but other mnemonics are accepted for compatibility with the 68HC11. - The TAB and TBA instructions affect the N, Z, and V condition code bits. - The TFR instruction does not affect any condition code bits. For example, TFR D,X ; [D] X TFR A,B ; [A] B TFR A,X ; sign-extended of[a] X ; A is signed extended to 16-bit and assigned to X TFR X,A ; X[7:0] A ; lower 8 bits copied to A 37

38 - The EXG instruction exchanges the contents of a pair of registers or accumulators. For example, exg A, B exg D,X exg A,X ; A X[7:0], X $00:[A] exg X,B ; X $00:[B], B X[7:0] - The SEX instruction sign-extend an 8-bit two s complement number into a 16-bit number so that it can be used in 16-bit signed operations. For example, SEX A,X 38

39 Move Instructions - These instructions move data bytes or words from a source to a destination in memory. - Six combinations of immediate, extended, and index addressing modes are allowed to specify the source and destination addresses: IMM EXT, IMM IDX, EXT EXT, EXT IDX, IDX EXT, IDX IDX - For example, movb $100,$800 Move Byte movw 0,X, 0,Y Move Word 39

40 Add and Subtract Instructions - These instructions perform fundamental arithmetic operations. - The destinations of these instructions are always a CPU register or accumulator. - There are two-operand and three-operand versions of these instructions. - Three-operand ADD or SUB instructions always include the C flag as one of the operand. - Three-operand ADD or SUB instructions are used to perform multi-precision addition or subtraction. - For example, adda $1000 ; A [A] + [$1000] adca $1000 ; A [A] + [$1000] + C suba $1002 ; A [A] + [$1002] sbca $1000 ; A [A] - [$1000] - C 40

41 41

42 Left for Dr Lumpp to discuss 42

43 Instruction Execution Cycle - One or more read cycles to fetch instruction opcode bytes and addressing information. - One or more read cycles to fetch the memory operand(s) (optional). - Perform the operation specified by the opcode. - One or more write cycles to write back the result to either a register or a memory - location (optional). Instruction Queue - The HCS12 executes one instruction at a time and many instructions take several clock cycles to complete. - When the CPU is performing the operation, it does not need to access memory. - The HCS12 pre-fetches instructions when the CPU is not accessing memory to speedup the instruction execution process. - There are two 16-bit queue stages and one 16-bit buffer. Unless buffering is required, program information is first queued in stage 1, and then advanced to stage 2 for execution. 43

44 Memory System Operation A block diagram of a memory system is shown in Figure 1.2. Each memory location has two components: address and contents. The organization of a memory chip is indicated by m x n, where m is the number of locations in the chip and n indicates the number of bits in one location. The notation [reg] and [addr] specifies the contents of a register and the memory location at addr, respectively. 44

45 Read Operation The processor places the address of the memory location that it intends to read on the address bus and asserts the RD signal. The RD signal enables the memory chip to send out the contents of the selected location on the data bus and the processor gets the data. Write Operation The processor places the address of the location that it intends to write on the address bus. The processor also places the data that it intends to write on the data bus and asserts the WE signal. In responds to the WE signal, the memory chip stores the data on the data bus in the selected memory location. 45

46 Program Execution To understand how processor executes the program, we need to answer the following questions: Where does the processor start to execute program after power on? From a fixed location such as address 0: PIC18, Atmel avr, and 8051 Fetch the starting address from a fixed location: HCS12 How does the processor update the program counter (PC)? Increment the program counter by the length of the instruction just executed. Increment or decrement by the amount specified in the current instruction conditional and unconditional branch instructions. Set to the new address specified by the current instruction jump (or goto) instruction or subroutine call instruction. Program Counter Circuit A common building block of PC is the D flip-flop with set and reset capability (Figure 1.3). The program counter circuit that can be forced to 0, incremented by 1, incremented by a field in the instruction, and loaded with a jump target is shown in Figure

47 47

48 Architecture of the Processor X Processor X has a separate data memory and program memory spaces. Processor X is used to explain the instruction execution process. The instruction set of processor X is given in Table 1.3. Processor X has an 8-bit accumulator A and a 16-bit register ptr. Processor X instructions can use an 8-bit value to specify a data memory location from 0 to 255 to be accessed. For data memory locations with address higher than 255, the processor uses the 16-bit register ptr to specify the address. Processor X uses a MDR register to hold data to be written and read from data memory. The instruction set implemented by processor X is given in Table

49 Instruction sequence example ld 0x20,#0 ; place 0 in data memory at 0x20 ld 0x21,#20 ; place 20 in data memory at 0x21 ld ptr,#0x2000 ; load 0x2000 into the ptr register loop: ld A,@ptr ; load the memory contents pointed to by ptr and A,#0x03 ; and the value 0x03 with accumulator A bnz next ; branch if the result is not 0 inc 0x20 ; increment the memory location at 0x20 by 1 next: dbnz 0x21,loop ; decrement memory location at 0x21 and branch ; if the contents of 0x21 is not zero yet 49

50 Instruction Execution Process Assume that processor X executes the instruction sequence in the previous out of reset. Instruction ld 0x20,#0 (machine code ) Step 1 Processor X places 0 (contents of PC) on the address bus to perform a read from program program memory. Step 2 The 8-bit value at the location 0x0000 is the instruction opcode 0x75. At the end of this read cycle, the PC is incremented to 0x0001. The opcode byte 0x75 is fetched. Figure 1.5 shows the opcode read cycle. Step 3 Recognizing that 0x75 is the opcode of a load instruction, processor performs two more read operations. The first read returns the address 0x20 whereas the second read returns the value 0. Step 4 Processor places 0x20 on the data memory address bus and places 0 on the data bus and then performs a write operation to write the value 0 to location 0x20. 50

51 51

52 Instruction ld 0x21,#20 (machine code ) The execution of this instruction is identical to that of the previous instruction. PC is incremented to 0x0006 after the execution of this instruction. Instruction ld ptr,#0x2000 (machine code ) Step 1 Processor X places the PC value (0x06) on the program memory address bus and makes request to read the program memory. Figure 1.7 shows the opcode read cycle. Step 2 The opcode returned from location at 0x06 is 0x90 and PC is incremented to 0x07. Step 3 The opcode 0x90 indicates that processor X should access program memory to fetch the 16-bit value stored after the opcode byte. Processor performs two more read cycles from program memory and places these two bytes in the ptr register. PC is incremented to 0x09. 52

53 Instruction ld (machine code E0) Step 1 Processor X places the PC value (0x09) on the program memory address bus and requests to read the program memory. At the end of this step, PC is incremented to 0x0A. 53

54 Step 2 The opcode (0xE0) returned in Step 1 requires the processor to perform a read operation Using the address stored in ptr register. Processor X places the contents of ptr register on the data memory address bus and request a read operation. Step 3 Data memory returns the byte in data memory pointed to by ptr register. This byte is placed in A. 54

55 Instruction and A,#0x03 (machine code 54 03) Step 1 Processor X places the PC value on the program memory address bus to request a read. After this step is completed, PC is incremented to 0x0B. Step 2 The opcode byte (0x54) returned in Step 1 requires the processor X to perform another read operation from program memory. Step 3 Processor X places the PC value on program memory address bus and request to perform a read operation. PC is incremented to 0x0C after this step. Step 4 Program memory returns the value 0x03 to the processor. Step 5 The processor X then performs an AND operation on the contents of A and the value 0x03 and places the result in A 55

56 Instruction bnz next (machine code is 70 02) Step 1 Processor X places the PC value (0x0C) on the program memory address bus and performs a read operation. After this step, PC is incremented to 0x0D. Step 2 The opcode (0x70) returned in Step 1 requires processor X to performs another read to fetch the branch offset. Step 3 Processor X places the value PC (0x0D) on the program memory address bus and performs a read. After this step the program memory returns the value 0x02 to the processor. PC is incremented to 0x0E. Step 4 Processor checks whether the A value is zero and decides whether branch should be taken. If A contains a nonzero value, the next instruction will be skipped. 56

57 Instruction inc 0x20 (machine code 05 20) Step 1 Processor X places the PC contents (0x0E) on the program memory address bus and Performs a read operation. At the end of the read operation, PC is incremented to 0x0F. Step 2 The returned opcode (0x05) requires processor X to performs another read to fetch an 8-bit address from program memory. Step 3 Processor X places the contents of PC on the program memory address bus to request another read from program memory. PC is incremented to 0x10 Step 4 Processor X places the value 0x20 on the data memory address bus and requests a read. The returned value is placed in MDR register. Step 5 Processor X adds one to the MDR register. Step 6 Processor X places the contents of MDR on data memory data bus and 0x20 on the address bus and requests a write operation. At the end the value in MDR register is written into data memory location at 0x20. 57

58 Instruction dbnz 0x21, loop (machine code is D5 21 0A) Step 1 Processor X places the contents of PC on the program memory address bus and requests a read operation. At the end of this step PC is incremented to 0x11. Step 2 The opcode (0xD5) returned in step 1 request processor X to perform two more read operation to fetch a byte of data memory address and a byte of branch offset from program memory. At the end of these two read operations, PC is incremented to 0x13. Step 3 Processor places the value of 0x21 on the data memory address bus to perform a read. At the end of this read, the contents of data memory location at 0x21 is returned in MDR. Step 4 Processor decrements the contents of MDR by 1 and then places this result on the data memory data bus. At the same time, it also places the value of 0x21 on the data memory address bus and requests a write operation. Step 5 If the value stored in MDR is not zero, processor X adds 0x0A to the PC and places the sum back in PC (this causes a branch). Otherwise, PC is not changed. 58

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

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

ECE 4510/5530 Microcontroller Applications Chapter 1

ECE 4510/5530 Microcontroller Applications Chapter 1 Microcontroller Applications Chapter 1 Dr. Bradley J. Bazuin Associate Professor Department of Electrical and Computer Engineering College of Engineering and Applied Sciences Chapter 1 Overview Basic Computer

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

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

ECE331 Handout 3- ASM Instructions, Address Modes and Directives

ECE331 Handout 3- ASM Instructions, Address Modes and Directives ECE331 Handout 3- ASM Instructions, Address Modes and Directives ASM Instructions Functional Instruction Groups Data Transfer/Manipulation Arithmetic Logic & Bit Operations Data Test Branch Function Call

More information

ME4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 7

ME4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 7 ME4447/6405 Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics Instructor: Professor Charles Ume LECTURE 7 Reading Assignments Reading assignments for this week and next

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 Organization and Assembly Language (CS-506)

Computer Organization and Assembly Language (CS-506) Computer Organization and Assembly Language (CS-506) Muhammad Zeeshan Haider Ali Lecturer ISP. Multan ali.zeeshan04@gmail.com https://zeeshanaliatisp.wordpress.com/ Lecture 2 Memory Organization and Structure

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

Introduction to Computers - Chapter 4

Introduction to Computers - Chapter 4 Introduction to Computers - Chapter 4 Since the invention of the transistor and the first digital computer of the 1940s, computers have been increasing in complexity and performance; however, their overall

More information

Exam I Review February 2017

Exam I Review February 2017 Exam I Review February 2017 Binary Number Representations Conversion of binary to hexadecimal and decimal. Convert binary number 1000 1101 to hexadecimal: Make groups of 4 bits to convert to hexadecimal,

More information

538 Lecture Notes Week 2

538 Lecture Notes Week 2 538 Lecture Notes Week 2 (Sept. 13, 2017) 1/15 Announcements 538 Lecture Notes Week 2 Labs begin this week. Lab 1 is a one-week lab. Lab 2 (starting next week) is a two-week lab. 1 Answers to last week's

More information

EE 5340/7340 Motorola 68HC11 Microcontroler Lecture 1. Carlos E. Davila, Electrical Engineering Dept. Southern Methodist University

EE 5340/7340 Motorola 68HC11 Microcontroler Lecture 1. Carlos E. Davila, Electrical Engineering Dept. Southern Methodist University EE 5340/7340 Motorola 68HC11 Microcontroler Lecture 1 Carlos E. Davila, Electrical Engineering Dept. Southern Methodist University What is Assembly Language? Assembly language is a programming language

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

2. Arithmetic Instructions addition, subtraction, multiplication, divison (HCS12 Core Users Guide, Sections 4.3.4, and ).

2. Arithmetic Instructions addition, subtraction, multiplication, divison (HCS12 Core Users Guide, Sections 4.3.4, and ). AS12 Assembler Directives A Summary of 9S12 instructions Disassembly of 9S12 op codes Huang Section 1.8, Chapter 2 MC9S12 V1.5 Core User Guide Version 1.2, Section 12 o A labels is a name assigned the

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

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

CREATED BY M BILAL & Arslan Ahmad Shaad Visit: CREATED BY M BILAL & Arslan Ahmad Shaad Visit: www.techo786.wordpress.com Q1: Define microprocessor? Short Questions Chapter No 01 Fundamental Concepts Microprocessor is a program-controlled and semiconductor

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

N bit is set if result of operation in negative (MSB = 1) Z bit is set if result of operation is zero (All bits = 0)

N bit is set if result of operation in negative (MSB = 1) Z bit is set if result of operation is zero (All bits = 0) Addition and Subtraction of Hexadecimal Numbers. Setting the C (Carry), V (Overflow), N (Negative) and Z (Zero) bits How the C, V, N and Z bits of the CCR are changed Condition Code Register Bits N, Z,

More information

M. Sc (CS) (II Semester) Examination, Subject: Computer System Architecture Paper Code: M.Sc-CS-203. Time: Three Hours] [Maximum Marks: 60

M. Sc (CS) (II Semester) Examination, Subject: Computer System Architecture Paper Code: M.Sc-CS-203. Time: Three Hours] [Maximum Marks: 60 M. Sc (CS) (II Semester) Examination, 2012-13 Subject: Computer System Architecture Paper Code: M.Sc-CS-203 Time: Three Hours] [Maximum Marks: 60 Note: Question Number 1 is compulsory. Answer any four

More information

MC9S12 Assembler Directives A Summary of MC9S12 Instructions Disassembly of MC9S12 op codes. Summary of HCS12 addressing modes ADDRESSING MODES

MC9S12 Assembler Directives A Summary of MC9S12 Instructions Disassembly of MC9S12 op codes. Summary of HCS12 addressing modes ADDRESSING MODES MC9S12 Assembler Directives A Summary of MC9S12 Instructions Disassembly of MC9S12 op codes o Review of Addressing Modes o Which branch instruction to use (signed vs unsigned) o Using X and Y registers

More information

Semiconductor Memories: RAMs and ROMs

Semiconductor Memories: RAMs and ROMs Semiconductor Memories: RAMs and ROMs Lesson Objectives: In this lesson you will be introduced to: Different memory devices like, RAM, ROM, PROM, EPROM, EEPROM, etc. Different terms like: read, write,

More information

Introduction to Programming

Introduction to Programming Introduction to Programming Chapter 2 Microcontrollers Objectives Describe the difference between source code and machine code. Define opcode, operand, and address of an operand. Explain the purpose of

More information

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers o How to disassemble an MC9S12 instruction sequence o Binary numbers are a code and represent what the programmer intends for the

More information

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers o How to disassemble an MC9S12 instruction sequence o Binary numbers are a code and represent what the programmer intends for the

More information

Introduction to the 9S12 Microcontroller

Introduction to the 9S12 Microcontroller Introduction to the 9S12 Microcontroller o Harvard architecture and Princeton architecture o Memory map for a Princeton architecture microprocessor o 68HC12 Address Space o 68HC12 ALU o 68HC12 Programming

More information

Most of the HC12 s instructions access data in memory There are several ways for the HC12 to determine which address to access

Most of the HC12 s instructions access data in memory There are several ways for the HC12 to determine which address to access HC12 Addressing Modes Instruction coding and execution o Inherent, Extended, Direct, Immediate, Indexed, and Relative Modes o Summary of MC9S12 Addressing Modes o Using X and Y registers as pointers o

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

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-470/570: Microprocessor-Based System Design Fall 2014.

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-470/570: Microprocessor-Based System Design Fall 2014. ECE-47/57: Microprocessor-Based System Design Fall 214 Notes - Unit 3 OVERVIEW OF THE HCS12 MICROCONTROLLER The HCS12 is a family of Freescale microcontrollers (MCUs) targeted to automotive and process

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

Addition and Subtraction of Hexadecimal Numbers Simple assembly language programming

Addition and Subtraction of Hexadecimal Numbers Simple assembly language programming Addition and Subtraction of Hexadecimal Numbers Simple assembly language programming o A simple Assembly Language Program o Assembling an Assembly Language Program o Simple 9S12 programs o Hex code generated

More information

History of the Microprocessor. ECE/CS 5780/6780: Embedded System Design. Microcontrollers. First Microprocessors. MC9S12C32 Block Diagram

History of the Microprocessor. ECE/CS 5780/6780: Embedded System Design. Microcontrollers. First Microprocessors. MC9S12C32 Block Diagram History of the Microprocessor ECE/CS 5780/6780: Embedded System Design Chris J. Myers Lecture 1: 68HC12 In 1968, Bob Noyce and Gordon Moore left Fairchild Semiconductor and formed Integrated Electronics

More information

Wed. Aug 23 Announcements

Wed. Aug 23 Announcements Wed. Aug 23 Announcements Professor Office Hours 1:30 to 2:30 Wed/Fri EE 326A You should all be signed up for piazza Most labs done individually (if not called out in the doc) Make sure to register your

More information

CHAPTER 8. Solutions for Exercises

CHAPTER 8. Solutions for Exercises CHAPTER 8 Solutions for Exercises E8.1 The number of bits in the memory addresses is the same as the address bus width, which is 20. Thus the number of unique addresses is 2 20 = 1,048,576 = 1024 1024

More information

COMP2121: Microprocessors and Interfacing. Introduction to Microprocessors

COMP2121: Microprocessors and Interfacing. Introduction to Microprocessors COMP2121: Microprocessors and Interfacing Introduction to Microprocessors http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 1 Contents Processor architectures Bus Memory hierarchy 2

More information

Mark II Aiken Relay Calculator

Mark II Aiken Relay Calculator Introduction to Embedded Microcomputer Systems Lecture 6.1 Mark II Aiken Relay Calculator 2.12. Tutorial 2. Arithmetic and logical operations format descriptions examples h 8-bit unsigned hexadecimal $00

More information

Lecture 6 Assembly Programming: Branch & Iteration

Lecture 6 Assembly Programming: Branch & Iteration CPE 390: Microprocessor Systems Spring 2018 Lecture 6 Assembly Programming: Branch & Iteration Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ

More information

S12CPUV2. Reference Manual HCS12. Microcontrollers. S12CPUV2/D Rev. 0 7/2003 MOTOROLA.COM/SEMICONDUCTORS

S12CPUV2. Reference Manual HCS12. Microcontrollers. S12CPUV2/D Rev. 0 7/2003 MOTOROLA.COM/SEMICONDUCTORS HCS12 Microcontrollers /D Rev. 0 7/2003 MOTOROLA.COM/SEMICONDUCTORS To provide the most up-to-date information, the revision of our documents on the World Wide Web will be the most current. Your printed

More information

A Simple MC9S12 Program

A Simple MC9S12 Program A Simple MC9S12 Program All programs and data must be placed in memory between address 0x1000 and 0x3BFF. For our programs we will put the first instruction at 0x2000, and the first data byte at 0x1000

More information

Addition and Subtraction of Hexadecimal Numbers Simple assembly language programming

Addition and Subtraction of Hexadecimal Numbers Simple assembly language programming Addition and Subtraction of Hexadecimal Numbers Simple assembly language programming o A simple Assembly Language Program o Assembling an Assembly Language Program o Simple 9S12 programs o Hex code generated

More information

Chapter 2: HCS12 Assembly Programming. EE383: Introduction to Embedded Systems University of Kentucky. Samir Rawashdeh

Chapter 2: HCS12 Assembly Programming. EE383: Introduction to Embedded Systems University of Kentucky. Samir Rawashdeh Chapter 2: HCS12 Assembly Programming EE383: Introduction to Embedded Systems University of Kentucky Samir Rawashdeh With slides based on material by H. Huang Delmar Cengage Learning 1 Three Sections of

More information

Assembly Language Programming of 8085

Assembly Language Programming of 8085 Assembly Language Programming of 8085 Topics 1. Introduction 2. Programming model of 8085 3. Instruction set of 8085 4. Example Programs 5. Addressing modes of 8085 6. Instruction & Data Formats of 8085

More information

538 Lecture Notes Week 5

538 Lecture Notes Week 5 538 Lecture Notes Week 5 (October 4, 2017) 1/18 538 Lecture Notes Week 5 Announements Midterm: Tuesday, October 25 Answers to last week's questions 1. With the diagram shown for a port (single bit), what

More information

538 Lecture Notes Week 5

538 Lecture Notes Week 5 538 Lecture Notes Week 5 (Sept. 30, 2013) 1/15 538 Lecture Notes Week 5 Answers to last week's questions 1. With the diagram shown for a port (single bit), what happens if the Direction Register is read?

More information

Microcontrollers and the Freescale/Motorola HC11

Microcontrollers and the Freescale/Motorola HC11 Microcontrollers and the Freescale/Motorola HC11 What is a microcontroller? A computer on a chip used to control electronic devices A microprocessor Usually not cutting edge (4-bit to 32-bit) Dependable

More information

COA. Prepared By: Dhaval R. Patel Page 1. Q.1 Define MBR.

COA. Prepared By: Dhaval R. Patel Page 1. Q.1 Define MBR. Q.1 Define MBR. MBR( Memory buffer register) A Memory Buffer Register (MBR) is the register in a computers processor that stores the data being transferred to and from the devices It allowing the processor

More information

EE 3170 Microcontroller Applications

EE 3170 Microcontroller Applications Q. 3.9 of HW3 EE 37 Microcontroller Applications (a) (c) (b) (d) Midterm Review: Miller Chapter -3 -The Stuff That Might Be On the Exam D67 (e) (g) (h) CEC23 (i) (f) (j) (k) (l) (m) EE37/CC/Lecture-Review

More information

Introduction to Microcontrollers

Introduction to Microcontrollers Motorola M68HC11 Specs Assembly Programming Language BUFFALO Topics of Discussion Microcontrollers M68HC11 Package & Pinouts Accumulators Index Registers Special Registers Memory Map I/O Registers Instruction

More information

Menu Computer Organization Programming Model for the an example microprocessors (the G-CPU & Motorola 68HC11) Assembly Programming Look into my...

Menu Computer Organization Programming Model for the an example microprocessors (the G-CPU & Motorola 68HC11) Assembly Programming Look into my... Menu Computer Organization Programming Model for the an example microprocessors (the G-CPU & Motorola 68HC11) Assembly Programming Look into my... See examples on web: DirAddr.asm, ExtAddr.asm, IndAddr.asm,

More information

5 Computer Organization

5 Computer Organization 5 Computer Organization 5.1 Foundations of Computer Science ã Cengage Learning Objectives After studying this chapter, the student should be able to: q List the three subsystems of a computer. q Describe

More information

Computer Organization

Computer Organization Objectives 5.1 Chapter 5 Computer Organization Source: Foundations of Computer Science Cengage Learning 5.2 After studying this chapter, students should be able to: List the three subsystems of a computer.

More information

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers 1. Define microprocessors? UNIT-I A semiconductor device(integrated circuit) manufactured by using the LSI technique. It includes

More information

Moodle WILLINGDON COLLEGE SANGLI (B. SC.-II) Digital Electronics

Moodle WILLINGDON COLLEGE SANGLI (B. SC.-II) Digital Electronics Moodle 4 WILLINGDON COLLEGE SANGLI (B. SC.-II) Digital Electronics Advanced Microprocessors and Introduction to Microcontroller Moodle developed By Dr. S. R. Kumbhar Department of Electronics Willingdon

More information

The Central Processing Unit

The Central Processing Unit The Central Processing Unit All computers derive from the same basic design, usually referred to as the von Neumann architecture. This concept involves solving a problem by defining a sequence of commands

More information

UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) Department of Electronics and Communication Engineering, VBIT

UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) Department of Electronics and Communication Engineering, VBIT UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) contents Memory: Introduction, Random-Access memory, Memory decoding, ROM, Programmable Logic Array, Programmable Array Logic, Sequential programmable

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

Microcontrollers. 2IN60: Real-time Architectures (for automotive systems) Mike Holenderski,

Microcontrollers. 2IN60: Real-time Architectures (for automotive systems) Mike Holenderski, Microcontrollers 2IN60: Real-time Architectures (for automotive systems) Goals for this slide set Describe the architecture of a microcontroller Explain the purpose of an Instruction Set Architecture and

More information

Unit 6 1.Random Access Memory (RAM) Chapter 3 Combinational Logic Design 2.Programmable Logic

Unit 6 1.Random Access Memory (RAM) Chapter 3 Combinational Logic Design 2.Programmable Logic EE 200: Digital Logic Circuit Design Dr Radwan E Abdel-Aal, COE Unit 6.Random Access Memory (RAM) Chapter 3 Combinational Logic Design 2. Logic Logic and Computer Design Fundamentals Part Implementation

More information

Chapter One. Introduction to Computer System

Chapter One. Introduction to Computer System Principles of Programming-I / 131101 Prepared by: Dr. Bahjat Qazzaz -------------------------------------------------------------------------------------------- Chapter One Introduction to Computer System

More information

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad Introduction to MS-DOS Debugger DEBUG In this laboratory, we will use DEBUG program and learn how to: 1. Examine and modify the contents of the 8086 s internal registers, and dedicated parts of the memory

More information

Introduction to Microcomputer Systems Addressing modes

Introduction to Microcomputer Systems Addressing modes Dept. of Computer Science and Engineering Introduction to Microcomputer Systems Overview Addressing mode Source form Abbreviation Description Inherent INST (no externally supplied operands) INH Immediate

More information

COMP2121: Microprocessors and Interfacing. Instruction Set Architecture (ISA)

COMP2121: Microprocessors and Interfacing. Instruction Set Architecture (ISA) COMP2121: Microprocessors and Interfacing Instruction Set Architecture (ISA) http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 Contents Memory models Registers Data types Instructions

More information

5 Computer Organization

5 Computer Organization 5 Computer Organization 5.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: List the three subsystems of a computer. Describe the

More information

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller of 8085 microprocessor 8085 is pronounced as "eighty-eighty-five" microprocessor. It is an 8-bit microprocessor designed by Intel in 1977 using NMOS technology. It has the following configuration 8-bit

More information

Computer Organization

Computer Organization INF 101 Fundamental Information Technology Computer Organization Assistant Prof. Dr. Turgay ĐBRĐKÇĐ Course slides are adapted from slides provided by Addison-Wesley Computing Fundamentals of Information

More information

E3940 Microprocessor Systems Laboratory. Introduction to the Z80

E3940 Microprocessor Systems Laboratory. Introduction to the Z80 E3940 Microprocessor Systems Laboratory Introduction to the Z80 Andrew T. Campbell comet.columbia.edu/~campbell campbell@comet.columbia.edu E3940 Microprocessor Systems Laboratory Page 1 Z80 Laboratory

More information

MEMORY BHARAT SCHOOL OF BANKING- VELLORE

MEMORY BHARAT SCHOOL OF BANKING- VELLORE A memory is just like a human brain. It is used to store data and instructions. Computer memory is the storage space in computer where data is to be processed and instructions required for processing are

More information

MC9S12 Address Space

MC9S12 Address Space MC9S12 Address Space MC9S12 has 16 address lines MC9S12 can address 2 16 distinct locations For MC9S12, each location holds one byte (eight bits) MC9S12 can address 2 16 bytes 2 16 = 65536 2 16 = 2 6 2

More information

Chapter 2 HCS12 Assembly Language

Chapter 2 HCS12 Assembly Language Chapter 2 HCS12 Assembly Language ECE 3120 Dr. Mohamed Mahmoud http://iweb.tntech.edu/mmahmoud/ mmahmoud@tntech.edu Outline 2.1 Assembly language program structure 2.2 Data transfer instructions 2.3 Arithmetic

More information

Concept of Memory. The memory of computer is broadly categories into two categories:

Concept of Memory. The memory of computer is broadly categories into two categories: Concept of Memory We have already mentioned that digital computer works on stored programmed concept introduced by Von Neumann. We use memory to store the information, which includes both program and data.

More information

MICROPROCESSOR MCQs. 1) What does the microprocessor comprise of? a. Register section b. One or more ALU c. Control unit d.

MICROPROCESSOR MCQs. 1) What does the microprocessor comprise of? a. Register section b. One or more ALU c. Control unit d. 1) What does the microprocessor comprise of? a. Register section b. One or more ALU c. Control unit 2) What is stored by a register? a. data b. operands c. memory MICROPROCESSOR MCQs 3) Accumulator based

More information

THE MICROCOMPUTER SYSTEM CHAPTER - 2

THE MICROCOMPUTER SYSTEM CHAPTER - 2 THE MICROCOMPUTER SYSTEM CHAPTER - 2 20 2.1 GENERAL ASPECTS The first computer was developed using vacuum tubes. The computers thus developed were clumsy and dissipating more power. After the invention

More information

UNIT-II. Part-2: CENTRAL PROCESSING UNIT

UNIT-II. Part-2: CENTRAL PROCESSING UNIT Page1 UNIT-II Part-2: CENTRAL PROCESSING UNIT Stack Organization Instruction Formats Addressing Modes Data Transfer And Manipulation Program Control Reduced Instruction Set Computer (RISC) Introduction:

More information

EE4390 Microprocessors

EE4390 Microprocessors EE4390 Microprocessors Lesson 6,7 Instruction Set, Branch Instructions, Assembler Directives Revised: Aug 1, 2003 1 68HC12 Instruction Set An instruction set is defined as a set of instructions that a

More information

Intel 8086 MICROPROCESSOR. By Y V S Murthy

Intel 8086 MICROPROCESSOR. By Y V S Murthy Intel 8086 MICROPROCESSOR By Y V S Murthy 1 Features It is a 16-bit μp. 8086 has a 20 bit address bus can access up to 2 20 memory locations (1 MB). It can support up to 64K I/O ports. It provides 14,

More information

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram: The CPU and Memory How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram: 1 Registers A register is a permanent storage location within

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

What is an Addressing Mode?

What is an Addressing Mode? Addressing Modes 1 2 What is an Addressing Mode? An addressing mode is a way in which an operand is specified in an instruction. There are different ways in which an operand may be specified in an instruction.

More information

Intel 8086 MICROPROCESSOR ARCHITECTURE

Intel 8086 MICROPROCESSOR ARCHITECTURE Intel 8086 MICROPROCESSOR ARCHITECTURE 1 Features It is a 16-bit μp. 8086 has a 20 bit address bus can access up to 2 20 memory locations (1 MB). It can support up to 64K I/O ports. It provides 14, 16

More information

ELEG3923 Microprocessor Ch.0 & Ch.1 Introduction to Microcontroller

ELEG3923 Microprocessor Ch.0 & Ch.1 Introduction to Microcontroller Department of Electrical Engineering University of Arkansas ELEG3923 Microprocessor Ch. & Ch. Introduction to Microcontroller Dr. Jingxian Wu wuj@uark.edu OUTLINE 2 What is microcontroller? (Ch..) 85 Microcontroller

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

CPU12 REFERENCE MANUAL

CPU12 REFERENCE MANUAL CPU12 REFERENCE MANUAL Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding the suitability of its

More information

ELCT 912: Advanced Embedded Systems

ELCT 912: Advanced Embedded Systems Advanced Embedded Systems Lecture 2: Memory and Programmable Logic Dr. Mohamed Abd El Ghany, Memory Random Access Memory (RAM) Can be read and written Static Random Access Memory (SRAM) Data stored so

More information

Lecture 9 Subroutines

Lecture 9 Subroutines CPE 390: Microprocessor Systems Spring 2018 Lecture 9 Subroutines Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030 Adapted from HCS12/9S12

More information

Computer Memory. Textbook: Chapter 1

Computer Memory. Textbook: Chapter 1 Computer Memory Textbook: Chapter 1 ARM Cortex-M4 User Guide (Section 2.2 Memory Model) STM32F4xx Technical Reference Manual: Chapter 2 Memory and Bus Architecture Chapter 3 Flash Memory Chapter 36 Flexible

More information

Computer Organization

Computer Organization Chapter 5 Computer Organization Figure 5-1 Computer hardware :: Review Figure 5-2 CPU :: Review CPU:: Review Registers are fast stand-alone storage locations that hold data temporarily Data Registers Instructional

More information

Lecture #3 Microcontroller Instruction Set Embedded System Engineering Philip Koopman Wednesday, 20-Jan-2015

Lecture #3 Microcontroller Instruction Set Embedded System Engineering Philip Koopman Wednesday, 20-Jan-2015 Lecture #3 Microcontroller Instruction Set 18-348 Embedded System Engineering Philip Koopman Wednesday, 20-Jan-2015 Electrical& Computer ENGINEERING Copyright 2006-2015, Philip Koopman, All Rights Reserved

More information

Question Bank Part-A UNIT I- THE 8086 MICROPROCESSOR 1. What is microprocessor? A microprocessor is a multipurpose, programmable, clock-driven, register-based electronic device that reads binary information

More information

Chapter 4 Main Memory

Chapter 4 Main Memory Chapter 4 Main Memory Course Outcome (CO) - CO2 Describe the architecture and organization of computer systems Program Outcome (PO) PO1 Apply knowledge of mathematics, science and engineering fundamentals

More information

Memory Overview. Overview - Memory Types 2/17/16. Curtis Nelson Walla Walla University

Memory Overview. Overview - Memory Types 2/17/16. Curtis Nelson Walla Walla University Memory Overview Curtis Nelson Walla Walla University Overview - Memory Types n n n Magnetic tape (used primarily for long term archive) Magnetic disk n Hard disk (File, Directory, Folder) n Floppy disks

More information

Programming the Motorola MC68HC11 Microcontroller

Programming the Motorola MC68HC11 Microcontroller Programming the Motorola MC68HC11 Microcontroller COMMON PROGRAM INSTRUCTIONS WITH EXAMPLES aba Add register B to register A Similar commands are abx aby aba add the value in register B to the value in

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

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

Designing Computers. The Von Neumann Architecture. The Von Neumann Architecture. The Von Neumann Architecture

Designing Computers. The Von Neumann Architecture. The Von Neumann Architecture. The Von Neumann Architecture Chapter 5.1-5.2 Designing Computers All computers more or less based on the same basic design, the Von Neumann Architecture! Von Neumann Architecture CMPUT101 Introduction to Computing (c) Yngvi Bjornsson

More information

The Von Neumann Architecture. Designing Computers. The Von Neumann Architecture. CMPUT101 Introduction to Computing - Spring 2001

The Von Neumann Architecture. Designing Computers. The Von Neumann Architecture. CMPUT101 Introduction to Computing - Spring 2001 The Von Neumann Architecture Chapter 5.1-5.2 Von Neumann Architecture Designing Computers All computers more or less based on the same basic design, the Von Neumann Architecture! CMPUT101 Introduction

More information

3 Computer Architecture and Assembly Language

3 Computer Architecture and Assembly Language 3 Computer Architecture and Assembly Language 3.1 Overview of the Organization of a Computer System All general-purpose computers require the following hardware components: Main memory: enables a computer

More information

CS/ECE 5780/6780: Embedded System Design

CS/ECE 5780/6780: Embedded System Design CS/ECE 5780/6780: Embedded System Design John Regehr Lecture 2: 68HC12 Architecture & Lab 1 Introduction Duff s Device void foo (int x, int *y, int *z) { switch (x % 8) { case 0: do { *y++ = *z++; case

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

Chapter 4: Advanced Assembly Programming. EE383: Introduction to Embedded Systems University of Kentucky. Samir Rawashdeh

Chapter 4: Advanced Assembly Programming. EE383: Introduction to Embedded Systems University of Kentucky. Samir Rawashdeh Chapter 4: Advanced Assembly Programming EE383: Introduction to Embedded Systems University of Kentucky Samir Rawashdeh With slides based on material by H Huang Delmar Cengage Learning Chapter Summery

More information