This is a book about designing computer hardware and specifically about designing small machines for embedded applications. It is intentionally hardware specific. There are plenty of books out there on writing code for embedded systems (such as Michael Barr's excellent Programming Embedded Systems in C and C++, another O'Reilly & Associates title). What has been missing is a book that covers the nuts and bolts of developing embedded hardware. Sure, there are many books out there on microprocessors, but none that brings together all you need to create an embedded computer and make it go.
This is a book I have wanted to write for some time. It had its origins back in 1993, when I was lecturing at La Trobe University in Melbourne, Australia. I was given the task (at the last possible moment) of teaching a course in microprocessors to second-year students. The assigned text for the course was far from ideal. It talked about computer hardware but didn't show how to design computer hardware. It took a Field of Dreams approach—build it and it will go, with no consideration of timing, voltages, current draw, or anything else of importance. It was a newly published book, yet it covered components that had not been available for years. The memory chips it discussed were 128 bytes in capacity. (That's 128 bytes, not kilobytes!) This was a book that was neither relevant nor useful.
After talking to numerous representatives of publishing companies, I soon discovered that there wasn't much better available. And so, I solved the problem by writing detailed lecture notes for the students and told them to forget the textbook. These lecture notes were written quickly, and as a result, they were very rough indeed. The lectures were used to smooth the edges and fill the gaps. One day, I resolved, I would write a proper book.
And now, the opportunity has arisen to write for O'Reilly, and the book has become a reality. I no longer teach at La Trobe, having left many years ago to found my own company. More than ever, I want to bring together the real-world knowledge and experience necessary to construct working embedded systems. This book looks at the design process for creating and building embedded hardware and the analysis process for confirming that it will work. I will assume nothing about your knowledge beyond a rudimentary understanding of digital and analog electronics. The only real prerequisite is that you are intelligent and have an analytical mind. As I said at the start, this book is about hardware, and so you won't find software in these pages. That is better covered elsewhere.
Just as there is beauty in well-written software, there is beauty in well-designed hardware. With embedded computers, you get to understand the machine at all levels, at once aware of currents flowing through circuit traces and software executing complex algorithms. In fact, it is not possible to write embedded software without understanding the hardware, nor is it possible to design hardware without understanding software. You become involved with the machine to a degree beyond that which is possible with desktop computers. Best of all, it's a lot of fun.
In selecting chips and designs for this book, I have deliberately chosen parts that are both trivial to implement yet exceptionally useful. Aside from my own company (Embedded), I have no connection, financial or otherwise, with any of the companies or businesses mentioned in this book. You may, however, notice a prevalence of components from certain manufacturers. This simply reflects my personal preference for using their chips, based on my experience. Such companies produce chips that are easy to use, are reliable and robust, have great technical support, and provide thorough and comprehensive technical data. In other words, they have all the necessary prerequisites for inclusion in a book for beginners.
Many of the designs in this book look easy, and they are. They are intended as simple building blocks, allowing you to mix and match to achieve the embedded systems you need. There are some very complicated processors and support chips out there, and designs based upon them can be horrendously complicated, confusing, and frustrating. You won't find them in this book. This book is aimed at developing small, low-cost, and relatively simple embedded applications. I hope you will find it useful.