verilog实现串口通信,实现PC与FPGA的串口通信,按键数码管显示。
时钟频率50MHZ,波特率115200,可以修改调整。
串口输入数据,发送到数码管上进行显示。
在vivado建立工程并综合:
顶层模块代码如下:
`timescale 1ns / 1ps
//
// Company:
// Engineer:
//
// Create Date:
// Design Name:
// Module Name: uart_disp_top
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//
module uart_disp_top(
input clk, //clock input
input rst_n, //asynchronous reset input, low active
input rx_pin, //serial data input
output [5:0] Scan_Sig,//位选信号 这里我们只用两个数码管
output [7:0]SMG_Data
);
wire [7:0] data1;
//wire [7:0] da