基于CYCLONE2 FPGA设计的频率计+串口通信实验quartus9.0工程源码+文档说明资料, /******************************************************************************* ** 文件名称:uart.v ** 功能描述:串口通信__FPGA和上位机通信(波特率:9600bps,10个bit是1位起始位,8个数据位,1个结束) *******************************************************************************/ module uart( clk, rst, rxd, txd, start, data_cnt, count1, count2, count3, count4, count5, count6, count7, count8, send_finish ); input clk; //系统50MHZ时钟 input rst; //复位 input rxd; //串行数据接收端 output txd; //串行数据发送端 input start; //开始采集信号 input[3:0] data_cnt; //数据位标志 output send_finish; //发送完成标志 input [7:0] count1; input [7:0] count2; input [7:0] count3; input [7:0] count4; input [7:0] count5; input [7:0] count6; input [7:0] count7; input [7:0] count8; reg[15:0] div_reg; //分频计数器,分频值由波特率决定。分频后得到频率8倍波特率的时钟 reg[2:0] div8_tras_reg; //该寄存器的计数值对应发送时当前位于的时隙数 reg[3:0] state_tras; //发送状态寄存器 reg clkbaud_tras; //以波特率为频率的发送使能信号 reg clkbaud8x; //以8倍波特率为频率的时钟,它的作用是将发送或接受一个bit的时钟周期分为8个时隙 reg trasstart; //开始发送标志 reg send_finish; reg txd_reg; //发送寄存器 reg[7:0] rxd_buf; //接受数据缓存 reg[7:0] txd_buf; //发送数据缓存 reg[3:0] send_state; //发送状态寄存器 parameter div_par=16'h145; //分频参数,其值由对应的波特率计算而得,按此参数分频的时钟频率是波倍特率的8 //倍,此处值对应9600的波特率,即分频出的时钟频率是9600*8 (CLK50M) assign txd = txd_reg; // assign send_state=data_cnt; /*******分频得到8倍波特率的时钟*********/ always@(posedge clk ) begin if(!rst) div_reg<=0; else begin if(div_reg==div_par-1'b1) div_reg<=0; else div_reg<=div_reg+1'b1; end end always@(posedge clk) begin if(!rst) clkbaud8x<=0; else if(div_reg==div_par-1'b1) clkbaud8x<=~clkbaud8x;//分频得到8倍波特率的时钟:clkbaud8x end // *******************************/ always@(posedge clkbaud8x or negedge rst)//clkbaud8x
FPGA串口通信(Verilog编写)
2021-11-25 09:05:16 5.31MB FPGA verilog
1
用FPGA进行串口通信的代码编写,可以在modelsim上进行仿真
2021-11-12 07:26:11 6.61MB FPGA串口通信
1
串口更新FPGA程序方案,已验证
2021-10-29 10:53:23 304KB Flash配置 xilinxA7 FPGA串口更新
1
FPGA串口收发字符串之串口调度字符,有需要的同学可以下载!
2021-10-19 19:14:43 7KB FPGA串口 发送调度 串口HMI屏
1
FPGA串口多字节收发,含modelsim仿真
2021-08-11 17:17:55 6.78MB fpga 串口通信
1
FPGA 实现按键的长短按,并通过串口发送不同的码值
1
里面包含了doc,src,pro,sim等文件夹,包含了详细设计文档,仿真用例设计、测试用例设计,以及工程文件,源代码,仿真代码,脚本文件,非常详细,每一步都有详细说明,代码注释也很到位
2021-08-03 19:15:18 19.76MB uart,FPGA
1
关于FPGA在解析带有数据包协议的数据存储问题。FPGA先根据数据包协议接收数据并存储到RAM,在接收到完整一包数据后,将数据从RAM转移到FIFO中,后端的数据处理或者数据转发可以直接从FIFO读取。本代码模拟数据写入RAM,然后到FIFO过程。开发环境 Quartus18.1 ,开发语言 Verilog,仿真软件 Modelsim 6.6c
2021-07-28 11:06:04 6.33MB FPGA Verilog 串口数据存储 RAM
1
基于串口通信的FPGA步进电机多状态控制,verilog语言编写,串口软件使用一般的串口调试助手即可。本程序是本人作FPGA课程设计的,已经通过硬件测试。
2021-06-29 16:59:02 23KB FPGA、串口、步进电机控制
1