e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Introduction to Computing Module No: CS/ES/1 Quadrant 1 e-text

Similar documents
Dec Hex Bin ORG ; ZERO. Introduction To Computing

CC411: Introduction To Microprocessors

Microprocessors I MICROCOMPUTERS AND MICROPROCESSORS

Von Neumann Architecture

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

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

MECE336 Microprocessors I

Microcontrollers. Fig. 1 gives a comparison of a microprocessor system and a microcontroller system.

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

Digital Logic Design Exercises. Assignment 1

e-pg Pathshala Subject: Computer Science Paper: Embedded System Module: Interfacing External Devices using Embedded C Module No: CS/ES/22

User. Application program. Interfaces. Operating system. Hardware

Register Transfer and Micro-operations

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text

Microcomputer Architecture and Programming

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Serial Port Communication Module No: CS/ES/11 Quadrant 1 e-text

THE MICROCOMPUTER SYSTEM CHAPTER - 2

COSC 122 Computer Fluency. Computer Organization. Dr. Ramon Lawrence University of British Columbia Okanagan

Chapter 2 Logic Gates and Introduction to Computer Architecture

ECE 341 Midterm Exam

Systems Programming. Lecture 2 Review of Computer Architecture I

Computer Organization and Assembly Language (CS-506)

ETGG1801 Game Programming Foundations I Andrew Holbrook Fall Lecture 0 - Introduction to Computers 1

Segment 1A. Introduction to Microcomputer and Microprocessor


Microcontroller & Interfacing

SIR C.R.REDDY COLLEGE OF ENGINEERING, ELURU DEPARTMENT OF INFORMATION TECHNOLOGY LESSON PLAN

Information Science 1

3.1 Description of Microprocessor. 3.2 History of Microprocessor

Computer Architecture and Organization:

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

Microprocessors/Microcontrollers

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS

Basic Processing Unit: Some Fundamental Concepts, Execution of a. Complete Instruction, Multiple Bus Organization, Hard-wired Control,

Logic design Ibn Al Haitham collage /Computer science Eng. Sameer

Components of a personal computer

EE292: Fundamentals of ECE

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud.

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

CS/EE 260. Digital Computers Organization and Logical Design

Arithmetic Circuits. Design of Digital Circuits 2014 Srdjan Capkun Frank K. Gürkaynak.

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

Introduction to Computer Science. Homework 1

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

EE 3170 Microcontroller Applications

1. Draw general diagram of computer showing different logical components (3)

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Microcontrollers and Embedded Processors Module No: CS/ES/2 Quadrant 1 e-text

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

Computer Architecture: Part III. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

Microprocessor. Dr. Rabie A. Ramadan. Al-Azhar University Lecture 1

Computer Architecture: Part V. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

Chapter 1 : Introduction

UPY14602-DIGITAL ELECTRONICS AND MICROPROCESSORS Lesson Plan

Computer Architecture Programming the Basic Computer

Digital Fundamentals

D I G I T A L C I R C U I T S E E

Digital Design with FPGAs. By Neeraj Kulkarni

Microcontroller Systems

ACADEMIC YEAR PLANNING - F.Y.J.C. ( ) F.Y.J.C. COMPUTER SCIENCE (Theory)

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

STRUCTURE OF DESKTOP COMPUTERS

IB Computer Science Topic.2-

Microcomputers. Outline. Number Systems and Digital Logic Review

Problem Set 1 Solutions

TNBEDCSVIP.IN. S.No CONTEND Page No 1. NUMBER SYSTEM AND BASE CONVERSIONS TYPES OF NUMBER SYSTEM 1. Binary Number System:

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

COSC 243. Computer Architecture 1. COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1

LOGIC DESIGN. Dr. Mahmoud Abo_elfetouh

Computer Organization

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Programming Embedded Systems in C Module No: CS/ES/9 Quadrant 1 e-text

2. (a) Compare the characteristics of a floppy disk and a hard disk. (b) Discuss in detail memory interleaving. [8+7]

History of Computing. Ahmed Sallam 11/28/2014 1

Fundamentals of Programming (C)

COMPUTER SYSTEM. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U

1. Fundamental Concepts

6. Binary and Hexadecimal

Digital System Design Using Verilog. - Processing Unit Design

Computer Organisation CS303

SARDAR RAJA COLLEGES SARDAR RAJA COLLEGE OF ENGINEERING ALANGULAM

