Mechatronics-Electronic-Control-Systems-in-Mechanical-and-Electrical-Engineering

Mechatronics Electronic Control Systems in Mechanical and Electrical Engineering Sixth Edition

A buffer is a device that is connected between two parts of a system to prevent unwanted interference between the two parts. An important use of a buffer is in the microprocessor input port to isolate input data from the microprocessor data bus until the microprocessor requests it. The commonly used buffer is a tristate buffer. The tristate buffer is enabled by a control signal to provide logic 0 or 1 outputs, when not enabled it has a high impedance and so effectively disconnects circuits. Figure 13.2 shows the symbols for tristate buffers and the conditions under which each is enabled. Figure 13.2(a) and (b) shows the symbol for buffers that does not change the logic of the input and Figure 13.2(c) and (d) for ones that do.

Many microcontrollers have serial interfaces, i.e. built-in UARTs. For example, the Motorola M68HC11 has a serial peripheral interface (SPI), a synchronous interface, and a serial communication interface (SCI), an asynchronous interface (see Figure 10.10). The SPI requires the same clock signal to be used by the microcontroller and the externally connected device or devices (Figure 13.17(a)). The SPI allows several microcontrollers, with this facility, to be interconnected. The SCI is an asynchronous interface and so allows different clock signals to be used by the SCI system and the externally connected device (Figure 13.17(b)). General-purpose microprocessors do not have an SCI so a UART, e.g. Motorola MC6850, has then to be used to enable serial communication to take place. In some situations more than one SCI is required and thus the microcontroller M68HC11 requires supplementing with a UART.

PIC microcontrollers have an SPI (see Figure 10.30) which can be used for synchronous serial communications. When data is written to the SSBUF register it is shifted out of the SDO pin in synchronism with a clock signal on SCK and outputted through pin RC5 as a serial signal with the most significant bit appearing first and a clock signal through RC3. Input into the SSBUF register is via RC4. Many PIC microcontrollers also have a UART to create a serial interface for use with asynchronously transmitted serial data. When transmitting, each 8-bit byte is framed by a START bit and a STOP bit. When the START bit is transmitted, the RX line drops to a low and the receiver can then synchronise on this high-to-low transition. The receiver then reads the 8 bits of serial data.

DOWNLOAD