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
上传用户:
■ High Performance, Low Power AVR® 8-Bit Microcontroller ■ Advanced RISC Architecture –120 Powerful Instructions – Most Single Clock Cycle Execution –32 x 8 General Purpose Working Registers –Fully Static Operation
标签: Atmel
上传时间: 2013-06-01
上传用户:tccc
These 8-bit shift registers feature gated serial inputs andan asynchronous clear. A LOW logic le
上传时间: 2013-06-12
上传用户:qq521
80C51 8-bit microcontroller family 4K/128 OTP/ROM/ROMless low voltage 2.7V.5.5V, low power, high speed 33 MHz
上传时间: 2013-04-24
上传用户:qweqweqwe
英文描述: 8-Bit Serial-Input/Parallel-Output Shift Register 中文描述: 8位Serial-Input/Parallel-Output移位寄存器
上传时间: 2013-04-24
上传用户:epson850
英文描述: 8-Bit Parallel In/Serial Output Shift Registers 中文描述: 8位并行/串行输出移位寄存器
上传时间: 2013-06-03
上传用户:林鱼2016
英文描述: 8-BIT SHIFT REGISTERS WITH OUTPUT LATCHES 中文描述: 8位移位寄存器与输出锁存器
上传时间: 2013-06-23
上传用户:327000306
Many 8-bit and 16-bit microcontrollers feature 10-bitinternal ADCs. A few include 12-bit ADCs, but these oftenhave poor or nonexistent AC specifi cations, and certainlylack the performance to meet the needs of an increasingnumber of applications. The LTC®2366 and its slowerspeed versions offer a high performance alternative, asshown in the AC specifi cations in Table 1. Compare theseguaranteed specifi cations with the ADC built into yourcurrent microcontroller.
上传时间: 2013-10-26
上传用户:jackandlee
很不错的教材
标签: Microcontrollers Programmig PIC bit
上传时间: 2013-11-01
上传用户:brain kung
现有基于MAX7219芯片的数码管驱动电路只适用于小尺寸LED,为扩展其使用范围,在介绍动态显示芯片MAX7219功能的基础上,提出了一个基于该芯片的8位高亮度8英寸数码管驱动电路。电路保留了MAX7219芯片的功能强大、编程简单等优点,通过74LS273锁存器和ULN2803达林顿驱动器,实现了对任意大尺寸数码管提供较高电压和电流驱动的静态显示,并亮度可调。 Abstract: The existing display-driving circuit based on MAX7219 was only applicable to small-size LED. To expand its use, based on the function introduction of dynamic display chip MAX7219, a display-driving circuit for high-brightness 8-bit LED with the size of 8-inch was proposed. The advantages of MAX7219 were retained, such as powerful function and simple programming. Static display with adjustable brightness for large-size LED with higher voltage and current was achieved with the help of 74LS273 and ULN2803.
上传时间: 2013-10-23
上传用户:31633073