PART A (22 Marks) 2. a) Briefly write about r's complement and (r-1)'s complement. [8] b) Explain any two ways of adding decimal numbers.

Binary Adders. Ripple-Carry Adder

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

Computer Organization (Autonomous)

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 01, SPRING 2013

DC57 COMPUTER ORGANIZATION JUNE 2013

Computer Systems. Binary Representation. Binary Representation. Logical Computation: Boolean Algebra

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Week 1. Introduction to Microcomputers and Microprocessors, Computer Codes, Programming, and Operating Systems

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

Bachelor of Computer Application DIGITAL TECHNIQUES. Block-1

Henry Lin, Department of Electrical and Computer Engineering, California State University, Bakersfield Lecture 7 (Digital Logic) July 24 th, 2012

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

Chapter 2 Data Manipulation

Introduction to Computers - Chapter 4

Microprocessor (COM 9323)

1. Internal Architecture of 8085 Microprocessor

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

Scheme G. Sample Test Paper-I

Transcription:

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Introduction to Computing Module No: CS/ES/1 Quadrant 1 e-text About the course : In this digital world, embedded systems are more important in day to day life. Embedded processors are even more important as key components of embedded products ranging from toys to aeroplane. Cell phone is the most important embedded device ruling our lives. So It is necessary to understand the basics behind the embedded systems. In this course basics about micro controllers, how to program them and how to make embedded products will be discussed. Learning Outcomes : To understand the hardware and software of embedded systems one must know basic concepts of digital computer design. In this lecture fundamentals of numbering system, logic gates, digital circuits, basic system architecture and working of computer will be discussed. 1.1 System You will mostly be familiar with all this - this is just a quick recap! A system is defined as a way of working, organizing or performing one or many tasks according to a fixed set of rules programs or plans (or) as an arrangement in which all units assemble and work together according to a program or plan. On the other hand, an embedded system is a system that has software embedded into computer hardware, which makes a system dedicated for an application or specific part of an application or a product, or part of a larger system. 1.2 Digital fundamentals All digital computing systems work with binary values (bits). Generation of binary values and working with bits are important in computing systems. The common number system we use is the Decimal number system(base 10 system). There are 10 distinct symbols, 0, 1, 2,,9 whereas computers use binary numbers (base 2 system).there are only two symbols 0 and 1. These two binary digits are commonly referred to as bits. Each decimal number has to be converted into binary for processing. The following are the steps to convert from decimal to binary number system, and vice-versa. 1.2.1 Steps for Decimal to Binary conversion Divide the decimal number by 2 repeatedly

Keep track of the remainders Continue this process until the quotient becomes zero Write the remainders in reverse order to obtain the binary number Example 25 10 = 11001 2 Quotient Reminder 25/2 = 12 1 12/2 = 6 0 6/2 = 3 0 3/2 = 1 1 ½ = 0 1 1.2.2 Steps for Binary to Decimal conversion Know the weight of each bit in a binary number according to its position Multiply each bit by its weight Add them together to get the decimal equivalent Example 11001 2 = 1*2 0 + 0*2 1 + 0*2 2 + 1*2 3 + 1*2 4 = 25 10 Another number system generally used for compact representation is the Hexadecimal System ( base 16 system) (Fig 1.1). It is used as a convenient representation of binary numbers. Figure 1.1 Hexadecimal system 1.2.3 Steps for Binary to Hexadecimal Conversion In the binary number system, group the binary digits, 4 bits at a time, starting from the right side (least significant bit)

Replace each 4-bit binary number with its hex equivalent (Fig 1.2). 1.2.4 Logic gates Figure 1.2 Binary to Hexadecimal conversion To process these binary values logic gates - AND, OR, NOT, XOR, NAND and NOR are widely used (Fig 1.3-1.5). Figure 1.3 Logic gates-and,or In an AND gate, the output variable is true (1) only when both the input variables A and B are true(1). It acts like a multiplier. In an OR gate, the output variable is true(1) when any one of the input variables is true(1). It acts like an adder.

Figure 1.4 Logic gates-not,xor In an inverter (NOT gate), the output variable is true(1) when the input variable is false(0), and the output is false(0) when the input variable is true(1). It inverts the logic sense of the binary variable. It is used in subtraction operation. In an XOR gate, the output is true(1) when any one of the inputs is true(1). It is used for comparison (Fig 1.4). Figure 1.5 Universal gates NAND and NOR gates (Fig 1.5) are the compliment of the AND and OR gates respectively. NAND and NOR gates are universal gates because using these gates we can generate any logic function. So these gates are used extensively.

