This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:multiasm:cs:chapter_3_7 [2025/01/06 11:43] – ktokarz | en:multiasm:cs:chapter_3_7 [2025/12/04 13:42] (current) – [Separate I/O address space] ktokarz | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Peripherals ====== | ====== Peripherals ====== | ||
| - | Peripheral | + | Peripherals |
| Internal peripherals are connected directly to the address, data, and control buses of the computer. External peripherals can be connected to the computer via USB or a similar connection. | Internal peripherals are connected directly to the address, data, and control buses of the computer. External peripherals can be connected to the computer via USB or a similar connection. | ||
| <note info> | <note info> | ||
| - | The USB controller is also the peripheral device, so every external peripheral (e.g. mouse) is connected to the processor via an internal peripheral. In this book, we rather | + | The USB controller is also a peripheral device, so every external peripheral (e.g. mouse) is connected to the processor via an internal peripheral. In this book, we consider internal peripherals directly connected to the address, data, and control buses. |
| </ | </ | ||
| Line 20: | Line 20: | ||
| * sensors | * sensors | ||
| * actuators | * actuators | ||
| + | |||
| + | ===== Addressing of I/O devices ===== | ||
| + | From the assembler programmer' | ||
| + | |||
| + | The size of the I/O address space is usually smaller than the size of the program or data address space. The method of accessing peripherals depends on the design of the processor. We can find two methods of I/O addressing implementation: | ||
| + | |||
| + | ===== Separate I/O address space ===== | ||
| + | A separate I/O address space is accessed independently of the program or data memory. In the processor, it is implemented with the use of separate control bus lines to read or write I/O devices. Separate control lines usually mean that the processor also implements different instructions to access memory and I/O devices. It also means that the chosen peripheral and byte in the memory can have the same address, and only the type of instruction used distinguishes the final destination of the address. | ||
| + | Separate I/O address space is shown schematically in Fig {{ref> | ||
| + | <note info> | ||
| + | The "#" | ||
| + | </ | ||
| + | |||
| + | <figure separateio> | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | ===== Memory-mapped I/O address space ===== | ||
| + | |||
| + | In this approach, the processor doesn' | ||
| + | Memory-mapped I/O address space is shown schematically in Fig {{ref> | ||
| + | |||
| + | <figure memorymappedio> | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||