LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using SDA pin in I2C

I'm trying to use (pin34) "which is the SDA pin in I2C in myRIO" as a digital output first then use the I2C icon to start sending and receiving data between the i2c device and myRIO but it sends an error "363008" which says pin 34 is already specified as an output pin so i need to find a way to reset this pin after i send a signal on it to use it in the I2C icon..any help??

0 Kudos
Message 1 of 5
(2,601 Views)

Hi Mouhanaddmansour,

 

Make sure you configure the mode for read/write just to make sure it works bidirectionally.  

http://zone.ni.com/reference/en-XX/help/373925C-01/myrioreference/myrioref_exp_i2c/

 

Regards,

PedroR

0 Kudos
Message 2 of 5
(2,570 Views)

Thanks for your reply:), how can this help if i want to pull the SDA line high for a certain time while the SCL line is low during this time

0 Kudos
Message 3 of 5
(2,566 Views)

This is actually what i mean 🙂

0 Kudos
Message 4 of 5
(2,563 Views)

You are welcome 🙂 is that initial low and high level on those pins part of the I2C protocol or is it just for your device? The myRIO I2C functions comply with the I2C protocol so you shouldn't need to worry about those initial states. 

 

In the case this is not expected of the protocol, you could modify the FPGA code of the link below but this will be extremely complicated.

http://www.ni.com/example/29063/en/

 

Regards,

PedroR

0 Kudos
Message 5 of 5
(2,556 Views)