Embedded Systems Programming
Added to favorite list
Updated On 02 Feb, 19
Getting Started - Counting - Flow of Control - Variables and Pointers - Blinking the LED - Preprocessor and volatile - Bit-wise operators in C - Arrays and Pointer Arithmetic - Functions and the Stack - Modules, Recursion, AAPCS - Stack Overflow and Other Pitfalls of Functions - stdint.h and mixing types - structures and CMSIS - startup code part - interrupts
4.1 ( 11 )
This lesson shows how to blink the three-color LED of the Stellaris Launchpad board.
The lesson starts with explaining how the LED is connected to the microcontroller based on the User Manual for the board.
Next, the you learn about the memory map of your microcontroller and you get the first look at the Microcontrollers Data Sheet.
Next, you experiment in the debugger trying to access the registers of the GPIO (General-Purpose InputOutput) block to control the LED.
You learn about the "clock gating" featrue of the modern microcontrollers and you find out in the Data Sheet how to turn the GPIO module on by setting the appropriate bit in the system clock-gating register.
Still in the debugger, you configure the GPIO bits for digital output and finally you can turn all three colors on and off.
After the experiments in the debugger, you proceed to coding the same actions in C. This turns out to be simple, because of your knowledge of pointers from lesson-3.
You run the code, and discover a need for a delay loop. Again you use the counting loop from lesson-2 to code this part.
Finally, you have the working program that blinks an LED at a rate of about once per second.
In the next lesson you will learn how to improve the program by using the C preprocessor and the volatile keyword.
YouTube PLAYLIST of the whole course
"Stellaris Launchpad Board User Manual"
"Stellaris LM4F120H5QR Microcontroller DATA SHEET"
Sep 12, 2018
Excellent course helped me understand topic that i couldn't while attendinfg my college.
March 29, 2019
Great course. Thank you very much.