Temperature Sensor Error...

M

Mezanur Rahman

Guest
Hi everyone, I\'m trying to implement the following code on the NEXYS A7 board and it seems the I2C communication isn\'t working properly.

https://github.com/bdeloeste/Nexys-4-Temperature-Sensor--ADT-7420/blob/master/VGA%20Module/vga_temp_sensor.srcs/sources_1/new/I2C_temp.v

this my constraint file ===================================>

## clock
set_property -dict { PACKAGE_PIN E3 IOSTANDARD LVCMOS33 } [get_ports { clk }];
create_clock -add -name sys_clk_pin -period 10.00 -waveform {0 5} [get_ports {clk}];

## Led
set_property -dict { PACKAGE_PIN H17 IOSTANDARD LVCMOS33 } [get_ports { led[0] }];
set_property -dict { PACKAGE_PIN K15 IOSTANDARD LVCMOS33 } [get_ports { led[1] }];
set_property -dict { PACKAGE_PIN J13 IOSTANDARD LVCMOS33 } [get_ports { led[2] }];
set_property -dict { PACKAGE_PIN N14 IOSTANDARD LVCMOS33 } [get_ports { led[3] }];
set_property -dict { PACKAGE_PIN R18 IOSTANDARD LVCMOS33 } [get_ports { led[4] }];
set_property -dict { PACKAGE_PIN V17 IOSTANDARD LVCMOS33 } [get_ports { led[5] }];
set_property -dict { PACKAGE_PIN U17 IOSTANDARD LVCMOS33 } [get_ports { led[6] }];
set_property -dict { PACKAGE_PIN U16 IOSTANDARD LVCMOS33 } [get_ports { led[7] }];
set_property -dict { PACKAGE_PIN V16 IOSTANDARD LVCMOS33 } [get_ports { led[8] }];
set_property -dict { PACKAGE_PIN T15 IOSTANDARD LVCMOS33 } [get_ports { led[9] }];
set_property -dict { PACKAGE_PIN U14 IOSTANDARD LVCMOS33 } [get_ports { led[10] }];
set_property -dict { PACKAGE_PIN T16 IOSTANDARD LVCMOS33 } [get_ports { led[11] }];
set_property -dict { PACKAGE_PIN V15 IOSTANDARD LVCMOS33 } [get_ports { led[12] }];
set_property -dict { PACKAGE_PIN V14 IOSTANDARD LVCMOS33 } [get_ports { led[13] }];
set_property -dict { PACKAGE_PIN V12 IOSTANDARD LVCMOS33 } [get_ports { led[14] }];
set_property -dict { PACKAGE_PIN V11 IOSTANDARD LVCMOS33 } [get_ports { led[15] }];

##7 segment display
set_property -dict { PACKAGE_PIN T10 IOSTANDARD LVCMOS33 } [get_ports { sseg_temp[0] }];
set_property -dict { PACKAGE_PIN R10 IOSTANDARD LVCMOS33 } [get_ports { sseg_temp[1] }];
set_property -dict { PACKAGE_PIN K16 IOSTANDARD LVCMOS33 } [get_ports { sseg_temp[2] }];
set_property -dict { PACKAGE_PIN K13 IOSTANDARD LVCMOS33 } [get_ports { sseg_temp[3] }];
set_property -dict { PACKAGE_PIN P15 IOSTANDARD LVCMOS33 } [get_ports { sseg_temp[4] }];
set_property -dict { PACKAGE_PIN T11 IOSTANDARD LVCMOS33 } [get_ports { sseg_temp[5] }];
set_property -dict { PACKAGE_PIN L18 IOSTANDARD LVCMOS33 } [get_ports { sseg_temp[6] }];
set_property -dict { PACKAGE_PIN H15 IOSTANDARD LVCMOS33 } [get_ports { dp }];
set_property -dict { PACKAGE_PIN J17 IOSTANDARD LVCMOS33 } [get_ports { an[0] }];
set_property -dict { PACKAGE_PIN J18 IOSTANDARD LVCMOS33 } [get_ports { an[1] }];
set_property -dict { PACKAGE_PIN T9 IOSTANDARD LVCMOS33 } [get_ports { an[2] }];
set_property -dict { PACKAGE_PIN J14 IOSTANDARD LVCMOS33 } [get_ports { an[3] }];
set_property -dict { PACKAGE_PIN P14 IOSTANDARD LVCMOS33 } [get_ports { an[4] }];
set_property -dict { PACKAGE_PIN T14 IOSTANDARD LVCMOS33 } [get_ports { an[5] }];
set_property -dict { PACKAGE_PIN K2 IOSTANDARD LVCMOS33 } [get_ports { an[6] }];
set_property -dict { PACKAGE_PIN U13 IOSTANDARD LVCMOS33 } [get_ports { an[7] }];

##Temperature Sensor
set_property -dict { PACKAGE_PIN C14 IOSTANDARD LVCMOS33 } [get_ports { SCL }];
set_property -dict { PACKAGE_PIN C15 IOSTANDARD LVCMOS33 } [get_ports { SDA }];
 
