
KỸ THUẬT LẬP TRÌNH HỆ CƠ ĐIỆN TỬ
Programming Engineering in Mechatronics
1
TRƯỜNG ĐẠI HỌC BÁCH KHOA HÀ NỘI
Giảng viên: TS. Nguyễn Thành Hùng
Đơn vị: Bộ môn Cơ điện tử, Viện Cơ khí
Hà Nội, 2018

2
Chapter V. Hardware Interface Programming
❖1. Introduction
❖2. Serial Port
❖3. Read Data
❖4. Send Data
❖5. Real-Time Data Transfer
❖6. Digital Image Processing

3
1. Introduction
❖A hardware interface specifies the plugs, sockets, cables and electrical
signals that pass through each line between the CPU and a peripheral
device or communications network.
➢The CPU socket on the motherboard determines which CPU chips can be
used in the computer.
➢Peripheral cards, such as a high-end graphics cards, plug into the bus on
the motherboard. The most common buses are PCI and PCI Express.
https://www.pcmag.com/encyclopedia/term/51988/standards-hardware-interfaces

4
1. Introduction
❖The most widely used hardware interface for attaching external devices to
computers is USB. It connects printers, cameras, music players, flash drives
and auxiliary hard and optical drives.
❖FireWire is also used for camcorders and hard disks.
❖In addition, SATA is a common hard drive and optical drive interface.
❖The GPIB IEEE 488 standard is used for process control instruments.
❖The de facto standard for connecting devices to local networks (LANs) is
Ethernet, which is also used to hook up a cable or DSL modem.
https://www.pcmag.com/encyclopedia/term/51988/standards-hardware-interfaces

5
2. Serial Port
❖Serial ports provide an easy way to communicate between many types
of hardware and your computer.
❖They are relatively simple to use and are very common among
peripherals and especially DIY projects.
❖Many platforms such as Arduino have built in serial communication so
they are really easy to set up and use.
❖Many times you may want your project to communicate with your
computer in order to have a cool interactive output, a neat sensor that
passes data to your computer, or anything else you could possibly
dream up.

