STM8 microcontrollers are packed with several communication interfaces. These interfaces are needed to communicate with external devices like sensors, actuators, drives, etc. The most commonly used ones are Serial Communication (UART), Serial Peripheral Interface (SPI) and Inter-Integrated Circuit (I2C). There are also other additional more robust communication interfaces like Controller Area Network (CAN), Local Interconnect Network (LIN), Infrared Data Association (IrDA) and RS-485. The latter communications will not be discussed here in this article and are kept for future issues. These are methods are, however, not frequently used and are special forms of communications. For example, CAN and LIN are mostly used in automotive industries. Each method communication has its own advantages and disadvantages. Here we’ll see the individual basics of various methods of communications.
In STM8 microcontrollers, LIN, IrDA, RS-485 and UART all share the UART hardware peripheral. For other communications, there are dedicated separate hardware. We will now be exploring the basic ones here.