On Wednesday, December 16, 2020 at 12:29:10 PM UTC-5, bk2...@gmail.com wrote:
Hi everyone, I\'m trying to implement the following code on the NEXYS A7 board and it seems the I2C communication isn\'t working properly.

https://github.com/bdeloeste/Nexys-4-Temperature-Sensor--ADT-7420/blob/master/VGA%20Module/vga_temp_sensor.srcs/sources_1/new/I2C_temp.v

this my constraint file ===================================

## clock
set_property -dict { PACKAGE_PIN E3 IOSTANDARD LVCMOS33 } [get_ports { clk }];
create_clock -add -name sys_clk_pin -period 10.00 -waveform {0 5} [get_ports {clk}];

## Led
set_property -dict { PACKAGE_PIN H17 IOSTANDARD LVCMOS33 } [get_ports { led[0] }];
set_property -dict { PACKAGE_PIN K15 IOSTANDARD LVCMOS33 } [get_ports { led[1] }];
set_property -dict { PACKAGE_PIN J13 IOSTANDARD LVCMOS33 } [get_ports { led[2] }];
set_property -dict { PACKAGE_PIN N14 IOSTANDARD LVCMOS33 } [get_ports { led[3] }];
set_property -dict { PACKAGE_PIN R18 IOSTANDARD LVCMOS33 } [get_ports { led[4] }];
set_property -dict { PACKAGE_PIN V17 IOSTANDARD LVCMOS33 } [get_ports { led[5] }];
set_property -dict { PACKAGE_PIN U17 IOSTANDARD LVCMOS33 } [get_ports { led[6] }];
set_property -dict { PACKAGE_PIN U16 IOSTANDARD LVCMOS33 } [get_ports { led[7] }];
set_property -dict { PACKAGE_PIN V16 IOSTANDARD LVCMOS33 } [get_ports { led[8] }];
set_property -dict { PACKAGE_PIN T15 IOSTANDARD LVCMOS33 } [get_ports { led[9] }];
set_property -dict { PACKAGE_PIN U14 IOSTANDARD LVCMOS33 } [get_ports { led[10] }];
set_property -dict { PACKAGE_PIN T16 IOSTANDARD LVCMOS33 } [get_ports { led[11] }];
set_property -dict { PACKAGE_PIN V15 IOSTANDARD LVCMOS33 } [get_ports { led[12] }];
set_property -dict { PACKAGE_PIN V14 IOSTANDARD LVCMOS33 } [get_ports { led[13] }];
set_property -dict { PACKAGE_PIN V12 IOSTANDARD LVCMOS33 } [get_ports { led[14] }];
set_property -dict { PACKAGE_PIN V11 IOSTANDARD LVCMOS33 } [get_ports { led[15] }];

##7 segment display
set_property -dict { PACKAGE_PIN T10 IOSTANDARD LVCMOS33 } [get_ports { sseg_temp[0] }];
set_property -dict { PACKAGE_PIN R10 IOSTANDARD LVCMOS33 } [get_ports { sseg_temp[1] }];
set_property -dict { PACKAGE_PIN K16 IOSTANDARD LVCMOS33 } [get_ports { sseg_temp[2] }];
set_property -dict { PACKAGE_PIN K13 IOSTANDARD LVCMOS33 } [get_ports { sseg_temp[3] }];
set_property -dict { PACKAGE_PIN P15 IOSTANDARD LVCMOS33 } [get_ports { sseg_temp[4] }];
set_property -dict { PACKAGE_PIN T11 IOSTANDARD LVCMOS33 } [get_ports { sseg_temp[5] }];
set_property -dict { PACKAGE_PIN L18 IOSTANDARD LVCMOS33 } [get_ports { sseg_temp[6] }];
set_property -dict { PACKAGE_PIN H15 IOSTANDARD LVCMOS33 } [get_ports { dp }];
set_property -dict { PACKAGE_PIN J17 IOSTANDARD LVCMOS33 } [get_ports { an[0] }];
set_property -dict { PACKAGE_PIN J18 IOSTANDARD LVCMOS33 } [get_ports { an[1] }];
set_property -dict { PACKAGE_PIN T9 IOSTANDARD LVCMOS33 } [get_ports { an[2] }];
set_property -dict { PACKAGE_PIN J14 IOSTANDARD LVCMOS33 } [get_ports { an[3] }];
set_property -dict { PACKAGE_PIN P14 IOSTANDARD LVCMOS33 } [get_ports { an[4] }];
set_property -dict { PACKAGE_PIN T14 IOSTANDARD LVCMOS33 } [get_ports { an[5] }];
set_property -dict { PACKAGE_PIN K2 IOSTANDARD LVCMOS33 } [get_ports { an[6] }];
set_property -dict { PACKAGE_PIN U13 IOSTANDARD LVCMOS33 } [get_ports { an[7] }];

##Temperature Sensor
set_property -dict { PACKAGE_PIN C14 IOSTANDARD LVCMOS33 } [get_ports { SCL }];
set_property -dict { PACKAGE_PIN C15 IOSTANDARD LVCMOS33 } [get_ports { SDA }];

