This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en:multiasm:piot:chapter_4_4 [2025/05/31 09:22] – marcin | en:multiasm:piot:chapter_4_4 [2026/03/01 17:46] (current) – ktokarz | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| AVR microcontrollers are classified as 8-bit devices, but the instruction word is 16-bit. | AVR microcontrollers are classified as 8-bit devices, but the instruction word is 16-bit. | ||
| - | **Data Types in AVR Assembler** | + | ==== Data Types in AVR Assembler |
| + | In AVR, the data type can be one of the following: | ||
| * Single bits: Can be used for logical operations and control, e.g., setting or clearing bits in registers. | * Single bits: Can be used for logical operations and control, e.g., setting or clearing bits in registers. | ||
| * Bytes, 8-bit values: The basic data type in AVR, used to store small integers, ASCII characters, etc. | * Bytes, 8-bit values: The basic data type in AVR, used to store small integers, ASCII characters, etc. | ||
| Line 11: | Line 12: | ||
| * Double Words, 32-bit values: Consist of four bytes, used to store even larger integers or addresses. | * Double Words, 32-bit values: Consist of four bytes, used to store even larger integers or addresses. | ||
| - | For additional libraries, such as those used in the C language, 64-bit data can be utilized. These data require extra handling. | + | For additional libraries, such as those used in the C language, 64-bit data can be utilised. These data require extra handling. |
| - | **Encoding** | + | ==== Data Encoding |
| + | In this subchapter, we present the rules of data encoding in the AVR architecture. | ||
| * Binary Encoding: Data is stored in binary format, the most fundamental form of data representation in microcontrollers. | * Binary Encoding: Data is stored in binary format, the most fundamental form of data representation in microcontrollers. | ||
| * ASCII Encoding: Characters are often stored using ASCII encoding, where a unique 7-bit or 8-bit code represents each character. | * ASCII Encoding: Characters are often stored using ASCII encoding, where a unique 7-bit or 8-bit code represents each character. | ||
| * BCD (Binary-Coded Decimal): Sometimes used for applications requiring precise decimal representation, | * BCD (Binary-Coded Decimal): Sometimes used for applications requiring precise decimal representation, | ||
| * Endianness: AVR microcontrollers typically use little-endian format, where the least significant byte is stored at the lowest memory address. | * Endianness: AVR microcontrollers typically use little-endian format, where the least significant byte is stored at the lowest memory address. | ||