For serial interfaces built into microcontrollers, those listed below are available. Of these, (1) through (3) are most commonly used. By converting the signal level, (1) can be connected to RS-232-C, which has been in use in PCs, etc. (2) and (3) are used mainly to connect one microcontroller to another, or to connect a microcontroller to an external EEPROM within a board.
(1)UART(Universal Asynchronous Receiver and Transmitter)
This is the most common interface. The data length that can be transferred is 7 or 8 bits, and error checking can be done using parity. Some microcontrollers additionally support the following:
• Infrared communication function
• LIN (Local Interconnect Network) interface function
Some also have a function to send multiple segments of data continuously, in addition to sending individual data segments separately.
(2) 3-wire serial interface
Using a total of three signal wires, one for a serial clock and two for data, this interface can bidirectionally transfer 8-bit data at a relatively high speed. Some MCUs/MPUs can switch between sending data starting with the low-order or high-order bit, while others support the following:
• SPI (Serial Peripheral Interface)-compliant functions
• Function to transfer multiple data segments
(3) I2C bus interface
Using two signal wires, this interface can communicate in the bus format with multiple devices. Functionally, there are devices that support only a single master and those that support multiple masters (most of the recent devices are of this type).
(4) SMB (System Management Bus)
Like the I2C bus, this interface uses a bus employing two signal wires, and can be set to be compatible with the I2C bus. It is built in some devices.
(5) CAN (Controller Area Network)
This bus is primarily used in devices that are installed in automobiles. There are several types of interfaces, depending on the standards they support.
This bus is also primarily used in devices that are installed in automobiles, but cover lower transfer rates than CAN. The controller built into a microcontroller is usually a subset version.