Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
774 Views

DE2-70 and TMP102 temperature sensor I2C

Hello, 

 

i´ve some problems getting correct values. 

I´ve implemented an I2C Master in Verilog to get the temp values out of tmp102 module. 

 

 

1. I transmit the address of the tmp102 and it response with an ACK. 

 

2. After I receive the ACK I set the inout wire to z so that the tmp102 is able to manipulate the bus. 

 

3. I receive the correct temp 00011101 = 29C° (right now in Germany) on the oscilloscpe(TDS210) but the transmitted 0 are 0,640V high. 

Thats as high as my z Value and my FPGA read this 0,540V as 1. 

 

BUT the ACK is the one and only correct 0 = 0V. 

 

In the end I´ve correct 0 = 0V , 1 = 3,3V and z = 0,640V from my FPGA and the correct 1 = 3,3V and wrong 0 = 0,640V from my tmp102 module. 

 

 

Code. 

 

The inout sda is connected to a tristate register assign sda = (en) ? puffer : 1'bz;

 

en is my enable register that is set to 0 after transmitting the adress and to 1 if I want to send something. 

puffer is my data register which I feed with addresses and everything else I wand to transmit on the sda bus. 

 

 

 

Does anyone have an idea how to pull the incorrect 0 to 0V or to tell my fpga to interpret this 0,640V as 0 and not 1? 

 

I already tried resistors from 120MOhm to 1KOhm but it pulls both my 3,3V to 2V and my 0,640V down to 0,540V with the same results.
0 Kudos
0 Replies
Reply