|
Motorola 68HC11 Microprocessor Network Controller
The educational purpose of this project was to give us experience with microcontroller programming, interfacing a microcontroller with other hardware, assembly language, and basic networking theory (see below).
The class was broken up into seven lab groups with two students per group. Each group created a separate node, and wrote their own code, but conformed to certain standards that allowed each node to be compatible. At the end of the project, each group had to submit a full technical report. Feel free to browse through the appendices and assembly code, including the final code that was loaded into EEPROM.
Networking Theory:
The class implemented two different networking protocols, a Token-ring style network, and an Ethernet style network. A token ring network is easier to understand, physically. It restricts the right to send data into the network by means of "passing a token." Every computer is wired together in a circle, such that each computer receives data from the one on the left, and sends data to the one on the right (or vice versa, of course... as long as they all follow the same pattern) so that if each computer is set up to repeat what is said to it, it would be like a huge game of "telephone" except with perfect accuracy and taking only a few milliseconds.
In practice, this is what they do. A node does nothing until it receives a "free token" meaning there is no message on the network. If it has nothing to say it transmit the same token (we used the bytes "AA FF AA" as our free token). If the computer has something to say, it will replace the free token with the message, including the recipient's network address, so that a node can ignore any message not addressed to it. When the message gets all the way back to the sender, it is replaced with the free token, giving the next node a chance to "speak."
To understand this, imagine a circle of people who all have something to say. Rather than shouting over each other, they pass a token, such as conch shell. Only the person holding that token may speak, and so passes it to the next person when finished speaking.
Ethernet is not set up in a circle. It shares a common line (in simple hub-based networks) to which each computer listens and writes at the same time. For ordinary conversations, no conch shell is necessary. One person talks, then another, whenever anyone has something to say. The problem with this system is if two people say something at the same time, one will stop and let the other continue. Computers do the same. Two nodes sending at the same time causes a "collision," for which both nodes stop sending and wait a short amount of time before retrying.
Kristin Kelly and I worked as partners to develop this project.
|