ARM Serial Interface Circuit

Publisher:东土大唐88Latest update time:2015-11-17 Source: eefocusKeywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
*In the field of communications, there are two types of data communication: parallel communication and serial communication
*Serial port data transmission is carried out in serial mode. In data communication, the serial port only transmits one bit of data at a time.
*The transmission speed of serial data is described in bps or baud rate
 
UART
When sending data, the CPU writes the data into the UART, and the UART sends it out from a serial port on a pin TxD according to a certain format;
When receiving data, the UART detects the signal on another pin RxD and puts the serial data in a buffer so that the CPU can read it.
(UARTs transmit data in full-duplex mode)
 
UART uses standard TTL/CMOS logic levels to represent data
*0-5v, 0-3.3v, 0-2.5v or 0-1.8v
*High level means 1, low level means 0
 
However, in the peripheral level, in order to enhance the data's anti-interference ability and increase the transmission length, the TTL/CMOS logic level is usually converted to the RS-232 logic level. For example, the level conversion chip can be used: MAX3232
RS-232 logic level (inverse logic)
3-12V: indicates 0
-3~-12V: indicates 1
 
Preparation before data transmission (agree on baud rate and transmission format)
*How many data bits are there?
*Whether to use check digit
*Is it odd or even parity?
*How many stop bits are there?
【Odd/Even Parity】
Odd parity check: It means that the number of 1s in the original data sequence (including the bit you want to add) is an odd number;
1000110 (0) You must add 0 so that the original 3 1s are already an odd number, so adding 0 still makes it an odd number;
Even parity: It means that the number of 1s in the original data sequence (including the bit you want to add) is an even number;
1000110 (1) You must add 1 so that the original 3 1s are already an odd number, so adding 1 still makes it an odd number;
【Stop bit】
Idle bits between valid frames;
 
【Asynchronous data transmission method】
【ARM Serial Interface Circuit】
 
When sending data, the SOC first writes the data into the transmit FIFO, and then the UART automatically copies the FIFO data to the transmit shifter, which sends the data one bit at a time to the TxDn data line.
When receiving data, the receive shifter receives the data on the RxDn data line one bit at a time, and then copies it to the receive FIFO, from which the SOC can read the data.
 
Hardware flow control
*If serial port hardware flow control is turned on, serial port A can send data only after nCTS is activated (nRTS of serial port B);
*When serial port A can receive data, activate nRTS and prepare to receive data
【ARM Serial Interface Circuit】

【UBRDIVn】
* In the UART module, there are three UART baud rate divisor registers UBRDIV0, UBRDIV1, UBRDIV2. The value stored in the baud rate divisor register UBRDIVn is used to determine the baud rate.
UBRDIVn = (int)(UART Clock / (buad rate*16))- 1
 
【ULCON】
 
【ARM Serial Interface Circuit】
 
【UCONn】(Select UART clock source, set UART interrupt mode)
 
【ARM Serial Interface Circuit】
 
[UFCONn] (This register is used to set whether to use FIFO and set the trigger depth of each FIFO)
 
[UTRSTATn register]
(Used to indicate whether the data has been sent and whether the data has been received)
【ARM Serial Interface Circuit】
 
 

【UTXHn/URXHn】
UTXHn register: SOC writes data to this register, UART saves it to the transmit shift register and automatically sends it out
URXHn register: When UART receives data, SOC reads this register to obtain the data.
Keywords:ARM Reference address:ARM Serial Interface Circuit

Previous article:ARM·Power circuit/Reset circuit/GPIO
Next article:ARM UART initialization program

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号