- Joined
- Aug 3, 2010
- Messages
- 1
- Reaction score
- 0
Hi everyone. Please try to bear with because I am very new to electronics in general.
I am modifying someone's VHDL project to add a bi-directional line (SDA) for use in an I2C temperature detector. The FPGA is a Spartan-3 on an Opal Kelly XEM3010 board.
The relevant ports are defined as follows:
and in the ucf file:
With this setup, I can assign values to SDA which seems to properly output values to SDA_P and SDA_N. However, I don't have any idea how to read input from the SDA line. I tried making a signal SDA_IN and adding
but that returned an error.
Thanks for reading!
I am modifying someone's VHDL project to add a bi-directional line (SDA) for use in an I2C temperature detector. The FPGA is a Spartan-3 on an Opal Kelly XEM3010 board.
The relevant ports are defined as follows:
Code:
SDA_P : inout std_logic;
SDA_N : inout std_logic;
Code:
signal SDA : std_logic;
Code:
obufds_SDA : OBUFDS
port map (
I => SDA,
O => SDA_P,
OB => SDA_N
);
Code:
NET "SDA_P" LOC = "F17" | IOSTANDARD = LVDS_25;
NET "SDA_N" LOC = "G18" | IOSTANDARD = LVDS_25;
With this setup, I can assign values to SDA which seems to properly output values to SDA_P and SDA_N. However, I don't have any idea how to read input from the SDA line. I tried making a signal SDA_IN and adding
Code:
ibufds_SDA_IN : IBUFDS
port map (
O => SDA_IN,
I => SDA_P,
IB => SDA_N
);
Thanks for reading!