I have an SPI master device which sends data to slave device. In response to Master data , slave device sends 6 byte of data and this process go repeatedly. I was trying to use NI 8452 but this can only be used as SPI master. Therefore i am trying to use NI 9401 and cDAQ chassis NI 9178.
My connection are as follows;
1. Master Clock into PF0 (in cDAQ NI 9178 Chassis)
2. Master; MOSI into NI 9401 Input Number 0.
3. Master MISO into NI 9401 Input Number 7 .
The read data from Master SPI device is working fine but writing data from SPI Slave to Master is not working.
Are you receiving an error when you run your code, or is it not behaving as expected? What is the behavior you are observing? In addition, could you attach your code?
Thanks for your response. As per now, I am not getting any error and I can visualize my data is being sent to the device but I am not getting any digital pulses at master device .
It looks like you may have already created a service request with us at NI for this issue, and it will probably be easier to troubleshoot through that process. A couple of thoughts:
Thanks for your reply . I have checked the DIO module using as Digital Outputs. It is working fine . I have also checked the MISO line using probe but i did not get any data.
Do you have any idea or thoughts on this issue.
The issue related to data writing is accomplished . Now I successfully write data from SPI slave device to my SPI Master device. The problem I am getting now is losing some data.
My logic is implemented as:
I am receiving data from SPI master using MOSI . On this line as soon as I received “E8” , my slave device should send data consist of 6 bytes. The master device only receive data when clock is present.
But I will lose some data which is transferred when clock is high as shown in attachment. In this way I will get wrong data on MISO line.
may you please let me know how to overcome this issue.
I believe that behavior is due to the clock signal you are importing. What is the master clock signal that you are importing?
The clock signal I am importing from SPI master device. My sending data is not synchronizing with clock signal . Therefore I am loosing data which result in wrong data to be read at master spi device.
If you have a service request open, it may easier to continue troubleshooting through that path. Could you further describe the clock signal? The DAQ device waits for a rising edge, so this could be due to your clock.