- 11
- 0
- 约2.66万字
- 约 20页
- 2016-04-02 发布于湖北
- 举报
IIC verilog.doc
`timescale 1ns / 1ps
module iicmax(
????????????clk,rst_n,
????????????sw1,sw2,sw3,sw4,
????????????scl,sda,
????????????leddata,ledcom
????????);
?????????
input clk;????? // 50MHz
input rst_n;??? //复位信号,低有效
input sw1,sw2,sw3,sw4;? //按键,(1按下执行写入操作,2按下执行读操作,3按下执行连写操作,4按下执行连读操作)
output scl;???? // 24C08的时钟端口
inout sda;????? // 24C08的数据端口
?
output [7:0] ledcom;??? //数码管片选信号,低有效
output [7:0] leddata;?? //7段数码管(不包括小数点)
?
?
wire[7:0] tansdata;???? //传送的数据
wire[2:0] ackflag;????? //标志
?
iiccom????? iiccom(
????????????????????.clk(clk),
????????????????????.rst_n(rst_n),
????????????????????.sw1(sw1
原创力文档

文档评论(0)