1 / 14

Introduction to Computing Chapter 0

Introduction to Computing Chapter 0. The AVR microcontroller and embedded systems using assembly and c. Connecting I/Os to CPU. Mouse. Keyboard. Network. Graphic Card. Sound Card. CPU should have lots of pins!. CPU. Connecting I/Os to CPU using bus. CPU. Address bus. Data bus.

geona
Télécharger la présentation

Introduction to Computing Chapter 0

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to ComputingChapter 0 The AVR microcontroller and embedded systems using assembly and c

  2. Connecting I/Os to CPU Mouse Keyboard Network Graphic Card Sound Card • CPU should have lots of pins! CPU

  3. Connecting I/Os to CPU using bus CPU Address bus Data bus Write Control bus Read I/O 1 I/O n I/O 0 I/O 2

  4. Connecting I/Os and Memory to CPU CPU Address bus Data bus Write Control bus Read I/O 1 I/O n I/O 0 I/O 2

  5. Connecting I/Os and memory to CPU using bus How could we manage it? 0 1 2 3 0 CPU Address bus Data bus Write Control bus Read I/O 1 I/O n I/O 0 I/O 2

  6. Connecting I/Os and Memory to CPU using bus (Peripheral I/O) 0 1 .. 63 CPU Address bus Data bus Write Read Control bus IO/MEM I/O 1 I/O n I/O 0 I/O 2

  7. Connecting I/Os and Memory to CPU using bus (Memory Mapped I/O) How could we make the logic circuit? Solution 1. Write the address range in binary a7 a6 a5 a3 a4 a2 a1 a0 a4 From address 0  0 0 0 0 0 0 0 0 a5 CS a6 To address15  0 0 0 0 1 1 1 1 a7 The logic circuit enables CS when address is between 0 and 15 0 1 .. 15 Logic circuit CPU Address bus Data bus Write Control bus Read 2. Separate the fixed part of address 3. Using a NAND, design a logic circuit whose output activates when the fixed address is given to it. I/O 17 I/O n I/O 16 I/O 18

  8. Another example for address decoder a8 a9 CS a10 a11 Solution 1. Write the address range in binary a7 a6 a5 a3 a10 a9 a8 a11 a4 a2 a1 a0 From address 300H  0 0 1 1 0 0 0 0 0 0 0 0 To address 3FFH  0 0 1 1 1 1 1 1 1 1 1 1 • Design an address decoder for address of 300H to 3FFH. 2. Separate the fixed part of address 3. Design the logic circuit. a11 a10 a9 a8 0 0 1 1 An easy way of designing

  9. Inside the CPU • PC (Program Counter) • Instruction decoder • ALU (Arithmetic Logic Unit) • Registers CPU ALU PC A B C D Instruction decoder registers

  10. How computers work A B C D registers A [17] B  A A  [6] AA+B [7]A 31h C4h 26h 81h EAh 0h 5h 31 0 1 2 3 4 5 6 7 CPU Logic circuit Address bus Data bus Write Control bus Read ALU PC: 1 0 0 I/O 17 I/O n I/O 16 I/O 18 Inst. Dec.

  11. How computers work A B C D registers A [17] B  A A  [6] AA+B [7]A 31h C4h 26h 81h EAh 0h 5h 0 1 2 3 4 5 6 7 CPU 17 Logic circuit Address bus Data bus Write Control bus Read ALU PC: 9 1 I/O 17 I/O n I/O 16 I/O 18 Inst. Dec. 31

  12. How computers work A B C D registers A [17] B  A A  [6] AA+B [7]A 31h C4h 26h 81h EAh 0h 5h 0 1 2 3 4 5 6 7 C4 26 5 CPU 17 Logic circuit 6 Address bus Data bus Write Control bus Read 9 9 ALU PC: 1 2 2 1 3 I/O 17 I/O n I/O 16 I/O 18 Inst. Dec.

  13. How computers work A B C D registers A [17] B  A A  [6] AA+B [7]A 31h C4h 26h 81h EAh 0h 5h 0 1 2 3 4 5 6 7 81 EA CPU 7 Logic circuit Address bus Eh Data bus Write Control bus Read E 5 5 ALU + E 9 9 PC: 4 4 3 3 5 I/O 17 I/O n I/O 16 I/O 18 Inst. Dec.

  14. How Instruction decoder works Opcode Operand Operand Opcode Instruction Instruction A [17] B  A A  [6] AA+B [7]A 0011 0001 1100 0100 0010 0110 1000 0001 1110 1010 0000 0000 0000 0101 31h C4h 26h 81h EAh 0h 5h 0 1 2 3 4 5 6 7

More Related