1/19
C Embedded Systems Flashcards
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
What is Embedded C?
Embedded C is an extension of C language and it is used to develop microcontroller based applications.
What is C language?
C is a general-purpose programming language, which is widely used to design hardware-based applications.
Global Variable
A global variable exists in the program for the entire time the program is executed. Global variables are created starting address 0x0200.
Local Variable
A local variable is created when the function is executed, and once the execution is finished, the variable is destroyed. Local variables are kept in the stack (0x0400).
Executable File
The executable file (.out) that is output from the build process is the file that can be loaded and executed on a target device.
Header File
A header file is a file with extension .h which contains C function declarations and macro definitions to be shared between several source files.
#include files and why you would want to have multiple .c source files for a program.
(1) It speeds up compile time.
(2) It keeps your code more organized.
(3) It allows you to separate interface from implementation.
Static Library
A static library is a compiled object file containing all symbols required by the main program to operate (functions, variables etc.) as opposed to having to pull in separate entities.
#ifndef
checks whether HEADERFILE_H is not declared
#define
will declare HEADERFILE_H once #ifndef generates true
#endif
is to know the scope of #ifndef i.e end of #ifndef
Source Files
the files that contain the code that gets compiled. The implementation of your algorithm is contained in a source file.
What is Capture?
A timer capture will store the current value of the timer into one of the
capture/compare registers upon a triggering event.
The timer has four modes of operation:
stop, up, continuous, and up/down.
The SYNC bit enables…
synchronous capture, which means the capture event is
synchronized with the timer clock.
What is Compare?
The compare mode is selected when CAP = 0. Compare mode is used to
generate PWM output signals or interrupts at specific time intervals.
PWM meaning
Pulse Width Modulation
PWM Device
It’s a device that breaks up a DC voltage into pulses which can be changed to our needs. When
we change the width of the pulses, we are modulating them
Serial Communication
In serial communication the data bits are transmitted serially one by one i.e. bit
by bit on single communication line. Less costly.
Parallel Communication
In parallel communication, all the bits of data are transmitted simultaneously
on separate communication lines. Used for shorter distance.