
50 MAKING THINGS TALK
Layers of Agreement
Before you can get things to talk to each other, you have to lay some ground rules for
the communication between them. These agreements can be broken down into five
layers, each of which builds on the previous ones:
•Physical
How are the physical inputs and outputs of each device
connected to the other? How many connections between
the two devices do you need to get messages across?
•Electrical
What voltage levels will you send to represent the bits of
your data?
•Logical
Does an increase in voltage level represent a zero or a
one? This is one of the most common sources of problems
in the projects that follow.
•Data
What’s the timing of the bits? Are the bits read in groups
of 8, 9, or 10 bits? More? Are there bits at the beginning or
end of each group to punctuate the groups?
•Application
How are the groups of bits arranged into messages? What
is the order in which messages have to be exchanged in
order to get something done?
This is a simplified version of a common model for
thinking about networking called the Open Systems Inter-
connect (OSI) model. Networking issues are never really
this neatly separated, but if you keep these elements
distinct in your mind, troubleshooting any connection
will be much easier. Thinking in layers like this gives you
somewhere to start looking for the problem, and a way to
eliminate parts of the system that ...