Products and services named in this book are trademarks or registered trademarks of their respective companies. In all instances where Smiley Micros is aware of a trademark claim, the product name appears in initial capital letters, in all capital letters, or in accordance with the vendor’s capitalization preferences. | C Programming for Microcontrollers Featuring ATMEL s AVR Butterfly and the Free WinAVR Compiler Joe Pardue Copyright 2005 by Joe Pardue All rights reserved. Published by Smiley Micros Smiley Micros 5601 Timbercrest Trail Knoxville TN 37909 Email book@ Web http ISBN 0-9766822-0-6 Products and services named in this book are trademarks or registered trademarks of their respective companies. In all instances where Smiley Micros is aware of a trademark claim the product name appears in initial capital letters in all capital letters or in accordance with the vendor s capitalization preferences. Readers should contact the appropriate companies for complete information on trademarks and trademark registrations. All trademarks and registered trademarks in this book are the property of their respective holders. No part of this book except the programs and program listings may be reproduced in any form or stored in a database of retrieval system or transmitted or distributed in any form by any means electronic mechanical photocopying recording or otherwise without the prior written permission of Smiley Micros or the author. The programs and program listings or any portion of these may be stored and executed in a computer system and may be incorporated into computer programs developed by the reader. NONE OF THE HARDWARE USED OR MENTIONED IN THIS BOOK IS GUARANTEED OR WARRENTED IN ANY WAY BY THE AUTHOR. THE MANUFACTURERS OR THE VENDORS THAT SHIPPED TO YOU MAY PROVIDE SOME COVERAGE BUT THAT IS BETWEEN YOU AND THEM. NEITHER THE AUTHOR NOR SMILEY MICROS CAN PROVIDE ANY ASSISTANCE OR COMPENSATION RESULTING FROM PROBLEMS WITH THE HARDWARE. PAY CAREFUL ATTENTION TO WHAT YOU ARE DOING. I FRIED MY FIRST BUTTERFLY WHILE DEVELOPING THE ADC PROJECT. MY NICKNAME AT ONE COMPANY WAS SMOKY JOE FOR MY TENDENCY TO MAKE DEVICES ISSUE COPIOUS QUANTITIES OF SMOKE. BLOWING STUFF UP IS A NATURAL PART OF MICROCONTROLLER DEVELOPMENT. SET ASIDE .