Microcontroller Embedded C Programming: Absolute Beginners

Microcontroller Embedded C Programming: Absolute Beginners Certification Course

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.

What you’ll learn

  • 8051 microcontroller family.
  • Reading switches.
  • Adding structure to code.
  • Real-time constraints.

Course Content

  • Introduction –> 1 lecture • 7min.
  • Programming embedded systems in C –> 5 lectures • 34min.
  • Introducing the 8051 microcontroller family –> 7 lectures • 47min.
  • Hello Embedded World –> 3 lectures • 16min.
  • Reading switches –> 3 lectures • 21min.
  • Adding structure to your code –> 4 lectures • 24min.
  • Meeting real-time constraints –> 5 lectures • 33min.
  • Creating an embedded operating system –> 7 lectures • 52min.
  • Multi-state systems and function sequences –> 3 lectures • 20min.
  • Using the serial interface –> 4 lectures • 25min.
  • Case study: Intruder alarm system –> 1 lecture • 6min.
  • Where do we go from here –> 2 lectures • 10min.

Microcontroller Embedded C Programming: Absolute Beginners

Requirements

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 C

  1. Introduction
  2. What is an embedded system?
  3. Which processor should you use?
  4. Which programming language should you use?
  5. Which operating system should you use?
  6. How do you develop embedded software?
  7. Conclusions

Chapter 2 Introducing the 8051 microcontroller family

  1. Introduction
  2. What’s in a name?
  3. The external interface of the Standard 8051
  4. Reset requirements
  5. Clock frequency and performance
  6. Memory issues
  7. I/O pins
  8. Timers
  9. Interrupts
  10. Serial interface
  11. Power consumption
  12. Conclusions

Chapter 3 Hello Embedded World

  1. Introduction
  2. Installing the Keil software and loading the project
  3. Configuring the simulator
  4. Building the target
  5. Running the simulation
  6. Dissecting the program
  7. Aside: Building the hardware
  8. Conclusions

Chapter 4 Reading switches

  1. Introduction
  2. Basic techniques for reading from port pins
  3. Example: Reading and writing bytes
  4. Example: Reading and writing bits (simple version)
  5. Example: Reading and writing bits (generic version)
  6. The need for pull-up resistors
  7. Dealing with switch bounce
  8. Example: Reading switch inputs (basic code)
  9. Example: Counting goats
  10. Conclusions

Chapter 5 Adding structure to your code

  1. Introduction
  2. Object-oriented programming with C
  3. The Project Header (MAIN.H)
  4. The Port Header (PORT.H)
  5. Example: Restructuring the ‘Hello Embedded World’ example
  6. Example: Restructuring the goat-counting example
  7. Further examples
  8. Conclusions

Chapter 6 Meeting real-time constraints

  1. Introduction
  2. Creating ‘hardware delays’ using Timer 0 and Timer 1
  3. Example: Generating a precise 50 ms delay
  4. Example: Creating a portable hardware delay
  5. Why not use Timer 2?
  6. The need for ‘timeout’ mechanisms
  7. Creating loop timeouts
  8. Example: Testing loop timeouts
  9. Example: A more reliable switch interface
  10. Creating hardware timeouts
  11. Example: Testing a hardware timeout
  12. Conclusions

Chapter 7 Creating an embedded operating system

  1. Introduction
  2. The basis of a simple embedded OS
  3. Introducing sEOS
  4. Using Timer 0 or Timer 1
  5. Is this approach portable?
  6. Alternative system architectures
  7. Important design considerations when using sEOS
  8. Example: Milk pasteurization
  9. Conclusions

Chapter 8 Multi-state systems and function sequences

  1. Introduction
  2. Implementing a Multi-State (Timed) system
  3. Example: Traffic light sequencing
  4. Example: Animatronic dinosaur
  5. Implementing a Multi-State (Input/Timed) system
  6. Example: Controller for a washing machine
  7. Conclusions

Chapter 9 Using the serial interface

  1. Introduction
  2. What is RS-232?
  3. Does RS-232 still matter?
  4. The basic RS-232 protocol
  5. Asynchronous data transmission and baud rates
  6. Flow control
  7. The software architecture
  8. Using the on-chip UART for RS-232 communications
  9. Memory requirements
  10. Example: Displaying elapsed time on a PC
  11. The Serial-Menu architecture
  12. Example: Data acquisition
  13. Example: Remote-control robot
  14. Conclusions

Chapter 10 Case study: Intruder alarm system

  1. Introduction
  2. The software architecture
  3. Key software components used in this example
  4. Running the program
  5. The software
  6. Conclusions

Chapter 11 Where do we go from here

  1. Introduction
  2. Have we achieved our aims?
  3. Suggestions for further study
  4. Patterns for Time-Triggered Embedded Systems
  5. Embedded Operating Systems
  6. Conclusions
Get Tutorial