IIC接口E2PROM(AT24C64) 读写VERILOG 驱动源码+仿真激励文件:module i2c_dri #( parameter SLAVE_ADDR = 7'b1010000 , //EEPROM从机地址 parameter CLK_FREQ = 26'd50_000_000, //模块输入的时钟频率 parameter I2C_FREQ = 18'd250_000 //IIC_SCL的时钟频率 ) ( input clk , input rst_n , //i2c interface input i2c_exec , //I2C触发执行信号 input bit_ctrl , //字地址位控制(16b/8b) input i2c_rh_wl , //I2C读写控制信号 input [15:0] i2c_addr , //I2C器件内地址 input [ 7:0] i2c_data_w , //I2C要写的数据 output reg [ 7:0] i2c_data_r , //I2C读出的数据 output reg i2c_done , //I2C一次操作完成 output reg i2c_ack , //I2C应答标志 0:应答 1:未应答 output reg scl , //I2C的SCL时钟信号 inout sda , //I2C的SDA信号 //user interface output reg dri_clk //驱动I2C操作的驱动时钟 );//localparam definelocalparam st_idle = 8'b0000_0001; //空闲状态localparam st_sladdr = 8'b0000_0010; //发送器件地址(slave address)localparam st_addr16 = 8'b0000_0100; //发送16位字地址localparam st_addr8 = 8'b0000_1000; //发送8位字地址localparam st_data_wr = 8'b0001_0000; //写数据(8 bit)localparam st_addr_rd = 8'b0010_0000; //发送器件地址读localparam st_data_rd = 8'b0100_0000; //读数据(8 bit)localparam st_stop = 8'b1000_0000; //结束I2C操作//reg definereg sda_dir ; //I2C数据(SDA)方向控制reg sda_out ; //SDA输出信号reg st_done ; //状态结束reg wr_flag ; //写标志reg [ 6:0] cnt ; //计数reg [ 7:0] cur_state ; //状态机当前状态reg [ 7:0] next_state; //状态机下一状态reg [15:0] addr_t ; //地址reg [ 7:0] data_r ; //读取的数据reg [ 7:0] data_wr_t ; //I2C需写的数据的临时寄存reg [ 9:0] clk_cnt ; //分频时
标签: iic 接口 e2prom at24c64 verilog 驱动 仿真
上传时间: 2021-11-05
上传用户:
FPGA读取OV5640摄像头数据并通过VGA或LCD屏显示输出的Verilog逻辑源码Quartus工程文件+文档说明,FPGA型号Cyclone4E系列中的EP4CE6F17C8,Quartus版本17.1。module top( input clk, input rst_n, output cmos_scl, //cmos i2c clock inout cmos_sda, //cmos i2c data input cmos_vsync, //cmos vsync input cmos_href, //cmos hsync refrence,data valid input cmos_pclk, //cmos pxiel clock output cmos_xclk, //cmos externl clock input [7:0] cmos_db, //cmos data output cmos_rst_n, //cmos reset output cmos_pwdn, //cmos power down output vga_out_hs, //vga horizontal synchronization output vga_out_vs, //vga vertical synchronization output[4:0] vga_out_r, //vga red output[5:0] vga_out_g, //vga green output[4:0] vga_out_b, //vga blue output sdram_clk, //sdram clock output sdram_cke, //sdram clock enable output sdram_cs_n, //sdram chip select output sdram_we_n, //sdram write enable output sdram_cas_n, //sdram column address strobe output sdram_ras_n, //sdram row address strobe output[1:0] sdram_dqm, //sdram data enable output[1:0] sdram_ba, //sdram bank address output[12:0] sdram_addr, //sdram address inout[15:0] sdram_dq //sdram data);
上传时间: 2021-12-18
上传用户:
基于FPGA设计的字符VGA LCD显示实验Verilog逻辑源码Quartus工程文件+文档说明,通过字符转换工具将字符转换为 8 进制 mif 文件存放到单端口的 ROM IP 核中,再从ROM 中把转换后的数据读取出来显示到 VGA 上,FPGA型号Cyclone4E系列中的EP4CE6F17C8,Quartus版本17.1。module top( input clk, input rst_n, //vga output output vga_out_hs, //vga horizontal synchronization output vga_out_vs, //vga vertical synchronization output[4:0] vga_out_r, //vga red output[5:0] vga_out_g, //vga green output[4:0] vga_out_b //vga blue );wire video_clk;wire video_hs;wire video_vs;wire video_de;wire[7:0] video_r;wire[7:0] video_g;wire[7:0] video_b;wire osd_hs;wire osd_vs;wire osd_de;wire[7:0] osd_r;wire[7:0] osd_g;wire[7:0] osd_b;assign vga_out_hs = osd_hs;assign vga_out_vs = osd_vs;assign vga_out_r = osd_r[7:3]; //discard low bit dataassign vga_out_g = osd_g[7:2]; //discard low bit dataassign vga_out_b = osd_b[7:3]; //discard low bit data//generate video pixel clockvideo_pll video_pll_m0( .inclk0 (clk ), .c0 (video_clk ));color_bar color_bar_m0( .clk (video_clk ), .rst (~rst_n ), .hs (video_hs ), .vs (video_vs ), .de (video_de ), .rgb_r (video_r ), .rgb_g (video_g ), .rgb_b (video_b ));osd_display osd_display_m0( .rst_n (rst_n ), .pclk (video_clk ), .i_hs (video_hs ), .i_vs (video_vs ), .i_de (video_de ), .i_data ({video_r,video_g,video_b} ), .o_hs (osd_hs ), .o_vs (osd_vs ), .o_de (osd_de ), .o_data ({osd_r,osd_g,osd_b} ));endmodule
上传时间: 2021-12-18
上传用户:
基于FPGA设计的vga显示测试实验Verilog逻辑源码Quartus工程文件+文档说明,FPGA型号Cyclone4E系列中的EP4CE6F17C8,Quartus版本17.1。module top( input clk, input rst_n, //vga output output vga_out_hs, //vga horizontal synchronization output vga_out_vs, //vga vertical synchronization output[4:0] vga_out_r, //vga red output[5:0] vga_out_g, //vga green output[4:0] vga_out_b //vga blue );wire video_clk;wire video_hs;wire video_vs;wire video_de;wire[7:0] video_r;wire[7:0] video_g;wire[7:0] video_b;assign vga_out_hs = video_hs;assign vga_out_vs = video_vs;assign vga_out_r = video_r[7:3]; //discard low bit dataassign vga_out_g = video_g[7:2]; //discard low bit dataassign vga_out_b = video_b[7:3]; //discard low bit data//generate video pixel clockvideo_pll video_pll_m0( .inclk0(clk), .c0(video_clk));color_bar color_bar_m0( .clk(video_clk), .rst(~rst_n), .hs(video_hs), .vs(video_vs), .de(video_de), .rgb_r(video_r), .rgb_g(video_g), .rgb_b(video_b));endmodule
标签: fpga vga显示 verilog quartus
上传时间: 2021-12-19
上传用户:kingwide
FPGA Verilog HDL设计温度传感器ds18b20温度读取并通过lcd1620和8位LED数码管显示的QUARTUS II 12.0工程文件,包括完整的设计文件.V源码,可以做为你的学习及设计参考。module ds18b20lcd1602display ( Clk, Rst, DQ, //18B20数据端口 Txd, //串口发送端口 LCD_Data, //lcd LCD_RS, LCD_RW, LCD_En, SMData, //数码管段码 SMCom //数码管位码 );input Rst,Clk;output Txd,LCD_RS,LCD_En,LCD_RW;inout DQ;output[7:0] LCD_Data;output[7:0] SMData;output[3:0] SMCom;wire DataReady;//测温完成信号wire [15:0] MeasureResult;//DS18B20测温结果reg [15:0] Temperature;//产生LCD的位码和段码LCD1602Display Gen_LCD(.resetin(Rst),.clkin(Clk),.Data16bIn(Temperature),.lcd_data(LCD_Data),.lcd_rs(LCD_RS),.lcd_rw(LCD_RW),.lcd_e(LCD_En)/*,.SMCom(SMCom)*/);//DS18B20测温和发送 DS18B20 TmpMeasureAndTx(.Rst(Rst),.Clk(Clk),.DQ(DQ),.Txd(Txd),.FinishFlag(DataReady),.Data16b(MeasureResult));//产生数码管的位码和段码SMDisplay Gen_SM(.Rst(Rst),.
标签: fpga verilog hdl 温度传感器 ds18b20 lcd1620 数码显示
上传时间: 2022-01-30
上传用户:
spi 通信的master部分使用的verilog语言实现,可以做为你的设计参考。module spi_master(rstb,clk,mlb,start,tdat,cdiv,din, ss,sck,dout,done,rdata); input rstb,clk,mlb,start; input [7:0] tdat; //transmit data input [1:0] cdiv; //clock divider input din; output reg ss; output reg sck; output reg dout; output reg done; output reg [7:0] rdata; //received dataparameter idle=2'b00; parameter send=2'b10; parameter finish=2'b11; reg [1:0] cur,nxt; reg [7:0] treg,rreg; reg [3:0] nbit; reg [4:0] mid,cnt; reg shift,clr;
上传时间: 2022-02-03
上传用户:
verilog实现I2C通信的slave模块源码状态机设位计可做I2C接口的仿真模型//`timescale 1ns/1psmodule I2C_slv (input [6:0] slv_id,input RESET,input scl_i, //I2C clkinput sda_i, //I2C data ininput [7:0] I2C_RDDATA,////////////////////////output reg sda_o, //I2C data outoutput reg reg_w, //reg write enable pulse (1T of scl_i)output reg [7:0] I2C_ADDR,output reg [7:0] I2C_DATA); parameter ST_ADDR = 4'd0; parameter ST_ACK = 4'd1; parameter ST_WDATA1 = 4'd2; parameter ST_WACK1 = 4'd3; parameter ST_WDATA2 = 4'd4; parameter ST_WACK2 = 4'd5; parameter ST_WDATA3 = 4'd6; parameter ST_WACK3 = 4'd7; parameter ST_RDATA1 = 4'd8; parameter ST_RACK1 = 4'd9; parameter ST_IDLE = 4'd15;//---------------------------------------------------------------------------// Signal Declaration//--------------------------------------------------------------------------- reg i2c_start_n, i2c_stop_n; //wire RESET_scl; wire i2c_stp_n, i2c_RESET; reg [3:0] i2c_cs, i2c_ns; reg [3:0] cnt_bit; reg [7:0] d_vec; reg i2c_rd, i2c_ack; reg [7:0] I2C_RDDATA_latch;
上传时间: 2022-02-03
上传用户:
文档资料 - 0视频教程 - 0工具 - 0ESP8266开发板例程_基于NON-OS_SDK.zip - 273.05MB深蓝串口调试工具(支持UTF-8) - 0乐鑫开发环境搭建 - 0技小新_MQTT单片机编程小工具 - 0UTF-8串口助手 - 0tcp调试助手 - 0SER-NET - 0MQTT_FX客户端 - 0flash_download_tools_v3.6.3 - 0flash_download_tools_v3.6.3.rar - 6.61MBmqttfx-1.7.0-windows-x64 - 0
标签: esp8266
上传时间: 2022-06-05
上传用户:trh505
STM32F驱动L6470 ■ Operating voltage: 8 - 45 V■ 7.0 A out peak current (3.0 A r.m.s.)■ Low RDS(on) Power MOSFETs■ Programmable speed profile and positioning■ Programmable power MOS slew rate■ Up to 1/128 microstepping■ Sensorless stall detection■ SPI interface■ Low quiescent and standby currents■ Programmable non-dissipative overcurrentprotection on high and low-side■ Two levels of overtemperature protection
标签: l6470
上传时间: 2022-07-25
上传用户:kingwide
This release supports Microsoft Windows NT 4.0, Windows 2000, Windows 95, Windows 98, Windows Me, Windows XP, Red Hat Linux 6.1, Red Hat Linux 7.2, Solaris 2.6, 2.7 (7.0), 8.0, HP-UX 10.20, and 11 (see important note below)." multice22.rar
上传时间: 2013-05-15
上传用户:eeworm