Course: EE-13 Fundamentals of C/C++ Programming for Microcontrollers

Course: EE-13 Fundamentals of C/C++ Programming for Microcontrollers
Click an image to enlarge
As embedded systems, smart home peripherals, and IoT devices become more complex, writing efficient, reliable, and non-blocking firmware is a crucial skill for any electronics technician or hardware designer. Designed for beginners and entry-level hardware developers, EE-13 bridges the gap between basic circuit assembly and advanced microcontroller development.

Objective and Audience

This course teaches participants the fundamental principles of C and C++ programming tailored specifically to microcontroller architectures. Students will master basic syntax, memory management, pointers, structured functions, interrupt handling, and non-blocking firmware architecture essential for reading sensors and controlling hardware peripherals.

The course is designed for students, novice engineers, electronics hobbyists, and automation technicians who have basic circuit knowledge but lack formal coding experience for embedded platforms. Courses EE-3 Basics of Electronics and Electrical Engineering and EE-6 Basics of measuring with a multimeter serve as helpful preparation, while EE-13 acts as a direct bridge to EE-31 Embedded Systems for Smart Home (ESP32).

Proposed Format

Ten 90-minute lessons (totaling 15 instructional hours). Approximately one-third of each lesson is dedicated to technical theory and code walkthroughs; the remainder is spent on hands-on firmware writing, compilation, debugging, and testing on simulators/hardware boards. Instructor-led lab sessions or remote sessions are supported.

Learning Outcomes

By the end of the course, participants will be able to:

  • Understand the specific requirements of C/C++ in resource-constrained microcontroller environments (Flash, RAM).
  • Safely utilize data types, variables, arrays, pointers, and bitwise operations.
  • Write clean, readable, and modular code using structured functions and custom libraries.
  • Implement non-blocking delays using hardware/software timers instead of blocking delay() functions.
  • Configure and handle hardware and software interrupts (ISR).
  • Locate and fix syntax and runtime bugs using serial log monitors and debugging tools.

Lesson Plan

  1. Introduction to C/C++ for Embedded Systems:
    Program structure, compilation process, variables, data types, and scope. Setting up the IDE and outputting data via Serial Monitor.
  2. Control Flow and Logic:
    Conditional statements (if/else, switch), loops (for, while), reading digital inputs, and controlling GPIO pins.
  3. Functions and Modular Code:
    Function declarations, passing arguments by value and reference, return types, and multi-file project organization.
  4. Arrays, Strings, and Buffers:
    1D and 2D arrays, C-style strings, formatted printing with sprintf/printf for sensor telemetry formatting.
  5. Pointers and Memory Architecture:
    Memory addresses, pointers, dereferencing, passing pointers to functions, understanding RAM layout and avoiding memory leaks.
  6. Bitwise Operations and Registers:
    Bitwise operators (AND, OR, XOR, shifts), bit masking, setting/clearing individual register flags.
  7. Structures and Enumerations (struct & enum):
    Defining custom data structures for complex sensor data, building state machines using enum.
  8. Non-Blocking Architecture and Timers:
    Replacing delay() calls. Designing timestamp-based loops (millis/micros) for multi-tasking on single-core microcontrollers.
  9. Interrupts and Event-Driven Logic:
    Interrupt Service Routines (ISR), the volatile keyword, handling time-critical hardware events (buttons, encoders, sensors).
  10. Firmware Debugging and Final Project:
    Debugging strategies, stack analysis, writing a complete multi-tasking sensor application, and final assessment.

Frequently Asked Questions

  • Can an instructor guide me through my work, as I am not sure that I can do everything correctly?
  • I am a student. Can I get a discount on your courses?
  • Where can I get more information on the course topic?

  • Can an instructor guide me through my work, as I am not sure that I can do everything correctly?

    Of course, you can order additional individual consultations via ZOOM or Skype.

    Up

    I am a student. Can I get a discount on your courses?

    It is possible. We can offer a special discount for students. Please contact us by email.

    Up

    Where can I get more information on the course topic?

    The DEVICE section on our website offers you a huge amount of technical information, here you will find videos, articles and professional terms. More than 35 free engineering calculators on our website can also help you in your work.

    Up


    Back to the section
    Engineering calculations of electronic circuits and components online
    Site map|Privacy policy|Terms of Use & Store Policies|How to Buy|Shipping|Payment|© T&M Atlantic, Inc., 2010-2026
    PayPal VISA MasterCard American Express Discover