10

Input and output methods

We have seen in Chapter 9 that input and output ports provide the hardware for transferring data into and out of the computer. Here we look at how we can use these ports in programs that transfer data to and from various types of peripheral devices such as a keypad and a stepper motor. A fundamental problem is the difference in the rate at which a peripheral device and the G80 can write and read data. We will see that data transfer cannot take place without taking into account the characteristics of the device that is connected to the port. In general, the programmer must cause the computer to adhere to a protocol that governs how the data transfer will take place. We begin by considering data transfers that occur ...

Get Embedded Systems and Computer Architecture now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.