Microcontroller Embedded C Programming: Absolute Beginners
About Course
==> This should be your very first course to dive into the exciting world of “Embedded Systems.” <==
This is our new course mainly targeted for absolute beginners to learn microcontroller programming using the ‘C ‘ programming language.
Please note that “Embedded C” is NOT a separate programming language. ‘Embedded C’ is rather embedded target aware programming using traditional ‘C’ programming language.
Some of the critical microcontroller-related ‘C’ concepts such as
- Importance of bitwise operators
- Usage of bit manipulation techniques to program MCU peripheral registers
- accessing memory-mapped registers using pointers
- pointers and casting
- structures, bitfields, unions, and bit extraction techniques
- representing hardware registers details and configuring them using ‘C’ structure definitions
- Usage of const and volatile type qualifiers
- Interpret complex variable definitions involving the combination of const and volatile
- The precise usage of const pointers, const data, volatile const, with pointer and non-pointer variables
- The behavior of the code during compiler optimization and solution using volatile
- Functions and friends
- Data types, variables definitions, storage class specifiers and much more
- Loops: while, for, do. while
- MCU internal architecture and programming peripherals
- Interfacing projects
All these concepts are discussed with clear examples and writing code for the target embedded board.
According to 2017 embedded dot com survey still ‘C’ is one of the most widely used programming languages for embedded code development
This course gives particular emphasis to learn ‘C’ programming concepts practically for microcontroller use cases.
Hardware:
1. You need ARM Cortex M4 based STM32F407 DISCOVERY board from ST if you want to try out code on the target.
2. Additional interfacing components may be required for interfacing projects
3. You can also be able to follow this course if you have any other boards from ST such as Nucleo or evaluation.
Software:
1. In this course, Eclipse-based STM32CubeIDE is used as the IDE ( works on Windows/Linux/Mac) (FREE)
Learning order of FastBit Embedded Brain Academy Courses,
If you are a beginner in the field of embedded systems, then you can take our courses in the below-mentioned order.
This is just a recommendation from the instructor for beginners.
1) Microcontroller Embedded C Programming: absolute beginners(Embedded C)
2) Embedded Systems Programming on ARM Cortex-M3/M4 Processor(ARM Cortex M4 Processor specific)
3) Mastering Microcontroller with Embedded Driver Development(MCU1)
4) Mastering Microcontroller: TIMERS, PWM, CAN, RTC,LOW POWER(MCU2)
5) Mastering Microcontroller: STM32-LTDC, LCD-TFT, LVGL(MCU3)
6) Embedded System Design using UML State Machines(State machine)
7) Mastering RTOS: Hands-on FreeRTOS and STM32Fx with Debugging(RTOS)
8) ARM Cortex M Microcontroller DMA Programming Demystified(DMA)
9) STM32Fx Microcontroller Custom Bootloader Development(Bootloader)
10) Embedded Linux Step by Step using Beaglebone Black(Linux)
11) Linux device driver programming using Beaglebone Black(LDD1)
What Will You Learn?
- 'C' programming from scratch
- Data types,variables, declarations,
- Importance of Bit-Wise operators in "Embedded" programming
- Bit manipulation techniques using bit-wise operators and examples
- Bit extraction and working with memory mapped peripheral registers
- Other operators of 'C' (arithmatic, logical, relation, assignment )
- Functions in 'C'
- Implicit and explicit casting and its importance
- Pointers and casting
- Pointers arithmetic and importance of pointer datatypes
- Accessing memory mapped peripheral registers using pointers
- Structures and unions
- Importance of structures in peripheral register access
- Structure and bit fields
- Configuring peripheral register addresses using bit fields
- Structures and pointers
- interfacing LEDs, Keypad
- Const and volatile type qualifiers
- importance of volatile during compiler optimization
- const data, const pointer, cont volatile explanation with examples
- Importance of const
- Loops : for, while, do while
Course Content
Introduction
-
– Programming languages for Embedded Systems
02:40 -
A Message from the Professor
-
– History of C and standardization
02:43
IDE installation
-
– Downloading IDE
01:39 -
– Downloading IDE
02:28 -
– Key features of the STM32CubeIDE
02:08 -
– Installing STM32CubeIDE
00:43 -
– Installing STM32CubeIDE on Linux
02:01 -
– Installing compiler GCC for host
01:43 -
– Installing compiler GCC for host WINDOWS
06:12 -
– Installing compiler GCC for host LINUX
01:26 -
– Installing compiler GCC for host MAC
01:09 -
– Importing course projects in to workspace
11:08 -
– Creating a project for the HOST
03:41 -
– Creating a project for the Target
04:26 -
– Meet the embedded target of this course
03:27
Your first C program
-
– OnlineGDB web tool
00:57 -
– Printf and Hello World
11:57 -
– Printf exercise solution
03:44 -
– Escape sequences in C
03:48 -
– Printf exercise solution
04:11 -
– Printf exercise solution
03:32 -
– Commenting in C
03:39
Data types and variables
-
– Data types in C
05:09 -
– C Integer data types and value ranges
05:20 -
– Char data type and variable definition
05:39 -
– Variable definition exercise
08:30 -
– Range calculation for char data type
07:35 -
– Integer data type short int and value range
03:05 -
– Integer data type int and long
01:17 -
– Sizeof
06:07 -
– Variables naming rules and definition vs declaration
09:10 -
– Declaration vs definition An illustration
02:49 -
– Variables scope and illustration
09:01 -
– Variables scope and illustration contd
04:03 -
– Summary of local and global variables
01:03
Address of variable
-
– Address of variables
04:37 -
– Address of variables contd
08:16
Storage classes
-
– Storage class specifiers in C
06:55 -
– Use cases of static with variables
06:16 -
– Use cases of static with functions
03:52 -
– Extern storage class specifier
01:18 -
– ASCII codes
06:26
functions
-
– Introduction to functions in C
09:51 -
– Function prototypes
03:08 -
– Returning data from a function
02:13 -
– Function exercise
12:37 -
– Typecasting in C
07:45 -
– Typecasting in C contd
01:39
Microcontroller and Hello World
-
– Embedded
14:06 -
– Testing printf over ARM Cortex M4 ITMSWO line
08:12 -
– Issues with IDE
03:52 -
– Testing printf over OpenOCD semihosting
05:59 -
– Run Sizeof on Embedded Target
01:20 -
– Sizeof testing
04:38 -
– Compiler settings on STM32CubeIDE
04:46
Build process
-
– Embedded project build process
08:38
Analyzing Embedded C code
-
– What is a Microcontroller
13:38 -
– Code memory of the microcontroller
04:02 -
– Code and Data of the program using memory browser
09:32 -
– Analyzing ELF file using GNU tools
12:08 -
– Disassembly
09:23 -
– IDE option for Instruction level debugging
01:00
Data types to manipulate floating point data
-
– Manipulating decimal numbers in C
02:30 -
– Single vs double precision
03:39 -
– Working with float and double variables
06:32
Taking input from the user using scanf
-
– Scanf introduction
03:54 -
– Scanf exercise implementation
12:47 -
– Scanf exercise implementation contd
03:51 -
– Scanf exercise
01:00 -
– Scanf exercise implementation
02:54 -
– Scanf and float with scientific notation
02:45
Pointers
-
– Pointers in C
02:56 -
– Pointer variables and pointer data types
06:22 -
– Pointer variables and initialization
05:16 -
– Read and Write operation on pointers
03:52 -
– Pointer exercise implementation
06:34 -
– Significance of pointer data types
08:17 -
– Significance of pointer data types
09:43
Importance of stdinth
-
– Importance of stdinth
10:47
Operators
-
– Operators in C
10:06 -
– Unary operator in C
04:26 -
– Unary operators with pointers
01:43 -
– Relational operators in C
03:48 -
– Logical operators in C
05:58
decision making
-
– if statement
09:17 -
– if statement exercise solution
04:30 -
– if and else
03:21 -
– if and else exercise implementation part
04:55 -
– if and else exercise implementation part2
04:10 -
– if and else exercise implementation part
04:57 -
– if
02:14 -
– ifelseif ladder exercise
01:10 -
– ifelseif ladder exercise solution
08:55 -
– Conditional operator
06:43 -
– switch case statement in C
04:44 -
– switch case exercise
01:59 -
– switch case exercise solution
07:38 -
– switch case exercise solution contd
02:55
Bitwise operators
-
– Bitwise operators in C
05:51 -
– Bitwise AND and bitwise OR
01:05 -
– Applicability of bitwise operators Testing of bits
04:25 -
– Finding a number even or odd using testing of bits
01:44 -
– Applicability of bitwise operators Setting of bits
02:20 -
– Applicability of bitwise operators Clearing of bits
04:03 -
– Applicability of bitwise operators xor
02:35
Embedded C coding exercise for LED
-
– Coding to Turn on an LED
05:27 -
– Controlling IO pin using software
01:42 -
– Processor addressable memory regions
05:46 -
– STM32 memory map
03:56 -
– Memory mapped peripheral registers and IO access
05:35 -
– Procedure to turn ON the LED
02:47 -
– Enabling peripheral clock
05:51 -
– Calculating peripheral register addresses
04:19 -
– LED ON exercise coding
16:06
Bitwise shift operators
-
– Bitwise right shift operator
03:52 -
– Bitwise left shift operator
03:17 -
– Applicability of bitwise shift operators
04:17 -
– Modifying LED on exercise using bitwise shift operators
02:28 -
– Bit Extraction
03:08
Looping
-
– Looping in C
01:10 -
– While loop
02:53 -
– while loop exercise
02:12 -
– while loop and semicolon
03:31 -
– while loop exercise
05:49 -
– do while loop
03:04 -
– for loop
04:14 -
– for loop exercise
03:53 -
– for loop number pyramid exercise
01:31 -
– for loop exercise solution
03:44 -
– modifying LED on with software delay
01:44 -
– LED toggle using software delay
06:34
Type qualifier const
-
– const type qualifier
08:02 -
– placements of const variables in memory
03:14 -
– const usage and different case studies
05:16 -
– const usage and different case studies contd
04:09
Pinread
-
– IO pin read exercise
03:11 -
– IO pin read exercise implementation
09:38
Optimization
-
– Compiler optimization and flags
03:58 -
– Different compiler optimization levels
03:48 -
– Analyzing pin read exercise disassembly with O0 and O2
06:44
volatile type qualifier
-
– volatile and effect of optimization
06:15 -
– When to use volatile qualifier
04:06 -
– Using volatile to fix issues with the pinread exercise
02:42 -
– Using volatile with ISR Part1
04:30 -
– Using volatile with ISR Part
03:25 -
– Usage of const and volatile together
04:16
Structures and Bit fields
-
– Introduction to structures
03:42 -
– Accessing structure member elements
09:09 -
– Sizeof of a structure
02:43 -
– Aligned and un
01:59 -
– Structure padding
09:44 -
– Calculating structure size manually with and without padding
03:05 -
– Assembly code analysis of packed and non packed structure
05:39 -
– Typedef and structure
06:02 -
– Structures and pointers
10:43 -
– Structure exercise
01:59 -
– Structure exercise implementation
07:25 -
– Structure and bit fields
07:22 -
– Structure and bit fields contd
02:24
Unions
-
– Unions
05:31 -
– Applicability of unions
05:00
Usage of bitfields in embedded code
-
– Bit
10:20 -
– Bit
00:58 -
– Bit
01:30 -
– Modifying led toggle exercise with structures and bit fields
07:26 -
– Testing
01:30
Keypad interfacing
-
– Keypad interfacing
04:52 -
– Why pull
04:44 -
– Detecting key press event
02:44 -
– Flow chart for implementation
07:37 -
– Keypad key read code implementation
11:59 -
– Delay analysis
04:38
Arrays
-
– Arrays in C
06:24 -
– Read
14:37 -
– Passing array to a function
07:36 -
– Swapping of arrays
08:54 -
– Swapping of arrays contd
02:14
Strings
-
– Strings in C
09:41 -
– String literal
05:12 -
– String variable Vs string literal
18:49 -
– Inputting a string
04:33 -
– Scanf and scanset
06:58 -
– Exercise
16:29
PreProcessor directives in C
-
– Pre
13:39 -
– Conditional compilation directives
13:15 -
– defined operator
05:15 -
– Modifying led toggle exercise with macros
05:04
Earn a certificate
Add this certificate to your resume to demonstrate your skills & increase your chances of getting noticed.