MSP430MicrocontrollerBasicsThispageintentionallyleftblankMSP430MicrocontrollerBasicsJohnH.DaviesAMSTERDAM•BOSTON•HEIDELBERG•LONDONNEWYORK•OXFORD•PARIS•SANDIEGOSANFRANCISCO•SINGAPORE•SYDNEY•TOKYONewnesisanimprintofElsevierNewnesisanimprintofElsevier30CorporateDrive,Suite400,Burlington,MA01803,USALinacreHouse,JordanHill,OxfordOX28DP,UKCopyright©2008,ElsevierLtd.Allrightsreserved.Nopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmittedinanyformorbyanymeans,electronic,mechanical,photocopying,recording,orotherwise,withoutthepriorwrittenpermissionofthepublisher.PermissionsmaybesoughtdirectlyfromElsevier’sScience&TechnologyRightsDepartmentinOxford,UK:phone:(+44)1865843830,fax:(+44)1865853333,E-mail:permissions@elsevier.com.YoumayalsocompleteyourrequestonlineviatheElsevierhomepage(http://www.elsevier.com)byselecting“Support&Contact”then“CopyrightandPermission”andthen“ObtainingPermissions.”Recognizingtheimportanceofpreservingwhathasbeenwritten,Elsevierprintsitsbooksonacid-freepaperwheneverpossible.LibraryofCongressCataloging-in-PublicationDataApplicationsubmittedBritishLibraryCataloguing-in-PublicationDataAcataloguerecordforthisbookisavailablefromtheBritishLibrary.ISBN:978-0-7506-8276-3ForinformationonallNewnespublications,visitourWebsiteat:http://www.books.elsevier.com08091011121310987654321PrintedintheUnitedStatesofAmerica“ToElizabeth.”ThispageintentionallyleftblankContentsPreface...........................................................................xiChapter1:EmbeddedElectronicSystemsandMicrocontrollers...................11.1What(andWhere)AreEmbeddedSystems?....................................11.2ApproachestoEmbeddedSystems...............................................21.3SmallMicrocontrollers...........................................................51.4AnatomyofaTypicalSmallMicrocontroller....................................81.5Memory...........................................................................111.6Software.....