Atmel AVR microcontroller development,
Using free software,
With worked examples,
By Chris Leaver
ISBN 9780956728500
238 Pages
£19.99 + postage from the UK
Or you can usually get a discounted copy from Amazon.
A free e-book version is available. Just follow the long link below to get to the download link. Of course I'd really like you to buy a copy but just like a real bookshop, I am quite happy for anyone to take a look before spending hard-earned cash.
https://docs.google.com/open?id=0B-G7MGUMTnUMMWRkZDU0MDItMzYwZC00NGVhLWExZTItMjk4ZDEzZDA0ODA0
This book is intended for the absolute newcomer. It is a very basic introduction to Atmel 8-bit microcontrollers. It does not go into very detailed descriptions of how they work nor expect a great deal of prior knowledge of electronics or programming. Therefore the emphasis is on simple examples over theory. Most newcomers to microcontrollers find that it is the very first projects which are the most confusing. Often just getting an LED to flash is an almost insurmountable challenge. In fact the basic LED flashing code is a prerequisite to almost all projects because it requires your entire circuit, compiler tool chain and programmer to work.
If it doesn't work, it can be very difficult to track down the problem. For this reason there is special emphasis placed on getting started. After getting the first project working it becomes much easier to implement other projects. Each project introduces a genuinely useful piece of code which can be used as a reference in a future design. In each case a typical schematic is provided with notes about the parts used.
The code is guaranteed to work with the schematic indicated and has been tested using real parts, not just a simulator or a theoretical model. Wherever possible the blocks of code have been designed to be re-usable so that a larger more complex project could be built up from a number of smaller simpler units which can be tested individually.
The example code is written in C and compiled using the free AVR-GCC compiler. Although C is a 'standard' programming language, the approach to writing code for embedded controllers is slightly different to that for computers with lots more memory. The code examples assume some prior programming experience. The examples are intended to suggest possible solutions to a programming problem and in most cases are the simplest approach rather than the most efficient. If you need to learn C from scratch, read some other books first. Although you certainly won't get to be an expert in microcontrollers without a great deal more reading and practical experience, this guide should make the first projects far less painful.
All the software tools are available for free download for most common operating systems. Although the examples use Gnu-Linux applications, there are MS Windows versions which are sufficiently similar that there should be no serious problems in migrating between them.
Chris