07-06-2014 08:12 PM
Use NI-8452 be a Slave device in SMBUS , 8452 will be interrupted in communcation.
Ni 8452 is to simulate a slave device like as Battery, and Master (like Charge) always ask slave device(8452) status(charge voltage,Temp)
Like below the vi Structure, when 8452 detects command from Master device, i will send the Low Byte and High Byte back to Master.
while i start this vi, NI 8452 will work to wait command and the LED of NI8452 will always blink.
in this time, let the Master to trun On and the Master Device will poll to ask slave continuously,and 8452 will response specific date back to Master continuously.
but in some time, NI 8452 will be interupted himself no any reason.
and i use a machine to measure the clock and data line, i found the Date line be High and NI 8452 is interrupted and stop blinking.
If you have Similar experiences, let me know, i don't want to stop the communication and i want to know why the LED stop blinking.
07-08-2014 01:53 AM
Hi KK,
Lets make it clear. You are trying to use NI 8452 to be the MASTER then commute with another 8452 SLAVE.
And the vi shown in your picture is programed by yourself, not the example.
Here I suggest you use the example first, to make sure the hardware and other setting is correct and workable.
The following step could help you to find the example :
Step1. Open the Example Finder in LabVIEW
Step2. There are two examples you need, MAX MAX6953 I2C Master.vi and MAX MAX6953 I2C Slave.vi
(These two examples emulate a MAX6953 LED Matrix, and it is funcational after I tried it both on 8452 Master to 8452 Slave)
Step3. Set all parameter : the attachment
Pullup Enable set to TURE if you do not use external pull up resistor
Digit Intensity set to 15, it will make it much clear in slave
DO NOT forget to set the character to others, or you will see nothing even you connected successful
Please update if you have any futher progress
Harvey
08-18-2014 07:59 PM
Thanks you,
I use the example to use, but i use this structure to make new one for my testing.
the interrupt problem is clear, because the computer is too slow to process NI8452.
Now , i have another problem, when i use NI8452(Slave) to communicate to DUT(Master).
DUT will Write command to Slave by polling, and then Slave will response the L Byte and H Byte to DUT.
When the NI8452 responsed the L Byte and H Byte to Master. Between the L Byte and H Byte have a High bit(not ACK).
I want to know why,it is the problem from 8452.
.
another problem is the ACK(Slave to Master before sending data) too long, have some idea to shorten ACK Clock Stretching.
08-25-2014 12:40 AM
Hi kk,
The time in the region below seem not Ack.
It looks like it is the slave which is causing the delay.
And the 845x driver will not cause the device interrupt.
Maybe you need to check the connect between the 8452 and your slave.
Chloe.
08-25-2014 06:49 AM
Hi Chloe
I use the NI8452 be a slave device.
I wanna know why causing the ack delay.
08-26-2014 01:37 AM
Hi KK,
What is your master device?
Which is SDA or SCL line on the logic analyzer ?
I want to see more clear picture to check the latency state(ACK or restart time).
BTW, do you use I2C write and I2C read in your code?
Can you provide your source code?
Thanks,
Chloe
09-11-2014 08:05 PM
HI Chloe
What is your master device?
DC/DC Converter With Battery,so i used the NI 8452 be a slave device to reponse any Information to Master Device.
Due to Master Device will ask Battery Voltage and the Protocol follows SMBUS Spec.
Which is SDA or SCL line on the logic analyzer ?
I want to see more clear picture to check the latency state(ACK or restart time).
FIrst Row is SCK Line.
Second Row is SDA Line.
BTW, do you use I2C write and I2C read in your code?
Can you provide your source code?
Thanks,
Frederic
09-11-2014 10:08 PM
Hi Frederic,
It looks like clock stretching.
But there is no documentation that indicates the exact length of the clock stretching caused by our slave API.
I will help you to ask NIC for the documentation, or the slave API timing issue.
Thanks,
Chloe
09-16-2014 12:59 AM
Hi Chloe
Thanks you for your help.
If you have any further information, please let me know. Thank you.
09-18-2014 08:29 PM
Hi Frederic,
We got the response from NIC R&D :
The delay in the picture is clock stretching. Notice that the long acknowledge time is on a read operation. The 845x hardware is asking the software for the data being requested. Once the software puts the data into the hardware buffer the slave releases the SCL line and the response continues.
The battery probably implements the data registers in hardware, therefore when data is requested it can be made available much faster than the the software version.
If there is any problem, please let me know.
Thanks,
Chloe