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;
標簽:
verilog
i2c
通信
slave
上傳時間:
2022-02-03
上傳用戶:
隨著科技發展及工業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
上傳用戶: