Preface

Many students of microprocessor-based systems have some initial difficulties relating to the software and hardware. The information presented here is mostly available from all the manufacturers’ data manuals, but I have tried to present it in a much more readable form and in a more logical order for the beginner. I have chosen to focus on the MCS51 and PIC families since, at the present, they seem to be more popular. Whether this is because of their in-built technical advantages or because of marketing hype is an interesting point. Maybe as your experience grows with these and competing products, you may form your own opinions on the matter. It has been an interesting task to chart the similarities and differences between the two families conceived a decade apart. The aim of writing a book which looks at two microcontrollers lies in the hope of giving confidence that all such devices have many similarities; and when you look at the differences, they are not so great either. Thus, when a technical problem has to be solved, it can be approached from the point of view of using the best tool for the job, not a case of reusing the only tool with which you are familiar.

I have not considered the problems of successful code generation and verification. In practice of course, this occupies the larger part of the development process. (If you disagree with this statement, then I would presume that is because it seems to you that more time is passed debugging non-functional code.) The aim of the book is only to look into the hardware and software structures and to give examples of how to develop short modules to test functionality.

I have not dwelt overmuch on the many varieties of software available – cross-assemblers, linkers etc. Microchip give theirs away ‘free’ with the PIC development systems. Other free cross-assemblers can be obtained for the MCS51 from the web sites which specialize in 8051 and related processors. Some even delve into higher level language tools such as C or Basic or Forth cross-compilers/interpreters. For professional use, there are many (costly) full-featured software and hardware development tools. Generally these improve development productivity, but are not essential for the beginner to get the full flavour of these microcontrollers. (Indeed, there are more than a few small companies which rely on these free/low-cost development tools as their main aid.) All of this software usually comes with adequate help files, and it then just falls to the programmer to get comfortable with the assemble/link process. Before committing to firmware, it is sometimes useful to use simulation software to check if the program will function correctly. Once again, software simulators are freely available which operate with varying degrees of sophistication. It is possible to completely simulate the entire project, but most developers tend to use these simulators to quickly check the functional correctness of modules or short routines.

This second edition has given me the opportunity to correct the (thankfully) few mistakes which have been pointed out. There have also been many requests to include some problems which consolidate the understanding of the preceding theoretical sections. These start reasonably blandly and progress to more sophisticated applications for which a microcontroller might be the solution.

Although the technology has moved on, with additional functionality built in to each microprocessor, I have deliberately not overextended the range of devices used. To do so would have diluted the aim of the book which is to teach the basics and compare two different microprocessor families.

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

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