Introduction to the first edition

This is a book about embedded systems, introduced primarily through the application of three PIC microcontrollers. Starting from an introductory level, the book aims to make the reader into a competent and independent practitioner in the field of embedded systems, to a level whereby he or she has the skills necessary to gain entry to professional practice in the embedded world.

The book achieves its aims by developing the underlying knowledge and skills appropriate to today's embedded systems, in both hardware and software development. On the hardware side, it includes in-depth study both of microcontroller design, and of the circuits and transducers to which the microcontroller must interface. On the software side, programming in both Assembler and C is covered. This culminates in the study and application of a Real Time Operating System, representing the most elegant way that an embedded system can be programmed.

The book is divided into introductory and concluding sections and three main parts, and develops its themes primarily around three example PIC microcontrollers, which form the basis of each part. These are the 16F84A, the 16F873A and the 18F242. It works through these in turn, using each to develop the sophistication of the ideas introduced. Nevertheless, the book should not be viewed just as a manual on PIC microcontrollers. Using these as the medium of study, the main issues of embedded design are explored. The skills and knowledge acquired through the study of this set of microcontrollers can readily be transferred to others.

A distinctive feature of the book is its combination of practical and theoretical. The vast majority of topics are directly illustrated by practical application, in hardware or in program simulation. Thus, at no point is there abstract theory presented without application. The main project in the book is the Derbot AGV (Autonomous Guided Vehicle). This is a customisable design, which can be used as a self-contained development platform. As an AGV it can be developed into many different forms. It can also be adapted into plenty of other things as well, for example a waveform generator, an electronic tape measure or a light meter. Before the Derbot is introduced, use is made of a very simple project, the electronic ping-pong game. The example projects can be built by the reader, with design information being given on the book's companion website. Alternatively, projects can simply be used as theoretical case studies.

This book is aimed primarily at second- or third-year undergraduate engineering or technology students. It will also be of interest to the informed hobbyist, and parts to the practising professional. Readers are expected to have a reasonable knowledge of electronics, equivalent to, say, a first-year undergraduate course. This will include an understanding of the operation of transistors and diodes, and simple analog and digital electronic subsystems. It is also beneficial to have some knowledge of computer architecture, for example gained by an introductory course on microprocessors.

Because the book moves in three distinct stages from the introductory to the advanced, it will in general provide material for more than one course or module. The first six chapters can be used for a short and self-contained one-semester course, covering an introduction to microcontrollers and their programming in Assembler. The 16F84A is chosen as the example for these chapters. It is an excellent introductory microcontroller, due to its simplicity. Chapters 7–11 can form an intermediate course, using Assembler to program more complex systems. This leads to a detailed knowledge of microcontroller peripherals and their use, as exemplified by the 16F873A. Chapters 12–20 can then be used to form an advanced course, working with C and the 18F242, and leading up to use of the RTOS. Alternatively, lecturers may wish to ‘pick and choose' in Chapters 7–20, depending on their preference for C or Assembler, and their preference for the microcontroller used. Having worked through Chapters 1–6, it is just possible to go directly to Chapter 12, thereby apparently skipping Chapters 7–11. The detail of the middle chapters is missed, but this approach can also work. Using C demands less detailed knowledge of the peripherals than is required if using Assembler, and cross-reference is made to the middle chapters where it is needed.

Whatever sequence of reading is chosen, the reader is expected as a minimum to have ready access to the Microchip MPLAB Integrated Development Environment, which is available on the book's companion website. This allows the example programs in the book to be simulated and then modified and developed. Almost inevitably the book starts with some study of hardware, so that the reader has a basic knowledge of the system that the software will run on. To some extent the first few chapters, on PIC microcontroller architecture, represent a steep learning curve for the beginner. The fun then starts in Chapter 4, when programming and simulation can begin. From here, with the foundations laid, hardware and software run more or less in parallel, each gaining in sophistication and complementing the other. For the final third of the book, the Microchip C18 C compiler should be used. The student version of this is also available on the book's companion website. For Chapter 19, the ‘Lite' version of the Salvo RTOS can be installed, again from the book's companion website.

Beyond program simulation, it is hoped that the reader has access to electronic build and test facilities, whether at home, college, university or workplace. With these, it is possible to build up some of the example project material or work on equivalent systems. By so doing, the satisfaction of actually implementing real embedded systems will be achieved. When working through the middle or later chapters, the best thing a lecturer or instructor can do is to get a Derbot printed circuit board into the hands of every student on the course, along with a basic set of components. Guide them through initial development and then give them suggestions for further customisation. It is wonderful what ideas they then come up with. Design details are on the book's companion website.

An essential skill of any professional designer in this field is the ability to work with the manufacturer's data sheets. These are the main source of information when designing with microcontrollers and the ultimate point of reference in the professional world. It is in general not desirable to work from intermediate drawings by a third party, even if these are meant to simplify the information. Therefore, this book unashamedly uses (with permission) a large number of diagrams straight from the Microchip data sheets. Many are made more accessible by the inclusion of supplementary labelling. The reader is encouraged to download the full version of the data sheet in use and to refer directly to it.

A complete knowledge of the field of embedded systems requires both breadth and depth. This is particularly true of embedded systems, which combine elements of hardware and software, semiconductor technology, analog and digital electronics, computer architecture, sensors and actuators, and more. With its focus on the PIC microcontroller this book cannot cover all these areas. For the wider contextual background, the author's earlier book. An Introduction to the Design of Small-Scale Embedded Systems, is recommended. With whole chapters on memory technology, power supply, numerical algorithms, interfacing to tranducers and the design process, it provides a ready complement to this book.

I hope that you enjoy working through this book. In particular I hope you go on to enjoy the challenge and pleasure of designing and building embedded systems.

Tim Wilmshurst

University of Derby,UK

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.1.158