Asynchronous communication
The so-called asynchronous communication means that data is transmitted in characters. The transmission between characters is completely asynchronous, while the transmission between bits is basically synchronous.
The characteristics of asynchronous serial communication can be summarized as follows
1) Transmit information in characters
2) The interval between two adjacent characters is of any length
3) Because the bits in a character are limited in length, the required receiving clock and sending clock only need to be close.
4) The characteristics of the asynchronous mode are: asynchronous between characters, and synchronous within each character
Asynchronous serial data format
1) 1 start bit, defined as low level 0
2) 5 to 8 data bits, i.e. valid information to be transmitted
3) 1 parity bit
4) 1~2 stop bits, specified as high level 1
Synchronous Serial
The so-called synchronous communication means that data transmission is based on data blocks (a group of characters), and the characters and the bits within the characters are synchronized.
The characteristics of synchronous serial communication can be summarized as follows:
1) Transmit information in blocks
2) In a data block (information frame), there is no space between characters.
3) Because a transmitted data block contains a lot of data, the receiving clock and the sending clock are strictly synchronized, usually with a synchronous clock
Data format of synchronous serial mode
1) Two synchronization characters are used as the start mark of a data block (information frame).
2) n consecutively transmitted data
3) Two-byte cyclic redundancy check code (CRC)
example
#include "2410lib.h"
void uart0_test(void);
int main(int argc, char **argv)
{
sys_init();
uart_printf("n Embest Arm S3CEB2410 Evaluation Boardn");
while(1)
{
uart0_test();
}
}
void uart0_test()
{
char cInput[256];
UINT8T ucInNo=0;
char c;
uart_init(0,115200,0);
uart_printf("n UART0 Communication Test Examplen");
uart_printf("Please input words, then press Enter:n");
while(1)
{
c=uart_getch();
uart_printf("%c",c);
if(c!='r') //enter key
cInput[ucInNo++]=c;
else
{
cInput[ucInNo]='';
break;
}
}
delay(1000);
uart_printf("n The words that you input are: n %sn",cInput);
uart_printf(" end.n");
}
Previous article:Smart home appliance remote monitoring system based on CAN bus
Next article:S3c2440 bare metal realizes picture display
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- How Lucid is overtaking Tesla with smaller motors
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- 【TGF4042 Signal Generator】+ Unboxing Review
- 【Smart Sports Watch】Work Submission
- TMS320F2812 complete program to implement SVPWM
- You no longer have to go to Shandong to learn how to operate an excavator!
- C Language Manual
- A well-known MCU foreign company in Shanghai needs an automated test development engineer
- How to Reduce EMI in Switching Power Supplies
- Bluetooth Low Energy has great potential to improve the user experience of car access control systems
- Ask the master to judge
- MSP430F5529 Getting Started with Small Examples