Serial port and microcontrollers: Principles, circuits, and source codes