Using the above set of gates any kind of digital operations can be done with digital circuits. The following is the example for adding two bits which is the half adder circuit using an XOR and an AND gate(fig 1.6). Figure 1.6 Half- adder circuit Flip-flops are frequently used to store data. There are many types of flip-flops - D, RS, JK etc. A clocked D flip-flop is shown in Fig 1.7. 2. Computer Hardware Figure 1.7 Clocked D flip-flop A computer hardware is made with these kind of digital circuits (Fig 2.1). A computer system has a CPU (Central Processing Unit) which executes instructions stored in memory, I/O (Input/output) devices which provide a means of communicating with CPU and Memory to store data and programs. There are different kinds of memory. They are:

RAM (Random Access Memory) It is a temporary storage of programs when the computer is running. The data is lost when the computer is off. ROM (Read Only Memory) It contains programs and information essential for the operation of the computer. This information cannot be changed by use, and is not lost when power is off. It is called as nonvolatile memory. Figure 2.1 Computer Hardware The internal working can be broken down into three parts namely CPU, memory and I/O devices. The function of the CPU is to execute instructions stored in memory. The function of I/O devices such as keyboard and video monitor is to provide a means of communicating with the CPU. The CPU is connected to memory and I/O through strips of wires called a bus. It carries information from place to place. Based on the usage/purpose of communication, these are named as Address bus/data bus/control bus. Address bus will communicate the address for memory locations. It is unidirectional and is used to identify the devices and memory connected to CPU - the more address lines available, the larger the number of devices that can be addressed. It determines the number of locations with which it can communicate. The number of locations is always equal to 2 x where x is the number of address lines, regardless of the size of the data bus. For example, a CPU with 16 address lines can provide a total of 65,536 or 64k bytes of addressable memory. The grouping of data lines is called data bus. It is bidirectional, since the CPU must use it either to receive or to send data. The size of data bus in CPUs normally varies between 8 and 64. Early computers such as Apple 2 use an 8 bit data bus while super-computers such as Cray use a 64 bit bus. Control bus will send control signals. 2.1 Inside CPUs

Figure 2.2 CPU A program stored in memory provides instruction to the CPU to perform an action (Fig 2.2). The action can simply be adding data such as payroll data, or controlling a machine as a robot. It is the function of CPU to fetch these instruction from memory and execute them. To perform the actions of fetch and execute, all CPUs are equipped with resources as explained below. 1. The CPU uses registers to store the information temporarily. The information could be two values to be processed or the address of the value needed to be fetched from memory. Depending on the CPU, registers can be 8-bits, 32-bits or even 64-bits wide. The more and bigger the registers, the better the CPU. The disadvantage of bigger registers is that it will increase the cost of that CPU. 2. The CPU has ALU (Arithmetic/Logic Unit). The ALU is used for performing arithmetic functions such as addition, subtraction, multiplication, division and logic functions such as AND, OR and NOT. 3. Every CPU has a Program Counter. The function of the Program Counter(PC) is to point to the address of the next instruction that is to be executed. As each instruction is executed, the program counter is incremented to the address of the next instruction that is to be executed. 4. The function of the instruction decoder is to interpret the instructions fetched into the CPU. The complexity of the instruction decoder depends on the type and number of instructions supported. A CPU requires more hardware (transistors in design) for understanding a large number of instructions. Hence, there is a trend towards keeping the number of instructions limited (Reduced Instruction Set Computers - RISC). In the example shown in Fig. 2.2, the CPU has registers called A, B, C and D. It has an 8-bit data bus and a 16 bit address bus. Hence the CPU can access memory from address 0000 to FFFFH. Thus, the hardware architecture gives complete inner details of the system. This hardware(system) is used for processing data in association with the software. 3. Summary

In this module, different definitions of system and embedded system have been outlined. Fundamentals of computing, digital processing and different number systems are discussed. Logic circuits for digital design is also discussed. An introduction to System architecture has been given. 4. References 1. The 8051 Microcontroller and Embedded Systems Using Assembly and C Second Edition Muhammad Ali Mazidi, Janice Gillispie Mazidi and Rolin D. McKinlay. Pearson, 2nd edition 2007. 2. Digital design, 5th edition by M. Morris Mano and Michael, PHI.