Raspberry_Pi_Education_Manual

Notes:

Serial and parallel data

In serial data signals, there are two information streams: transmit (Tx) and receive (Rx). In a parallel signal, many bits of data can be sent or received simultaneously.

Digital data flows in and out of a computer in one of two ways – in serial or in parallel. On a parallel interface, there is one data channel for each bit of data that is input. Think of it as having lots of lanes on a motorway. On a serial interface, there is just one data channel for each direction (Transmit and Receive), which every single data bit travels along, one after the other. Think of it like a single road. Parallel interfaces are simpler to design and use, but require more hardware and data cable to construct (much like the motorway taking up more space than the road).

Interrupts, polling and multitasking

Now we know the basics of how information (data) flows in and out of a computer, we have to know how to handle the data that is coming in when it arrives. Consider this situation: You are working on your computer but, at the same time, you are also expecting one or more phone calls. Think of the phone call as a source of input data. There are three ways to be able to deal with both tasks at the same time: 1. Work on the computer until you are interrupted by the phone ringing. Answer the phone then continue working on your computer. 2.  Work on the computer for a minute. Pick up the phone and check to see if there is someone on the other end. Put the phone down then do another minute of work on the computer. Check the phone again. Repeat this all day! 3.  Work on the computer yourself and get another person to take phone calls for you. The first method is an example of using “ interrupts ”. When on the phone, you could write down a note for yourself so that you can prioritise any work that occurs as a result of the phone call in a timely manner. Using interrupts is the most efficient use of time with infrequent events. There is, however, a disadvantage to using interrupts: it requires low-level hardware or software (ringtone on the phone) to be available.

Human-computer interfacing

127

Made with FlippingBook flipbook maker