FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
4958 Discussions

about I2C module in the DE2_TV demo

Altera_Forum
Honored Contributor I
767 Views

hi: 

Now,I have being study the DE2_TV,which is one of the DE2 board demo,in I2C_controller module,I have some problem as follows: 

 

////////////////////////////////////////////////// 

wire I2C_SDAT=SDO?1'bz:0 ; 

case (SD_COUNTER) 

6'd0 : begin ACK1=0 ;ACK2=0 ;ACK3=0 ; END=0; SDO=1; SCLK=1;end 

//start 

6'd1 : begin SD=I2C_DATA;SDO=0;end 

6'd2 : SCLK=0; 

//SLAVE ADDR 

6'd3 : SDO=SD[23]; 

6'd4 : SDO=SD[22]; 

6'd5 : SDO=SD[21]; 

6'd6 : SDO=SD[20]; 

6'd7 : SDO=SD[19]; 

6'd8 : SDO=SD[18]; 

6'd9 : SDO=SD[17]; 

6'd10 : SDO=SD[16];  

6'd11 : SDO=1'b1;//ACK 

/////////////////////////////////////////////////// 

in the code above: I cannot understand the code "SDO=SD",because if sd==1,I2C_SDAT will be "z",so how to output slave address?  

 

thanks
0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
71 Views
Reply