Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Honored Contributor I
720 Views

about I2C module in the DE2_TV demo

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
Highlighted
Honored Contributor I
24 Views

0 Kudos