Understanding of serial communication

Publisher:素心悠远Latest update time:2022-04-21 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Serial communication can be understood as opening files, writing files, reading files, and closing files.


Using the system function open, write, read, close function


char path[20] = "dev/ser1";

if ( ( fd = open ( path, O_RDWR,S_IRUSR | S_IWUSR) ) != -1 )

Serial communication must first set the baud rate, parity, number of data bits, and stop bits.


Serial communication data is usually written in the form of a common body

Reference address:Understanding of serial communication

Previous article:51 MCU Introduction - Minimum System Design
Next article:Bit manipulation in embedded systems

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号