FPGA sample - Lattice I2C IP (EFB) #2
Lattice Diamond Setting Click "IPexpress button" and select "EFB" IPX Select "Project Path" (source code files), "File Name" and "Module Output" is Verilog Click "Customize" Select Primary I2C EFB have 2 I2C controller, suggestion use primary I2C "EFB Enable" tab → "EFB Function Enable" Field → Click "Primary User" Configuration Primary I2C Speed is 400KHz Slave Address is "0001001" "I2C" tab → "Primary I2C " Field → "I2C Bus Preformance" is 400KHz → "Slave Address" is 7'b0001001 Click "Generate" to generate hardware I2C code Founad hardware I2C IPX in your project files 範例程式碼 宣告 EFB-IP /*********************************************************************** * * * EFB Module Instanitiation * *