B&B Electronics Asynchronous to Synchronous Converter 2010 Manuale Utente Pagina 19

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 43
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 18
Department of Computer Science and Electronics
19
Therefore the frame consists of a start bit, followed by the eight bit data and a 1
stop bit. The parity bit is not used and the communication is 9600bps with an external
ceramic oscillator of 16MHz.
It is important to avoid any kind of collision risk because of the fact that only
one device can be speaking in the network. Thus, the microcontrollers speak only when
the PPC orders them. Therefore, the first thing the microcontroller has to do is to check
if the frame it has received contains its address in the 4 less significant bits.
The next step that the microcontroller has to check is what it is being ordered to
do; a calibration or transmission of the sensors’ state. This is specified, checking the
most significant bit.
Let’s suppose that the robot is reset and it has to start playing in the same field
that it did last time. In this case, it is not necessary to calculate the sensor threshold
again because it has already been calculated. In order not to lose this information, when
a calibration is done the microcontroller is writing this values in the EEPROM memory.
This way, after a reset and before starting playing, the robot will read the calibration
value stored in the EEPROM without the necessity of making the calibration again.
The sensors’ values are going to be read from the microcontrollers’ analogue
input. However, the PPC wants to receive the data digitally as figure 4-3 shows.
The bit value will be a logical 1 or 0 if the value read from the ADC is bigger or
smaller than the corresponding sensor’s threshold.
Figure 4-4 shows a general flux diagram representing the concepts mentioned
above. Below the diagram, the algorithm of the program is taken into consideration.
Figure 4-3. Each sensor’s state in the frame
Vedere la pagina 18
1 2 ... 14 15 16 17 18 19 20 21 22 23 24 ... 42 43

Commenti su questo manuale

Nessun commento