Programming tutorials, as you will notice, always begin with the quintessential “Hello World” program which demonstrates: how to use compilers, the basic usage of the language, and how to use output–essential for seeing if your program is working correctly. The code below is the standard C Hello World program.
Using Pull-Up and Pull-Down Resistors
An embedded microcontroller utilizes input/output (IO) signals to communicate with the outside world. The simplest form of IO is commonly referred to as general purpose input/output (GPIO) where the GPIO voltage level can be high, low, or high-impedance. Pulling resistors are used to ensure GPIO is always in a valid state.
Understanding Microcontroller Pin Input/Output Modes
General purpose input/output (GPIO) pins on microcontrollers have various modes for both input and output. Input modes may include pull-up or pull-down resistors, hysteresis, or some combination. Output modes can be push-pull, high-drive or open-drain.
RAM/Flash Usage in Embedded C Programs
In embedded designs, memory, especially RAM, is a precious resource. Understanding how C allocates variables in memory is crucial to getting the best use of memory in embedded systems.
Motor Control using PWM and PID
Bi-directional motor control can be done using an H-bridge circuit with pulse-width modulation (PWM) from a microcontroller to vary the speed. Several design challenges include preventing shoot-through, implementing a snubber circuit, as well as open and closed loop (such as PID) control mechanisms.