Learning Programming with Eas — the Tutorial by Molaskes

Step by Step

>de:Schritt-fuer-Schritt The core of the computer (or microcontroller) is the ,,central ,,processing ,,unit, CPU. This is where the real magic happens. The states (bits) of all input, output and control lines are held here in extra flip-flops, called ,,registers. The pivotal register is the ,,program ,,pointer. When you turn on the computer, it starts with the value "0" and is ,,increased by 1 on every ,,tick of a ,,clock. This clock is a ,,quartz ,,crystal oscillator, just like in a wrist watch, only much faster. A 16 MHz clock ticks 16 ,,million times each second, a 2 GHz clock 2 ,,billion times each second, to give two examples (microcontroller vs PC). A quartz crystal in an electric circuit ,,resonates with a very reliable frequency that is used to ,,trigger reading and writing cycles in the CPU, including increasing the program pointer. The program pointer is an ,,address for the ,,program ,,memory, so as it starts with 0, the program memory data at address 0 is the first "line of code" executed. On the ,,next tick of the computer clock, the program pointer becomes 1, and the second "line of code" gets executed, and so on.