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
上傳用戶:
CH341系列編程器芯片usb轉串口Altium Designer AD原理圖庫元件庫CSV text has been written to file : 1.9 - CH341系列編程器芯片.csvLibrary Component Count : 56Name Description----------------------------------------------------------------------------------------------------CH311Q PC debug port monitorCH331T Mini USB Disk ControllerCH340G CH340H USB to TTL Serial / UART, USB to IrDACH340T USB to TTL Serial / UART, USB to IrDACH340R USB to IrDA, USB to RS232 SerialCH340S_P USB to Print Port / ParallelCH340S_S USB to TTL Serial / UART, pin compatible with CH341CH341A_S USB to TTL Serial / UART / I2C/IICCH341S_P USB to Print Port / ParallelCH341A_P USB to Print Port / ParallelCH341S_S USB to TTL Serial / UARTCH341S_X USB to EPP Parallel / SPI / I2C/IICCH341A_X USB to EPP Parallel / SPI / I2C/IICCH341T USB to TTL Serial / UART / I2C/IICCH345T USB to MidiCH352L_M PCI to 8255 mode 2 Parallel for MCU and 16C550 UART / IrDACH352L_P PCI to Print Port / Parallel and 16C550 UART / IrDACH352L_S PCI to Dual 16C550 UART, TTL Serial*2 / IrDA*1CH362L PCI Device / Slave only for RAM / Expansion ROMCH364F Member of CH364 chipsetsCH364P PCI Device / Slave Embedded Flash ROM, for Expansion ROMCH365P PCI Device / Slave, for I/O port or RAM / ROMCH372T USB Device / Slave for MCU, ParallelCH372A USB Device / Slave for MCU, ParallelCH372V USB Device / Slave for MCU, ParallelCH374S USB Host & Device / Slave for MCU, parallel / SPICH374T USB Host & Device / Slave for MCU, parallel / SPICH375S USB Host & Device / Slave for MCU, parallel / UART SerialCH375A USB Host & Device / Slave for MCU, parallel / UART SerialCH375V USB Host & Device / Slave for MCU, parallel / UART SerialCH411G FDC MFM encode and decodeCH421A Dual port bufferCH421S Dual port bufferCH423D I2C/IIC I/O expander, 16 GPO + 8 GPIO, 128 LEDs DriveCH423S I2C/IIC I/O expander, 16 GPO + 8 GPIO, 128 LEDs DriveCH423D_D I2C/IIC I/O expander, 16 GPO + 8 GPIO, 128 LEDs DriveCH423S_D I2C/IIC I/O expander, 16 GPO + 8 GPIO, 128 LEDs DriveCH423G I2C/IIC I/O expander, 6 GPO + 5 GPIOCH432Q Dual 16C550 UART with IrDA, parallel / SPICH432T SPI Dual 16C550 UART with IrDACH450K 6 Digits / 48 LEDs Drive & 8x6 Keyboard, I2C/IICCH450H 6 Digits / 48 LEDs Drive & 8x6 Keyboard, I2C/IICCH450L 8 Digits / 64 LEDs Drive & 8x8 Keyboard, I2C/IICCH451L 8 Digits / 64 LEDs Drive & 8x8 Keyboard, 4 Wire Interface, SPICH451S 8 Digits / 64 LEDs Drive & 8x8 Keyboard, 4 Wire Interface, SPICH451D 8 Digits / 64 LEDs Drive & 8x8 Keyboard, 4 Wire Interface, SPICH452L_2 8 Digits / 64 LEDs Drive & 8x8 Keyboard, I2C/IICCH452L_4 8 Digits / 64 LEDs Drive & 8x8 Keyboard, 4 Wire Interface, SPICH452S_2 8 Digits / 64 LEDs Drive & 8x8 Keyboard, I2C/IICCH452S_4 8 Digits / 64 LEDs Drive & 8x8 Keyboard, 4 Wire Interface, SPICH453S 16 Digits / 128 LEDs Drive, I2C/IICCH453D 16 Digits / 128 LEDs Drive, I2C/IICPCI 32Bit PCI Bus, simple / short cardPCI32 32Bit PCI BusUSB USB Port
標簽:
ch341
編程芯片
usb
串口
altium designer
上傳時間:
2022-03-13
上傳用戶:
目前電動汽車主要以鋰電池作為動力來源,為了提高鋰電池的使用時間和安全性,為鋰電池提供安全良好的運行環境,電池管理系統應運而生。BMS主控單元基于S32K144汽車級單片機,通過主從式網絡控制結構能夠對鋰電池的各個參數進行采集與分析。采用擴展卡爾曼濾波對電池的荷電狀態(SOC)進行估算,克服普通估算方法無法避免電池內阻誤差的缺點,通過Matlab/Simulink軟件仿真驗證可使估算誤差達到2%以內。At present,electric vehicles mainly use lithium batteries as the power source.In order to improve the running time and safety of lithium batteries,a safe and good operating environment for power batteries is provided,and a battery management system(BMS) has emerged.The BMS main control unit is based on the S32K144 automotive-grade control chip.Through the master-Slave network control structure,it can collect and analyze the various parameters of the lithium battery.The Extended Kalman Filter(EKF) is used to estimate the state of charge(SOC) of the battery,which overcomes the shortcomings of the internal estimation method that cannot overcome the internal resistance error of the battery.It can be verified by Matlab/Simulink software simulation.The estimation error is within 2%.
標簽:
s32k144
bms
上傳時間:
2022-03-26
上傳用戶:XuVshu
隨著科技發展及工業4.0 進程推進,機械臂應用范圍越來越廣,并演化出各種各樣的機械臂,如碼垛機械臂、焊接機械臂、裝配機械臂以及手術機械臂等。現利用solidworks 進行三維建模,設計制作一款基于stm32f103c8t6 單片機的主從式桌面級機械臂,該機械臂包括一個主動機械臂和一個從動機械臂,采用藍牙傳輸信號方式進行同步運動,并且詳細介紹了該機械臂材料選擇、結構設計、工作原理、組成部分和設計特點。With the development of science and technology and the advancement of Industry 4.0, the application range of the mechanical arm has become wider and wider, and various types of mechanical arms, such as palletizing robot arms, welding robot arms, assembly robot arms, and surgical robot arms, have been developed. Now using solidworks for 3D modeling, design and manufacture a master-Slave desktop-level robot arm based on stm32f103c8t6 single-chip microcomputer. The robot arm includes an active robot arm and a Slave robot arm, which uses Bluetooth to transmit signals for synchronous motion. The material selection, structural design, working principle, components and design features of the manipulator are introduced.
標簽:
stm32f103c8t6
單片機
上傳時間:
2022-03-27
上傳用戶: