Links
cppreference –
complete reference for C and C++ standard library,
syntax, templates and low-level behavior.
Copetti NES Article – deep explanation of hardware architecture, memory layout, CPU behavior and system design.
Compiler Explorer – inspect generated assembly, understand optimization and compiler behavior.
ATmega328P Datasheet – authoritative source for registers, timing and electrical properties.
Code
Direct manipulation of I/O registers allows precise control over hardware. This approach bypasses abstractions and operates directly on memory-mapped registers.
uint8_t value = PORTB;
PORTB |= (1 << PB0);
The expression (1 << PB0) creates a bit mask.
Using |= ensures only the selected bit is modified.
AVR Register (TCCR0)
Timer configuration is controlled through registers like TCCR0.
Each bit represents a specific function such as prescaler or waveform mode.
// Prescaler clk/64
TCCR0 |= (1 << CS01) |
(1 << CS00);
Memory Mapping
AVR uses memory-mapped I/O, meaning registers are accessible as normal memory addresses.
#define PORTB (*(volatile uint8_t*)0x25)
Address 0x25 maps to hardware. The keyword volatile
prevents compiler optimizations that would break hardware interaction.
Live Register (8-bit)
Interactive representation of an 8-bit register. Each bit can be toggled manually.
Binary: 0b00000000
Hex: 0x00
Decimal: 0
This demonstrates conversion between binary, hexadecimal and decimal representations.
Languages
Finnish: Minä opiskelen suomea. Tämä toimii hyvin.
Czech: Učím se finsky. Tohle funguje dobře.
German: Ich lerne Finnisch. Das funktioniert gut.
Learning languages improves structured thinking, similar to programming.
Numbers
Decimal 255 corresponds to binary 0b11111111
and hexadecimal 0xFF.
uint8_t max = 255;
uint8_t mask = 0xFF;
Typography Scale
Visual test of scaling using the same glyph.
D
D
D
D
D
D
D
D
D
This helps evaluate readability and visual hierarchy.
UTF-8 Test
This section verifies proper rendering of different writing systems and Unicode characters.
Spanish (Español):
El conocimiento es poder, pero la sabiduría es saber cómo usarlo.
La vida es un aprendizaje constante y cada experiencia aporta algo valioso.
Russian (Русский):
Знание — сила, но понимание — это ключ к правильному применению знаний.
Практика и опыт формируют настоящее мастерство.
Latin:
Scientia potentia est, sed sapientia est recte uti scientia.
Per aspera ad astra — přes překážky ke hvězdám.
If all text above renders correctly, UTF-8 encoding is functioning properly.
Pi Stream
Not working stream of digits of π (generated dynamically).
In principio creavit Deus caelum et terram terra autem erat inanis et vacua et tenebrae erant super faciem abyssi et spiritus Dei ferebatur super aquas dixitque Deus fiat lux et facta est lux et vidit Deus lucem quod esset bona et divisit lucem ac tenebras appellavitque lucem diem et tenebras noctem factumque est vespere et mane dies unus