An embedded system is an application that contains at least one programmable computer (typically in the form of a microcontroller, a microprocessor or digital signal processor chip) and which is used by individuals who are, in the main, unaware that the system is computer-based. Use of embedded processors in passenger cars, mobile phones, medical equipment, aerospace systems and defence systems is widespread, and even everyday domestic appliances such as dishwashers, televisions, washing machines and video recorders now include at least one such device. This course provides a hardware-free introduction to embedded software for students who: Already know how to write software for desktop computer systems. Are familiar with a C-based language (Java, C++ or C). Want to learn how C is used in practical embedded systems. Chapter 1 Programming embedded systems in CIntroductionWhat is an embedded system?Which processor should you use?Which programming language should you use?Which operating system should you use?How do you develop embedded software?ConclusionsChapter 2 Introducing the 8051 microcontroller familyIntroductionWhats in a name?The external interface of the Standard 8051Reset requirementsClock frequency and performanceMemory issuesI/O pinsTimersInterruptsSerial interfacePower consumptionConclusionsChapter 3 Hello Embedded WorldIntroductionInstalling the Keil software and loading the projectConfiguring the simulatorBuilding the targetRunning the simulationDissecting the programAside: Building the hardwareConclusionsChapter 4 Reading switchesIntroductionBasic techniques for reading from port pinsExample: Reading and writing bytesExample: Reading and writing bits (simple version)Example: Reading and writing bits (generic version)The need for pull-up resistorsDealing with switch bounceExample: Reading switch inputs (basic code)Example: Counting goatsConclusionsChapter 5 Adding structure to your codeIntroductionObject-oriented programming with CThe Project Header (MAIN.H)The Port Header (PORT.H)Example: Restructuring the Hello Embedded World exampleExample: Restructuring the goat-counting exampleFurther examplesConclusionsChapter 6 Meeting real-time constraintsIntroductionCreating hardware delays using Timer 0 and Timer 1Example: Generating a precise 50 ms delayExample: Creating a portable hardware delayWhy not use Timer 2?The need for timeout mechanismsCreating loop timeoutsExample: Testing loop timeoutsExample: A more reliable switch interfaceCreating hardware timeoutsExample: Testing a hardware timeoutConclusionsChapter 7 Creating an embedded operating systemIntroductionThe basis of a simple embedded OSIntroducing sEOSUsing Timer 0 or Timer 1Is this approach portable?Alternative system architecturesImportant design considerations when using sEOSExample: Milk pasteurizationConclusionsChapter 8 Multi-state systems and function sequencesIntroductionImplementing a Multi-State (Timed) systemExample: Traffic light sequencingExample: Animatronic dinosaurImplementing a Multi-State (Input/Timed) systemExample: Controller for a washing machineConclusionsChapter 9 Using the serial interfaceIntroductionWhat is RS-232?Does RS-232 still matter?The basic RS-232 protocolAsynchronous data transmission and baud ratesFlow controlThe software architectureUsing the on-chip UART for RS-232 communicationsMemory requirementsExample: Displaying elapsed time on a PCThe Serial-Menu architectureExample: Data acquisitionExample: Remote-control robotConclusionsChapter 10 Case study: Intruder alarm systemIntroductionThe software architectureKey software components used in this exampleRunning the programThe softwareConclusionsChapter 11 Where do we go from hereIntroductionHave we achieved our aims?Suggestions for further studyPatterns for Time-Triggered Embedded SystemsEmbedded Operating SystemsConclusions