Was there a question in there somewhere?

--

Rick C.

- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209
 
So it is always stuck at FF value in the 7 segments, not showing any change in the temperature.
 
On Wednesday, December 16, 2020 at 1:01:01 PM UTC-5, bk2...@gmail.com wrote:
> So it is always stuck at FF value in the 7 segments, not showing any change in the temperature.

I assume that is not your intent? What do you want us to do?

--

Rick C.

+ Get 1,000 miles of free Supercharging
+ Tesla referral code - https://ts.la/richard11209
 
The owner of the code clams to implement on the NEXYS A4 board. So I don\'t have a spare board to test if it has something to do with my NEXYS A7 board or a bug in the code.
Any help will be appreciated.
 
Mezanur Rahman <bk201n@gmail.com> writes:

> So it is always stuck at FF value in the 7 segments, not showing any change in the temperature.

Well, getting 0xFF from an I2C device usually means trouble. It could
mean your pull-ups are properly in place but nothing is connected. It
could also mean your pull-ups are too hard. Or you mixed clock and
data. Or the device is bad. Or the code is bad or you mapped to wrong
pins or anything.

If you had any kind of I2C analysis tool or even an oscilloscope then
you could see what happens on the clock and data lines. There are
cheapish tools like I2CDriver if you don\'t have anything.
 
Mezanur Rahman <bk201n@gmail.com> writes:

> So it is always stuck at FF value in the 7 segments, not showing any change in the temperature.

Well, getting 0xFF from an I2C device usually means trouble. It could
mean your pull-ups are properly in place but nothing is connected. It
could also mean your pull-ups are too hard. Or you mixed clock and
data. Or the device is bad. Or the code is bad or you mapped to wrong
pins or anything.

If you had any kind of I2C analysis tool or even an oscilloscope then
you could see what happens on the clock and data lines. There are
cheapish tools like I2CDriver if you don\'t have anything.
 
On 16/12/2020 17:29:04, Mezanur Rahman wrote:
Hi everyone, I\'m trying to implement the following code on the NEXYS A7 board and it seems the I2C communication isn\'t working properly.

https://github.com/bdeloeste/Nexys-4-Temperature-Sensor--ADT-7420/blob/master/VGA%20Module/vga_temp_sensor.srcs/sources_1/new/I2C_temp.v

Does the master get a ACK from your FPGA?

Can you use ChipScope or whatever logic analyser comes with the system?


--
Mike Perkins
Video Solutions Ltd
www.videosolutions.ltd.uk
 
On 16/12/2020 17:29:04, Mezanur Rahman wrote:
Hi everyone, I\'m trying to implement the following code on the NEXYS A7 board and it seems the I2C communication isn\'t working properly.

https://github.com/bdeloeste/Nexys-4-Temperature-Sensor--ADT-7420/blob/master/VGA%20Module/vga_temp_sensor.srcs/sources_1/new/I2C_temp.v

Does the master get a ACK from your FPGA?

Can you use ChipScope or whatever logic analyser comes with the system?


--
Mike Perkins
Video Solutions Ltd
www.videosolutions.ltd.uk
 
On 16/12/2020 17:29:04, Mezanur Rahman wrote:
Hi everyone, I\'m trying to implement the following code on the NEXYS A7 board and it seems the I2C communication isn\'t working properly.

https://github.com/bdeloeste/Nexys-4-Temperature-Sensor--ADT-7420/blob/master/VGA%20Module/vga_temp_sensor.srcs/sources_1/new/I2C_temp.v

Does the master get a ACK from your FPGA?

Can you use ChipScope or whatever logic analyser comes with the system?


--
Mike Perkins
Video Solutions Ltd
www.videosolutions.ltd.uk
 
On 16/12/2020 17:29:04, Mezanur Rahman wrote:
Hi everyone, I\'m trying to implement the following code on the NEXYS A7 board and it seems the I2C communication isn\'t working properly.

https://github.com/bdeloeste/Nexys-4-Temperature-Sensor--ADT-7420/blob/master/VGA%20Module/vga_temp_sensor.srcs/sources_1/new/I2C_temp.v

Does the master get a ACK from your FPGA?

Can you use ChipScope or whatever logic analyser comes with the system?


--
Mike Perkins
Video Solutions Ltd
www.videosolutions.ltd.uk
 
On 16/12/2020 17:29:04, Mezanur Rahman wrote:
Hi everyone, I\'m trying to implement the following code on the NEXYS A7 board and it seems the I2C communication isn\'t working properly.

https://github.com/bdeloeste/Nexys-4-Temperature-Sensor--ADT-7420/blob/master/VGA%20Module/vga_temp_sensor.srcs/sources_1/new/I2C_temp.v

Does the master get a ACK from your FPGA?

Can you use ChipScope or whatever logic analyser comes with the system?


--
Mike Perkins
Video Solutions Ltd
www.videosolutions.ltd.uk
 

Welcome to EDABoard.com

Sponsor

Back
Top