MICROPROCESSOR INTERFACING AND COMPUTER HARDWARE 1.Microprocessors And Interfacing An overview of 8085, Architecture of 8086, Microprocessor, Special functions of general purpose registers, 8086 flag register and function of 8086 flags.Addressing modes of 8086, Instruction set of 8086, Assembler directives simple programs, Procedures, and Macros.Assembly language programs involving logical, Branch and Call instructions, Sorting, Evaluation of arithmetic expressions, String manipulation.Pin diagram of 8086Minimum mode and maximum mode of operation, Timing diagram, Memory interfacing to 8086 (Static RAM and EPROM), Need for DMA, DMA data transfer method, Interfacing with 8237/8257.8255 PPI-Various modes of operation and interfacing to 8086, Interfacing keyboard, Displays, Stepper motor and actuators, D/A and A/D converter interfacing.Interrupt structure of 8086, Vector interrupt table, Interrupt service routines, Introduction to DOS and BIOS interrupts, 8259 PIC architecture and interfacing cascading of interrupt controller and its importance.Serial data transfer schemes, Asynchronous and synchronous data transfer schemes, 8251 USART architecture and interfacing, TTL to RS 232C and RS232C to TTL conversion, Sample program of serial data transfer, Introduction to High-speed serial communications standards, USB.8051 Microcontroller architecture, Register set of 8051, Modes of timer operation, Serial port operation, Interrupt structure of 8051, Memory and I/O interfacing 8051. 2.SALIENT FEATURES OF THIS EDITION In response to feedback from a variety of electronics instructors and from the industry, the revised second edition of Microprocessors and Interfacing: Programming and Hardware contains the following salient features. 1. Focused coverage of 8086 microprocessor. 2. Examples of programs with C and assembly language modules. 3. Interfacing illustrated via real life systems. 4. Introduction to Neural Networks and Fuzzy Logic. 5. Inclusion of a new chapter on Pentium Processors. 6. Focused discussion on Software Keyboard Interfacing. 7. Multimedia Technologies: MMX, SSE, SSE2 and SSE3 are also discussed. SPECIAL FEATURES AND SUPPLEMENTS This book contains many hardware and software exercises students can do to solidify their knowledge of microprocessors. A dedicated website now supports the book. This website contains the Instructor’s Manual and Experiments Manual for instructors and students. The Experiments Manual contains 40 laboratory exercises that are directly coordinated to the text. Each experiment includes chapter references, required equipment, objectives, and experimental procedures. An IBM PC or IBM PCcompatible computer can be used to edit, assemble, link/locate, run, and debug many of the 8086 assembly language programs. The Instructor’s Manual contains answers to the review questions. It also includes experimental notes and answers to selected questions for the Experiments Manual. 3.ADDITIONAL GOALS OF MICROPROCESSORS One of the main goals of this book is to teach you how to decipher manufacturers’ data sheets for microprocessor and peripheral devices, so the book contains relevant parts of many data sheets. Because of the large number of devices discussed, however, it was not possible to include complete data sheets. If you are doing an in-depth study, it is suggested that you acquire or gain access to the latest editions of Intel Microprocessors and Peripherals handbooks. These are available free of charge to colleges and universities from the Academic Relations Department of Intel. The bibliography at the end of the book contains a list of other books and periodicals you can refer to for further details on the topics discussed in the book. If you have suggestions for improving the book or ideas that might clarify a point for someone else, please communicate with me through the publisher. My experience as an engineer and as a teacher indicates that it is much more productive to first learn one microprocessor family very thoroughly and from that strong base learn others as needed. For this book I chose the Intel 8086/80186/80286/80386/80486 and Pentium family of microprocessors. Devices in this family are used in millions and millions of personal computers, including the IBM PC/AT, the IBM PS/2 models, and many “clones.” The 8086 was the first member of this family, and although it has been superseded by newer processors, the 8086 is still an excellent entry point for learning about microprocessors. You don’t need to know about the advanced features of the newer processors until you learn about multiuser/multitasking systems. Therefore, the 8086 is used for most of the hardware and programming examples until Chapter 15, which discusses the features of the higher processors and how these features are used in multiuser/multitasking systems. Chapter 16 further discusses Pentium Processors and their architecture. 20 MARKS 1. Microprocessors and Interfacing A microprocessor (abbreviated µP) is a digital electronic component with miniaturized transistors on a single semiconductor integrated circuit (IC). One or more microprocessors typically serve as a central processing unit (CPU) in a computer system or handheld device. Microprocessors have drastically evolved through the past few years. Computing has, hence never remained the same. From their humble beginnings as the drivers for calculators, the continued increase in power has led to the dominance of microprocessors over every other form of computer; every system from the largest mainframes to the smallest handheld computers now uses a microprocessor at its core. A trusted name in the world of microprocessors, Douglas V Hall has been almost synonymous with effectively teaching microprocessors. The content-organization of the book, Hall: Microprocessors and Interfacing, Revised 2nd Edition, reflects the way microprocessor 8086 is taught. 8086 is still the best starting point for learning about microprocessors. Hence the discourse is mainly based on 8086. Advanced features of newer processors are also discussed toward the end of the book. The inclusion of Pentium Processors and their architecture completes the experience. This Online Learning Center is designed to enhance your learning experience. It provides a broad array of resources that will benefit both the instructors and students. Visit the Information Center to unravel the book's features. The Student’s Center contains Experiments in Microprocessors. This will give you the flavor of the published book. The Instructor’s Center provides instructors with Instructor Guide for Microprocessors. This part of the site is password protected and will be available only to the instructors who adopt the book. If you are an adopter and require a password, contact your Tata McGraw-Hill representative or send a request from this Web site. This site will evolve over time and we would be able to provide you with a wide range of resources that are currently under development. An introduction to programmer model of computer organisation using assembly and machine language. Process of translation from high level language to machine instructions. Number representation, computer arithmetic, instruction sets, I/O interfacing, I/O interrupts, and programming interrupts. Laboratory exercises involve detailed study and interfacing of an ARM based microprocessor hardware and software system. Read the Course Description for an handbook description of the of the course. 2. Recommended Learning Material: ELEC2041 Laboratory Exercise Documentation Reader: Available from the EE office for $10 . This reader contains the documentation for all the Laboratory Exercises and the user manual for all the tools used in the Digital Systems Laboratory. Electronic copies of all documentation on Laboratory Exercises and the user manual for the tools are available on-line from Laboratory . The electronic copies of these documents are included in the Companion CD-ROM as well. ELEC2041 Companion CD ROM: Available from the EE office for $5. This contains everything you need to use the DSLMU Microcontroller Board in the Digital Systems Laboratory. This CD-ROM is a valuable resource and reference material for this course as well as for your future work. If you plan to, partially, work from home you would need to install the software included on this CD-ROM. You will need access to a computer that, preferably, runs both Linux and Microsoft Windows. The CD-ROM contains: Information specific to the Digital Systems Laboratory including all the documentation on the Laboratory Exercises. GNU Cross Compiler Tools for the ARM Processor Xilinx FPGA Tools for DSLMU on-board FPGAs Example programming files and templates Reference material for the ARM microcontroller Information about the DSLMU Microcontroller Board hardware including all data sheets Various useful utility programs A mirror image of the CD-ROM is available on-line. It is highly recommended that you buy both printed Laboratory Reader as well as the CD-ROM. Steve Furber: ARM System On-Chip; 2nd Ed, Addison-Wesley, 2000, ISBN: 0201-67519-6. We use chapters 2, 3, 5, 6, 8 and 10. Further Text(s) and Reference(s): Brian Kernighan & Dennis Ritchie: The C Programming Language, 2nd Ed., Prentice Hall, 1988, ISBN: 0-13-110362-8 David Patterson and John Hennessy: Computer Organisation & Design: The HW/SW Interface," 2nd Ed Morgan Kaufmann, 1998, ISBN: 1 - 55860 - 491 - X. James Goodman, Karen Miller: A Programmer's View of Computer Architecture: With Assembly Language Examples from the MIPS RISC Architecture, HBJ College & School Division, 1993, ISBN: 0195131096. Waldron, John: Introduction to RISC Assembly Language, Addison-Wesley Publishing, 1999, ISBN: 0201398281. Nick Parlante: Stanford CS Education Library; A Collection of very useful material including: Binky Pointer Video: Silly but memorable 3 minute animated video demonstrating the basic structure, techniques, and pitfalls of using pointers. Pointer Basics: The companion text for the Binky video. Pointers and Memory: A 31 page explanation of everything you ever wanted to know about pointers and memory. Linked List Basics: A 26 page introduction to the techniques and code for building linked lists in C. Nick Parlante: Essential C: A relatively quick, 45 page discussion of most of the practical aspects of programming in C. Marshall, David: Programming in C UNIX System Calls and Subroutines using C; An on-line learning tool for C and UNIX Cohen, D: On Holy Wars and a Plea for Peace ; A very amusing article about the machine Endianness. Laboratory Exercises Laboratory Exercises Format: There are five laboratory exercises planned for this course. They cover various topical areas covered in the lectures. The laboratory exercises are designed to tightly integrate with the lecture material. Therefore, we have written the laboratory documentation in such a way to serve as lecture notes, tutorial exercises as well as practical work. You can only complete the exercises in the due time if you spend enough time to prepare for them. You must read through the exercises before coming to the laboratory, and try to write any code you have to and possibly simulate you programs at home. You should finish each laboratory exercise during the certain number of weeks as given in Laboratory Schedule . If you think you are falling behind you need to take advantage of the special laboratory classes The Companion CD-ROM contains everything you need to work from home. Laboratory Exercises Schedule: For weekly schedule of the laboratory exercises see the Laboratory Exercises Page. Laboratory Conditions of Use: You may only use the Laboratory during your time tabled laboratory class, or during the special Open Access laboratory classes, when there are no time tabled laboratory class for anyone else. If you are not enrolled in ELEC2041, you are not permitted to be in the Laboratory at all. The reason for these rules is simple. A laboratory class is a class, like other classes such as lecture and tutorial. It involves bringing together a group of learners and a set of teaching resources (human and material) so that learning takes place. Learning is difficult enough as it is, without distractions such as other people occupying the classroom. So, during a laboratory class, we want only those involved in the laboratory class to be in the laboratory - it doesn't matter if some of the laboratory resources (e.g. equipment) are not actually in use at that time. (Would you feel justified in wandering into a random Tutorial Class to read your newspaper, on the grounds that there was an unoccupied chair at the back?) So that students can finish off any incomplete laboratory exercises, the laboratory is open for two special classes outside the time tabled laboratory classes. Students who do not conform to the rules will be suspended from classes, and thereby forfeit marks Please read this about the laboratory policy very carefully before coming to the first laboratory class. Laboratory Documentation Reader: The laboratory documentation are available on-line from the Laboratory Exercises Page. The printed version of the llaboratory documentation reader is available for purchase from the EE office. In addition to documentation for each exercise, The printed version of the reader includes the user manual for all the tools used in the laboratory. The laboratory documentation are, also, included in the Companion CD-ROM that you can buy from the EE office. The CD-ROM, however, would, additionally include all the technical data sheets of devices on DSLMU, and all of the software tools and a wealth of other useful information. It is highly recommended that you buy both printed laboratory documentation reader as well as the CD-ROM. Laboratory Sign up: In the Laboratory, you will almost certainly be working with a partner. You may choose your partner yourself before or at the start of Sign up Laboratory Class, after which time unmatched students will be randomly paired up. In the Sign up Class you will be assigned your group Linux account. You cannot work in the laboratory if you do not have a group account. You are expected to keep the same partner in the laboratory for the whole semester. Only in exceptional circumstances will you be allowed to work on your own during formal laboratory classes, or to obtain a "divorcee"' from your partner. You can, of course, use the special laboratory classes to work alone, if you wish, provided there are spare workstations. At no time will groups of three or more be allowed to work together in the Laboratory. Laboratory Development Tools and Equipment: In the Laboratory, you will be working at one of 24 identical workstations, each of which contain one computer with Linux platform for "software development" and "debugging", a "target" DSLMU board consisting of two printed circuit boards; MU Board and its expansion Board. The DSLMU board is state-of-the-art development board. It has been designed with a view of the microprocessor based design and interfacing for 21st century. The DSLMU contains an ARM based processor, two Xilinx FPGA for extended interfacing and building additional coprocessors, an Ethernet chip, and various others accessories. Laboratory exercises involve developing software to control various peripheral on DSLMU board. To help you with your hardware development, electrical test equipment (i.e. an oscilloscope) is available at each workstation Microprocessor based development involves both the Linux platform on PC and the target DSLMU target board. You will create, edit, document, your code using the Linux edit utilities. You will translate your code to machine code for the target DSLMU board by using the GNU tools to compile, assemble, and link to generate machine code for ARM processors. Next you will use Komodo environment to download the machine code to the target DSLMU machine. The built-in Komodo emulator and debugging program on the target board enables the execution and debugging of down-loaded programs. Preparation for Laboratory Exercises: It will be necessary for you to use 3.5 inch, Double-sided, High-Density (2HD) floppy disks for storing your user programs as you create them, as well as between one laboratory class and the next. It is up to you to maintain a sensible backup policy, including making sure that BOTH partners have up-to-date floppy disk files. (There is NO central backup facility). You are warned and advised to read the laboratory exercise documentation before coming to the laboratory and do all the pre-labs as advised. Prepare your programs and simulate them outside the laboratory and then bring them to the laboratory on a floppy disk. Please be warned if you DO NOT prepare and go through the laboratory exercises documentation in a careful way before coming to the laboratory there would be no way in the world for you to finish the laboratory exercises in the time allocated. Laboratory Exercise Assessment: In each laboratory class there are two demonstrators who assist you with your laboratory work. In addition in each laboratory class there is an assessor who will sign off your checkpoints and mark you on the spot. Each laboratory exercise has a set of checkpoints. Assessor will sign off your checkpoints as you finish them. It is your responsibility to make sure that the checkpoints on you laboratory reader are signed off. Signatures will only be given in laboratory reader, not on separate sheets of paper. Your checkpoints will only be assessed and signed if you finish the laboratory exercise in the allocated number of weeks. If you think you are falling behind then try catching up by turning up for the special laboratory classes. You will be awarded a laboratory mark for this subject. It will constitute 20% of your final assessment. A portion of the mark will be proportional to the number of signatures that you accumulate. Satisfactory completion (50% of marks) of the laboratory component is a necessary requirement for a pass in this subject. 3.Financial Transactions & Retail The UCLA Internet Report: Surveying the Digital Future (2000) found that the privacy of personal data created barriers to online sales and that more than nine out of 10 internet users (were) somewhat or very concerned about credit card security.[3] Due to rapid advancements in online digital security, those concerns have been alleviated to a large extent. VeriSign, Inc. has emerged as the world’s trusted guarantor of ensuring that the entire infrastructure services of the internet are secure. Billions of times each day, its SSL (Secure Sockets Layer) as well as its successor TLS (Transport Layer Security), identity and authentication services, and domain name services allow companies and consumers all over the world to engage in trusted communications and commerce. Several versions of SSL and TLS are commonly used today in applications such as web browsing, e-mail, internet faxing, instant messaging, and VoIP (voice-over-IP). The credit card companies Visa and MasterCard cooperated to develop the secure EMV chip which is embedded in credit cards. Further developments include the Chip Authentication Program where banks give customers hand-held card readers to perform online secure transactions. The combination of improved internet security and improved credit card security has led to an explosion in online shopping. Other developments in this arena include the development of technology such as Instant Issuance which has enabled shopping mall kiosks acting on behalf of banks to issue on-the-spot credit cards to interested customers. Banks continue to make improvements to their digital security software in order to facilitate online banking. Susan Orr, in a recent interview in ABA Banking Journal, explains: “Because regulators have been insisting on better perimeter controls as well as controls on key infrastructure and application areas, like internet banking …, most banks have those systems protected fairly well. Most are also ‘virus savvy,’ and This article is basically an ad. Or rather, it is a company white paper promoting a particular company. I removed the link to the company. It needs to actually DEFINE "digital security" in its first sentence. are trying to catch up on other malware trends, such as blended threats (e.g. virus worms or Trojans with embedded html files).[4] Travel and Transportation The post 9/11 world has necessitated the rapid development of enhanced digital security for the traveling public in order to satisfy the enhanced entry requirements for more and more international border control agencies. Most modern passports are now ePassports, containing an embedded microchip that stores a digitized photograph and personal information such as name, gender, and date of birth. In addition, more and more countries are introducing facial recognition technology to reduce identity-related fraud. The introduction of the ePassport has assisted border officials in verifying the identity of the passport holder, thus allowing for quicker passenger processing. Plans are under way in several countries, including the US, the UK, and Australia to introduce SmartGate kiosks with both retina and fingerprint recognition technology.[5] Additionally, e-Drivers’ licenses are being developed using the same technology. For example, Mexico’s licensing authority (ICV) has used a smart card platform to issue the first e-Drivers’ licenses to the city of Monterrey, in the state of Nuevo León. The airline industry has witnessed the virtual demise of traditional paper tickets and the advent of more user-friendly electronic tickets (e-tickets). Their popularity has been made possible due to advances in online credit card transactions in partnership with the airlines. Long-distance bus companies are also switching over to e-ticketing transactions today. It will not be long before all tickets for any purpose will be in an electronic format. Shipping companies have adopted RFID (Radio Frequency Identification) technology as an efficient, digitally secure, tracking device. Unlike a barcode, RFID can be read up to 20 feet away, which makes this tracking method much more efficient and user-friendly. RFID has revolutionized well-known shipping companies like FedEx and UPS. Health care Today, all health-care providers and health insurance companies use the internet to provide enhanced products and services. More and more of these organizations are using the web to increase customer satisfaction, improve patient care, boost service revenues, and lower costs. Health care companies like Humana are leaders today in eHealth; Humana partners with WebMD, Oracle Corporation, EDS, Microsoft, and TriZetto to enable its members to take a stakeholder approach to their health care, as well as to provide an overview of a wider and wider range of health care plans.[6] Patient records are increasingly being placed on secure in-house networks, alleviating the need for extra storage space. Health care patients are more at ease with this electronic system precisely because their trust in digitally secure networks has increased. Secure Access The FBI, CIA, and Pentagon, are all leaders in utilizing secure controlled access technology for any of their buildings. However, the use of this form of technology is spreading into the entrepreneurial world. More and more companies are taking advantage of the development of digitally secure controlled access technology. GE's ACUVision, for example, offers a single panel platform for access control, alarm monitoring and digital recording.[7] New approaches offer the best of both worlds by combining network DVR capabilities with intelligent access control and alarm monitoring panel functionality into a single IP solution. Systems now combine digital video monitoring/recording/playback, access control and intrusion detection functionality in a single panel solution. With these integrated digital video recording and access control platforms, security officers can display live and stored video associated with alarm conditions and cardholder activity. Perhaps the most widely known digitally secure telecommunication device is the SIM (Subscriber Identity Module) card, a device that is embedded in most of the world’s cellular devices before any service can be obtained. The SIM card is just the beginning of this digitally secure environment. Recent developments in SCWS (Smart Card Web Servers) are pushing the boundaries of mobile technology.[2] Tests are being conducted in secure OTA (over-the-air) payment and credit card information from and to a mobile phone. The link between the bank doing the paying and the person’s mobile device needs to be secure. Combination SIM/DVD devices are being developed through Smart Video Card technology which embeds a DVD-compliant optical disc into the card body of a regular SIM card. Other telecommunication developments involving digital security include mobile signatures, which use the embedded SIM card to generate a legally binding electronic signature. This article is basically an ad. Or rather, it is a company white paper promoting a particular company. I removed the link to the company. It needs to actually DEFINE "digital security" in its first sentence. 4.X-ray computed tomography X-ray computed tomography, also computed tomography (CT scan) or computed axial tomography (CAT scan), is a medical imaging procedure which utilizes computer-processed Xrays to produce tomographic images or 'slices' of specific areas of the body. These crosssectional images are used for diagnostic and therapeutic purposes in various medical disciplines.[1] Digital geometry processing is used to generate a three-dimensional image of the inside of an object from a large series of two-dimensional X-ray images taken around a single axis of rotation.[2] CT produces a volume of data that can be manipulated, through a process known as "windowing", in order to demonstrate various bodily structures based on their ability to block the X-ray beam. Although historically the images generated were in the axial or transverse plane, perpendicular to the long axis of the body, modern scanners allow this volume of data to be reformatted in various planes or even as volumetric (3D) representations of structures. Although most common in medicine, CT is also used in other fields, such as nondestructive materials testing. Another example is archaeological uses such as imaging the contents of sarcophagi. Usage of CT has increased dramatically over the last two decades in many countries.[3] An estimated 72 million scans were performed in the United States in 2007.[4] It is estimated that 0.4% of current cancers in the United States are due to CTs performed in the past and that this may increase to as high as 1.5-2% with 2007 rates of CT usage;[5] however, this estimate is disputed.[6] Adverse effects [edit] Cancer The ionizing radiation in the form of x-rays used in CT scans are energetic enough to directly or indirectly damage DNA. This and other types of DNA damage are occasionally not corrected properly by cellular repair mechanisms. Such damage to the DNA occasionally lead to cancer. The estimates of harm from CT are partly based on similar radiation exposures experienced by those present during the atomic bomb explosions in Japan during the second world war and those of nuclear industry works.[5] There is a small increased risk of cancer with CT scans It is estimated that 0.4% of current cancers in the United States are due to CTs performed in the past and that this may increase to as high as 1.5-2% with 2007 rates of CT usage;[5] however, this estimate are disputed.[10] This would be equivalent to one in 1000 to one in 2000 increased risk of developing a fatal cancer per 10mSv CT scan.[11] Or 29,000 new cancer cases in the United States due to the number of scans done in 2007[12] and 2100 new cancers in the United Kingdom.[13] This additional risk is still low compared to the background risk of dying from cancer of ~20%.[14] The most common cancers caused by radiation exposure are thought to be lung cancer, breast cancer, thyroid cancer, stomach cancer and leukemia.[11] A person's age plays a significant role in the subsequent risk of cancer.[14] Estimated lifetime cancer mortality risks from an abdominal CT of a 1-year-old is 0.1% or 1:1000 scans.[14] The risk for someone who is 40 years old is half that of someone who is 20 years old with substantially less risk in the elderly.[14] The International Commission on Radiological Protection estimates that the risk to a fetus being exposure to 10 mGy increases the rate of cancer before 20 years of age from 0.03% to 0.04% (for reference a CT pulmonary angiogram exposes a fetus to 4 mGy).[13] A 2012 review did not find an association between medical radiation and cancer risk in children noting however the existence of limitations in the evidences over which the review is based.[15] CT scans can be performed with different settings for lower exposure in children with most manufacturers of CT scans as of 2007 having this function built in.[11] Furthermore, certain conditions can require children to be exposed to multiple CT scans.[5] Studies support informing parents of the risks of pediatric CT scanning.[16] [edit] Contrast In the United States half of CT scans involve radiocontrast agents.[17] The most common reactions from these agents are mild including: nausea, vomiting and an itching rash however more severe reactions may occur.[18] Overall reactions occur in between one and three percent with nonionic contrast and four and twelve percent of people with ionic contrast.[19] Skin rashes may appear in 1-3% within a week.[18] The old radiocontrast agents caused anaphylaxis in 1% of cases while the newer lower osmolar agents cause reactions in 0.01-0.04% of cases.[20][18] Death occurs in about two to 30 people per 1,000,000 administrations with newer agents being safer.[19][21] When deaths do occur it is more typically in those who are female, elderly or of otherwise poor health and is secondary to either anaphylaxis or acute renal failure.[17] The contrast agent may induce contrast-induced nephropathy.[22] This occurs in 2 – 7% of people who receives these agents with greater risk in those who have preexisting renal insufficiency,[22] preexisting diabetes, or reduced intravascular volume. People with mild kidney impairment are usually advised to ensure full hydration for several hours before and after the injection. For moderate kidney failure, the use of iodinated contrast should be avoided; this may mean using an alternative technique instead of CT. Those with severe renal failure requiring dialysis do not require special precautions, as their kidneys have so little function remaining that any further damage would not be noticeable and the dialysis will remove the contrast agent.