1 Design Brief
UART (Universal Asynchronous Receiver Transmitter) is short for Universal Asynchronous Receiver and Transmitter. Used for communication between serial input and serial output devices. Serial transmission comes at the cost of speed, in exchange for a reduction in cost and complexity of wiring. UART provides synchronization of serial asynchronous received data, parallel-to-serial and serial-to-parallel data conversion of the transmitter and receiver, for digital systems that need to convert serial data streams to parallel data, these functions Is essential. Synchronization of the serial data stream is achieved by adding start and stop bits to the transmitted data to form a data character. Data integrity is achieved by appending a parity bit to the data character, which is provided by the receiver Check this parity bit to check whether there is any transmission bit error. It is mainly composed of data bus interface, control logic, baud rate generator, sending part and receiving part.
...
6.2Implementation of System Software Platform for UART Controller IP Design Experiment Project
在IDE 环境中如下图所示,选择sp7021工程名,单击鼠标右键在弹出的菜单中选Copy
...
接下来再次选择sp7021工程名
...
单击鼠标右键在弹出的菜单中选Paste,出现下图
...
在Project name框中填写uart_apb,完成uart_apb工程名及目录建立,如下图所示
...
接下来需要复制安装目录In the IDE environment, as shown below, select the sp7021 project name, click the right mouse button and select Copy in the pop-up menu
...
Next, select the sp7021 project name again
...
Click the right mouse button and select Paste in the pop-up menu, the following picture appears
...
Fill in the uart_apb in the Project name box to complete the establishment of the uart_apb project name and directory, as shown below
...
Next, you need to copy all the files and folders under the installation directory \SP7021\example\uart_apb下的所有文件及文件夹到上面建好的uart_apb工程目录中(路径为:安装目录 apb to the uart_apb project directory built above (the path is: installation directory \SP7021\workspace\uart_apb\), 同名文件选择覆盖,这样UART控制器 IP设计实践所需的程序代码main.c;uart.c;uart.h分别放到如下的路径中:1) 安装目录 the file with the same name is selected to be overwritten, so that the UART The program codes main.c; uart.c; uart.h required for the IP design practice of the controller are placed in the following paths:
1) Install main.c in the directory \SP7021\workspace\uart_apb\uart_apb\ 文件夹下的main.c2) 安装目录
2) Install uart.c in the directory \SP7021\workspace\uart_apb\testapi\util 文件夹下的uart.c
3) 安装目录 Install uart.h in the \SP7021\workspace\uart_apb\include\util文件夹下的uart.h最后按下图所示,鼠标选中红框1,接着点击鼠标右键出现下拉菜单,然后选中红框2,对刚才复制动作做刷新,这样刚才复制的文件就能在IDE环境中显示出来util folder
Finally, as shown in the figure below, the mouse selects the red box 1, then clicks the right mouse button to appear the drop-down menu, and then selects the red box 2, refresh the copy action just now, so that the file just copied can be displayed in the IDE environment
...
main.c
int main(void)
{
printf("Build @%s, %s\n", __DATE__, __TIME__);
...