Field Programmable Gate Array (FPGA): A chip containing a "sea of gates" - a matrix of configurable logic blocks.
A processor is essentially a state machine that processes instructions sequentially.
Analogy: Following a Recipe
At its heart, a processor continuously performs a cycle of four main steps to execute a program:
A single assembly language instruction (like ADD or MOVE) is not the lowest level.
How do we describe these low-level micro-operations before building the hardware?
Register Transfer Logic (RTL) is a high-level notation used by engineers to describe the flow of data between registers in a digital system.
R2 ← R1 describes moving the contents of Register 1 to Register 2.
RTL can also describe conditional operations, which translate directly to control logic in hardware.
Example:
If (LD = 1) then RM ← RN
Today, processors are not typically designed by manually wiring gates. A more automated flow is used:
This allows for the design of incredibly complex processors.
Modern processors use a cache to improve performance.
As we approach the physical limits of clock speed, the industry has shifted to parallel processing.
How does the C++ code we write relate to these low-level processor instructions?
The compiler treats variables differently based on their scope.
Local Variables (inside a function):
Global Variables (outside all functions):
A simple C++ for loop translates into several key assembly instructions:
#include
int main() {
// Basic for loop
for (int i = 1; i <= 10; i++) {
// do something
}
return 0;
}
Assembly equivalent:
Next Lecture: We will dive deeper into C++ programming and its relationship with microcontroller hardware.
Arduino is not just one thing; it's a combination of three key components that work together:
pinMode(), digitalWrite(), and delay() are not part of standard C++, but are provided by the Arduino library.Example "Blink" Sketch:
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
Becoming a good embedded engineer is about learning how to find information yourself.
The official website is your central hub for all things Arduino. Get comfortable with its key sections:
While the Arduino API insulates you from this complexity, true mastery comes from understanding what's "under the hood."
A physical look at some of the giants of computing history:
Microcontrollers integrate a CPU with memory and peripherals onto a single chip. They come in all shapes and sizes.