Embedded Systems: Design and Applications with the 68HC12 and HCS12

Hardcover
from $0.00

Author: Steven F Barrett

ISBN-10: 0131401416

ISBN-13: 9780131401419

Category: Computer Hardware - General

Designed for a senior- or graduate-level embedded systems design course, Embedded Systems Design and Applications with the 68HC12 and HCS12 introduces readers to unique issues associated with designing, testing, integrating, and implementing microcontroller/microprocessor-based embedded systems.\ The book presents proven techniques for successful completion of design projects and has been designed to teach the reader the following:\ \ Theories and skills for embedded systems design\...

Search in google:

This guide helps readers acquire fundamental microcontroller-associated programming skills using both the C programming language and assembly language.Explains the functional hardware components of a microcontroller and helps readers gain the skills needed to interface various external devices with microcontrollers. Demonstrates the basics of system level programming through the advanced topics of real-time operating systems to distributed processing. Utilizes extensive tutorial information and numerous examples. Introduces structured systems design concepts early in the book. Reviews the C programming language, structured programming languages, and the 68HC12 microprocessor. Includes a detailed discussion of RTOS issues and multiprocessor systems.A useful reference for practicing engineers.

Early in 2002 our first book The 68HC12 Microcontroller: Theory and Application was published by Prentice Hall. Our objectives for this text were threefold: (1) to present fundamental assembly-language programming skills, (2) to illustrate the functional hardware components of a microcontroller, and (3) to present the skills needed to interface a variety of external devices with microcontrollers. We used an autonomous mobile robot as the target system to illustrate how the subsystems of an embedded controller work together to perform a variety of tasks and meet system requirements.\ Our second book on embedded controller systems, Embedded Systems Design and Applications with the 68HC12 and the HCS12, picks up where the first left off. Our overall approach on this project has been to develop a tutorial, standalone text on embedded system design. We guide the reader from the basics of system-level programming through the advanced topics of real-time operating systems to distributed processing. Rather than jump into the "deep end of the pool," we begin with a tutorial on systems design concepts and programming in C. We then move on to specific discussions on the hardware subsystems aboard the 68HC 12/HCS 12 microcontroller. In these early chapters we are providing a walk-before-run philosophy. We have assumed that the reader has a fundamental but basic background in microprocessor hardware and software concepts. We feel this is an appropriate assumption since the target audience of the book is a college student enrolled in a second course on embedded system design. The tutorial topics in the beginning chapters can be skipped by practicing engineers; however, wehave met many engineers who insist on having books that contain such tutorial topics.\ With this stage complete, we then transition into multiple examples of embedded controller systems. The examples have been chosen to expose the reader to a wide variety of input and output devices in a system setting. The last portion of the book deals with the advanced concepts of embedded systems programming—real-time operating systems (RTOS) and multiple processors. We tackle these more difficult concepts only after we have developed a sound background in systems design and microprocessor systems.\ We have several objectives for writing this book. We want the reader to learn (1) fundamental programming skills using both the C programming language and assembly language for microcontroller-based embedded systems, (2) methodical procedures for designing embedded controller based systems, (3) functional hardware components of a microcontroller, (4) skills to interface a variety of external devices with microcontrollers to construct embedded systems, and (5) skills and procedures to tackle the toughest embedded controller system issues—real-time operating systems and multiprocessor systems. The entire book is designed with these objectives in mind. Our motivation to write this book stems from the reality that there is no comprehensive 68HC 12/HCS 12 microcontroller textbook that teaches students how to design and program the embedded systems using microcontrollers.\ We take a very hands-on approach with extensive tutorial information and numerous examples. Based on real-world applications, these examples address concerns such as microcontroller top-down/bottom-up implementation system design skills, noise and timing considerations, and troubleshooting techniques. The book provides a thorough review of C, structured programming techniques, the 68HC12/HCS12 microprocessor, detailed discussions of RTOS issues, multiprocessor systems, and many cases that illustrate embedded system design concepts.\ Early in the book we introduce the reader to structured systems design concepts. Using this top-down, functional decomposition design approach, the students should be able to tackle any design problems associated with complex embedded controller systems. We review some of the basic tenets of this systematic design approach described by Meilir Page-Jones in his classic book The Practical Guide to Structured Systems Design. These techniques work equally well for software, hardware, or software/hardware designs often encountered in embedded systems. Once these concepts are presented, we use them extensively throughout the remainder of the book. FLOW OF THE BOOK\ In organizing each chapter, we gave a great deal of consideration to the order and the means of subject presentations. Each chapter starts with a list of chapter objectives to give the reader a clear purpose for reading the entire chapter. A brief introduction follows, which describes the contents of the chapter. After the main concepts of a chapter are presented, a particular application will be chosen to illustrate the key points in the chapter.\ In Chapter 1 we introduce the concept of an embedded system and the special challenges involved in designing and implementing embedded controller-based systems. Chapter 2 introduces the advantages of programming in a high-level language (HLL). We provide a balanced trade-off discussion of programming with an HLL versus an, assembly language. We then demonstrate that embedded system programs may contain a mixture of both. We discuss the key concepts of structured programming that allow large projects to be subdivided into more manageable "bite-size" pieces. We then apply these concepts to system design, implementation, and testing. We get comfortable with these concepts and practices on simple systems before applying them to more complex ones.\ In Chapter 3 we discuss the software compilation/assembly process accompanied by a thorough review of C programming concepts. We finish the chapter with a review of programming and debugging tools. In our software discussions we purposely steer clear of any compiler specific details. There are many good compilers available for the 68HC121HCS12. In Chapter 4 we review the hardware for the 68HC12/HCS12 microcontroller and its associated subsystems. We then apply these subsystem descriptions to real-world applications.\ In Chapter 5 we explore the fundamentals of interfacing different hardware components to the controller. We begin with fundamental interfaces to switches and indicators and finish the chapter with some advanced applications involving liquid crystal displays (LCDs). Chapter 6 extends these interface concepts to real-world implementation issues. This chapter contains topics that separate a theoretical embedded controller design from one that works in the real world. Each topic is first defined and then followed by methods to alleviate corresponding problems, in a practical design.\ In Chapter 7 we tie the 68HC 12/HCS 12 systems together to create real-world systems. In each detailed example, we provide a thorough project description, a project structure chart, and the code required to implement the system. We have carefully chosen the applications to exercise all systems aboard the 68HC 12/HCS12 processor. In Chapter 8 we investigate the advanced concept of real-time operating systems. We begin with the basic definitions associated with an RTOS and then proceed to discuss how to design such a system. We then review issues associated with implementing an RTOS. We assume the reader has no experience or background with these potentially complex systems.\ Chapter 9 investigates distributed processing systems. These include systems containing more than one microprocessor. We investigate techniques and methods to link processors into a cohesive system using the built-in CAN controller of the 68HC12/HCS12 microprocessor.\ In addition to the contents of the book, we have prepared and maintain an accompanying textbook Web site at www.prenhall.com/pack. This Web site contains the current errata sheet and appendices for the book covering 68HC 12/HCS 12 instruction sets, 68HC 12/HCS 12 register sets, header files for example C programs, information on a variety of variants of the 68HC12 and the HCS12 microcontrollers, and 68HC 12/HCS 12 hardware and software support resources. For instructors, the Web site also contains additional instructional materials including sample syllabi, PowerPoint© lecture slides, and directions on how to order the solutions manual that provides detailed solutions to all chapter homework problems. THE TARGET SYSTEMS: THE M68EVB912B32 EVB AND THE MCSS120P2568 PROCESSOR-BASED EVB\ To illuminate system concepts discussed in Chapters 1-9 we have provided multiple examples. The examples have been written for two sample systems, or targets: the M68EVB912B32 Evaluation Board (1332 EVB) and the MC9S12DP256 or DP256. We have chosen to use the B32 EVB for its widespread availability, moderate price, and—most importantly—its many useful features. The EVB is equipped with an RS-232C interface, single power supply operation, easy access to controller pins via four header pin groups, and a prototype area for application-specific hardware. The EVB is also equipped with extensive memory features, including a 32 Kbyte flash electrically erasable programmable read-only memory (EEPROM) for program memory, 1 Kbyte of static random access memory (RAM), and 768 bytes of byte-erasable EEPROM for storing system data. Resident within flash memory is the D-Bug12 monitor/debugger program. We discuss these features in great detail in Chapter 4. The B32 is an excellent teaching tool but it can also be used to rapidly prototype an embedded controller system product.\ Readers who choose not to use the B32 EVB, should realize that most of the concepts presented throughout the book also apply to other variants of the 68HC12 and the HCS 12. Since the underlying concepts and functional components of different types of microcontrollers are very similar to each other, the acquired knowledge of the 68HC 12/HCS 12 can naturally be applied to other microprocessors and microcontrollers. In Chapters 7 and 9 we use the MC9S12DP256 processor. This HCS12 configuration has a 256 Kbyte flash memory and several msCAN controller area network channels. It is also equipped with a large RAM complement. There are several evaluation boards based on the DP256 processor. INTENDED AUDIENCE\ The main audience of this book is university students enrolled in electrical/computer engineering microcontroller courses. Since all ABET (Accreditation Board for Engineering and Technology, Inc.) accredited electrical/computer engineering programs require such courses, we expect this book will be received enthusiastically by instructors who teach such courses. We expect students to have taken an introductory logic course and a first-year programming language course. Having taken a computer language course will help students to understand program examples. We expect students with a minimal exposure to computer programming will follow the text subjects without too much trouble. Ideally, students will have completed an introductory microprocessor course. However, due to the tutorial nature of the text, students should be able to fill in knowledge gaps where necessary.\ Specifically, this book is targeted for a second semester microprocessor/ microcontroller course in an electrical and computer engineering curriculum. Different schools offer their microprocessor course in different stages of student development. Our students take a basic digital-design course during their sophomore year. They then take the first microprocessor course as a junior or senior. The second microprocessor course would then be taken during the senior year or as a graduate student. We believe that the book will continue where a typical first microprocessor course would leave off.\ We wrote this book for use as the textbook for college microprocessor courses. However, we believe the tutorial nature of our presentation will allow practicing engineers to learn the subject on their own. We believe that knowledge of embedded systems should be required for all electrical and computer engineering students as we live in a society where more and more engineering problems are solved by embedded systems. We foresee the scope of applications for embedded systems expanding as products require increasingly sophisticated local intelligence.

1Introduction to embedded systems12Microcontroller programming and structured design193C microcontrollers programming skills47468HC12/HCS12 system description and programming1135Basic input/output interfacing concepts3056Welcome to the real world!3657Embedded control systems3918Real-time operating systems5099Distributed processing systems-networking with msCAN595