
Department of Computer Science and Electronics
18
4. Design
4.1. Analysis of problem
In figure 4-1, we have a general circuit. The three cards as well as the PPC are
connected to the RS485 network. The three cards are identical to each other so each one
has eight sensors and an Atmega16 microcontroller. The Max 489 is a transceiver; it
connects the microcontrollers to the RS-485 network.
The microcontroller can do 2 basic things:
1—Calibrating: this means calculating each sensor’s threshold.
2—Sends the sensor’s state digitally to the PPC, i.e. in the form of a logical 1 or 0.
Any action taken by the microcontroller is a result of a PPC’s order. The PPC is
sending messages to the RS485 network. The structure of the data frame is illustrated in
figure 4-2:
Figure 4-1. General diagrame
AddressÆ 0:3
7th 6 5 4 3 2 1 0
1: calibration
0: send data to PPC, no calibration
Start bit
Figure 4-2. Order’s location in the frame
Commenti su questo manuale