Course Notes

Course Notes

ECNG2006 (EE25M) Introduction to microprocessors Course Notes Contributors: K. Hall F. Mohammed C. Radix A. Sinanan A. Williams K. Edwards A. Joseph O. Regalado K. Narine I. Mohammed Y. Panchu S. Patrick A. Abdool C. Arneaud N. Harrichand H. Lawrence D. Caberrea P. Pollucksingh c Dept. of Electrical and Computer Engineering, U.W.I. , St. Augustine March 11, 2008 ECNG2006 (EE25M) March 11, 2008 2 Contents Course Outline 8 Coursework Portfolio 20 Course Perceptions Questionnaire 21 Prerequisite Skills Questionnaire 23 I Microprocessor Overview1 1 Microprocessor Basics1 2 Microprocessor System Basics 11 3 Microprocessor support circuitry 21 4 Microprocessor architecture 30 5 Typical Microprocessor instructions 39 II Microprocessor-based system development1 6 Software tool chain1 7 Development support (hardware)9 8 Microprocessor families and forms 17 III PIC16 Introduction1 9 PIC16F877 Overview2 10 MPLAB Overview 13 IV Numbers & Data1 11 Real numbers 1 12 Integer arithmetic 13 13 Real number arithmetic 22 c DECE, UWI, St. Augustine, Trinidad ECNG2006 (EE25M) March 11, 2008 3 14 Data structures 27 V Algorithms on PIC161 15 Basic operations1 16 Code comparison 41 17 Compiler limitations 57 VI Interfacing Peripherals1 18 Interfacing Idioms1 19 Interrupt Basics 14 20 Typical peripherals 28 21 Digital troubleshooting 37 22 PIC16 peripherals 45 VII System Issues1 23 Interrupt issues 1 24 µP interface/timing issues 24 25 Power/Signal issues 35 26 µP choice/comparison 42 27 Case study 50 28 Design guidelines 57 VIII Communication1 29 Communication protocols1 30 Bit-banging vs. hardware 12 31 I/O on the PC 17 c DECE, UWI, St. Augustine, Trinidad ECNG2006 (EE25M) March 11, 2008 4 32 PC to µP serial link 20 33 µP Parallel Interface 46 IX Appendices1 A Data Sheets 1 B Glossary 3 C Study tips 15 c DECE, UWI, St. Augustine, Trinidad ECNG2006 (EE25M) March 11, 2008 5 References Dictionary.com. Internet. Http://dictionary.reference.com/. Mathworld. Internet. Http://mathworld.wolfram.com/. 1991. Can specification version 2.0. Http://www.interfacebus.com/CAN 2 Spec.pdf. 1993. The free on-line dictionary of computing. Internet. Http://www.foldoc.org/. 1994-2000. PCW Compiler Help files. 1995. 80C51 family architecture. http://www.semiconductors.philips.com/acrobat/various/80C51 FAM ARCH 1.pdf; http://www.grifo.com/press/DOC/Philips/FAMARCH.PDF. 1997. PICmicro Mid-Range MCU Family Reference Manual. Technical Reference Document 33023a, MicroChip Technology Inc. 1999. HD44780U (LCD-II) (Dot Matrix Liquid Crystal Display Controller/Driver). Datasheet, Hitachi. 1999. MPASM USERS GUIDE with MPLINK and MPLIB. Manual DS33014G, MicroChip Tech- nology Inc. 2000. MPLAB ICD USERS GUIDE. Manual DS51184D, Microchip Technology Inc. 2000. MPLAB IDE, SIMULATOR, EDITOR USERS GUIDE. Manual DS51025D, Microchip Technology Inc. 2000. The I2C-bus specification. http://www.semiconductors.philips.com/acrobat/various/I2C BUS SPECIFICATION 3.pdf. 2001. At90s8535 summary. Available at www.atmel.com. Rev. 1041HS - 11/01. 2001. Atis telecom glossary 2000. Internet. Http://www.atis.org/tg2k/t1g2k.html. 2001. PIC16F87X Data Sheet: 28/40-Pin 8-Bit CMOS FLASH Microcontrollers. Technical Refer- ence Document 30292c, MicroChip Technology Inc. Arnold, Ken. 2001. Embedded controller hardware design. LLH Technology Publishing. Awtrey, Dan. 1997. Transmitting data and power over a one-wire bus. Sensors Reprint downloaded from www.dalsemi.com. Ball, Stuart R. 2000. Embedded microprocessor systems. Butterworth-Heinemann. Barr, Michael. 1999. Choosing a compiler: The little things. WebPage: http://www.netrino.com/Articles/CrossCompilers/. |||. 2000. Language lessons. WebPage: http://www.netrino.com/Connecting/2000- 03/index.html. Buchanan, William, and Austin Wilson. 2001. Advanced pc architecture. Addison-Wesley. c DECE, UWI, St. Augustine, Trinidad ECNG2006 (EE25M) March 11, 2008 6 Cady, Fredrick M. 1997. Microcontrollers and microcomputers: Principles of software and hardware engineering. Oxford University Press, Inc. Fisher, Matt. 2000. Protecting binary executables. Webpage: http://embedded.com/2000/0002/0002feat1.htm. Hartman, Hope J. 2001. Developing students' meta-cognitive knowledge and skills, chap. 3, 33{68. Kluwer Academic Publishers. Horowitz, Paul, and Winfield Hill. 1989. The art of electronics. 2nd ed. Cambridge University Press. Katzen, Sid. 2003. The quintessential pic microcontroller. Springer. 2nd printing. Kernighan, Brian W., and Dennis M. Ritchie. 1988. The C Programming Language Second Edition. Prentice-Hall, Inc. Mazidi, Muhammed Ali, and Janice Gillespie Mazidi. 1995. The 80x86 ibm pc & compatible com- puters volumes i & ii: Assembly language design and interfacing. Mitra, Sumit. 1997. Power-up considerations. Application Note AN522, DS00522E, Microchip Technology Inc. Noergaard, Tammy. 2005. Embedded systems architecture. Newnes. Palmer, Mark. 1997a. An520: A comparison of 8-bit microcontrollers. Application Note DS00520D, Microchip Technology Inc. |||. 1997b. Power-up trouble shooting. Application Note AN607, DS00607B, Microchip Tech- nology Inc. Contributions: Richard Hull & Randy Yach. Peri, Vamsi, and Dan Simon. 2005. Fuzzy logic control for an autonomous robot. In Annual meeting of the north american fuzzy information processing society (nafips 2005) 26-28 june 2005, 337{ 342. Downloaded from http://academic.csuohio.edu/simond/pubs/Vamsi.pdf on March 7th 2007. Predko, Myke. 2000a. Debugging your applications, chap. 12, 561{569. In Predko(2000d). |||. 2000b. Designing your own picmicro R mcu application, chap. 11, 547{560. In Predko (2000d). |||. 2000c. Picmicro R mcu application design and hardware interfacing, chap. 6, 253{316. In Predko(2000d). |||. 2000d. Programming and customizing picmicro R microcontrollers. McGraw-Hill. |||. 2001. Picmicro R microcontroller pocket reference. McGraw-Hill. Stallings, William. 1996. Computer architecture and organization. 4th ed. Prentice-Hall, Inc. |||. 2000. Computer architecture and organization. 5th ed. Prentice-Hall, Inc. Vahid, Frank, and Tony Givargis. 2002. Embedded system design. John Wiley & Sons, Inc. Wakerly, J. F. Digital design principles and practices. 3rd ed. Prentice-Hall. c DECE, UWI, St. Augustine, Trinidad ECNG2006 (EE25M) March 11, 2008 7 Wilmhurst, Tim. 2001. An introduction to the design of small-scale embedded systems. Palgrave. Wolf, Wayne. 2000. Computers as components:principles of embedded computing system design. Morgan Kaufmann. c DECE, UWI, St. Augustine, Trinidad ECNG2006 (EE25M) March 11, 2008 8 ECNG2006(EE25M) – Course Instructor: Introduction to Microprocessors Name: Ajay Joshi The University of the West Indies Email: [email protected] Department of Electrical and Computer Engineering Phone: ext. 3144 Last Review: December 2, 2005 Office: Room 325 Office Hours: as posted on door Course Support Name: Aaron Joseph Email: Given at Later Date Phone: ext. 3156 Office: Room 329 Office Hours: Tuesday and Thursday 1pm-3pm Aims To cultivate the student’s ability to utilize, comprehend the operation, and criticize the efficacy of, a microprocessor in an applied context. Objectives At the end of this course the student will be able to: • in general, or (given relevant diagrams and specifications) for a particular system, identify, and describe the role of, the components of (a) a microprocessor, (b) a microprocessor-based system, (c) a development suite (hardware, software) for a microprocessor-based system. • illustrate how data can be represented in (and accessed from) memory, implement arithmetic and data manipulation operations in assembly language, and assess how well code will perform in a given context, given the architecture and instruction set of a microprocessor • design and implement an appropriate interface between a microprocessor-based system and a peripheral device (or another microprocessor-based system), given relevant datasheets and suitable parts • select (and critique the selection of) a microprocessor-based system for an application, given relevant datasheets and application requirements Course Overview Microprocessors have been one of the most widely used methods of incorporating flexibility and intelligence into automated devices. Their general-purpose nature, speed and size have made them one of the most common components in Electrical Engineering. It is therefore necessary to develop a good understanding of their operation and how they can be used as building blocks for automated systems and control applications. This course explores the inner workings of a microprocessor from the programmer's perspective, as well as treating with external hardware issues such as interfacing, and c DECE, UWI, St. Augustine, Trinidad ECNG2006 (EE25M) March 11, 2008 9 selection criteria for microprocessors. Exercises and examples are based on the PIC 16F877 microcontroller. The syllabus follows: Microprocessor architecture (PIC16F877); Microprocessor development and support systems(MPLAB); Binary, integer and floating point arithmetic operations; (PIC16Cxxx) assembly language programming; Interfacing (PIC16F877): I/O ports, Timers, Interrupts, A/D conversion, PWM; System Issues; Serial/Parallel Communication. c DECE, UWI, St. Augustine, Trinidad ECNG2006 (EE25M) March 11, 2008 10 Prerequisites There are no departmental pre-requisites, however, it is presumed that the student has acquired the necessary pre-requisite skills in the preceding electronics and computer systems courses. It is presumed that the student is able to: • correctly interpret syntax of simple C programs, representation

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    536 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us