LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-8451 I2C -------- error 301742

Solved!
Go to solution

Well back to trying to figure out why I cannot communicate with my I2C device AMS AS5510.  Device address id = 56H.  So this error keeps generating after the I2C configuration.  Why am I having this issue?

0 Kudos
Message 1 of 9
(3,959 Views)

By the by have checked my pull ups and see both the SDA and SCL lines pulse only once to 3.3Vdc.

0 Kudos
Message 2 of 9
(3,954 Views)

Can the NI-8451 use 3.3Vdc as the pull up voltage level?

0 Kudos
Message 3 of 9
(3,950 Views)

Hi,

 

3.6V should be fine for I2C - 8451 datasheet states min pullup voltage of 2V.

 

So my guess is that your addressing is wrong. Why are you using 53 as the address when the datasheet shows the 7-bit address as 101011? This corresponds to 0x2B in hex. The last bit of the address will be based on whether you are doing a read or a write, but Labview will take care of this automatically.

 

Try using 0x2B as the address and see if that helps.

 

-CC

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 4 of 9
(3,924 Views)
Tried but no success.
0 Kudos
Message 5 of 9
(3,916 Views)

Ok, it was worth a shot. Smiley Wink

 

Can you post your VI again, but in a 2010 version so I can take a closer look at it?

 

-CC

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 6 of 9
(3,912 Views)

Thanks for your help. 

 

FYI - The device address is 56hex so the address value in the vi is 2Bh. 

0 Kudos
Message 7 of 9
(3,908 Views)
Solution
Accepted by dg_lbe

Hello dg_lbe,

 

When we see this error, 9 out 10 times the issue is related to something occurring at the physical level of the system.  Recheck the pullup resistors (what value are you using in this setup?) and look to see if there are any errant connections to ground.

 

Just to cover all of our bases, could you provide a description of the circuit's layout?  Which pins of the 8451 are connected to which interfaces of the AS5510?

 

The error is basically telling us "I tried to use this line, but I couldn't gain control of it or pull it up."  Typically, the lines are either not setup in a way that is conducive to being pulled up, or something is driving them down.

 

In the event that we've happened upon one of those rare 1 out of 10 instances, we may also want to reexamine the addresses being used.

 

101011 is only 6-bits, and this device is expecting to be addressed by a 7-bit identifier.

 

From page 8-6 of the AS5510 data sheet:

 

"7-bit slave address 101011x, the last address bit x is set by the ADR pin (0 or 1)"

 

Pin ADR = LOW » I²C address = 1010110b (56h) 

 Pin ADR = HIGH » I²C address = 1010111b (57h)"

 

So in your code, depending on whether the ADDR pin is high or low, the hex values 56 and 57 or decimal values of 86 and 87 are probably the right track to take.

 

Best regards and good luck!

Matthew H.
Applications Engineer
National Instruments
0 Kudos
Message 8 of 9
(3,892 Views)

Well you are correct.  My pcb had the 2 nodes of the pullups attached to ground.  So had to remove with exacto knife.  If I only obey my belief of checking ones work I wouldn't of been in this solution.  Also the address of the chip is set to 56h and when I used that I was able to communicate.  My concern was reading that LabVIEW to care of the R/W bit so I HAD TO RIGHT SHIFT THE ADDRESS hence the reasoning behind the address of 28H.

0 Kudos
Message 9 of 9
(3,876 Views)