06-24-2015 02:29 PM
Hello awesome NI readers,
I've been trying to communicate with my 93LC46 EEPROM device via SPI but haven't had much success. I am using the NI USB-8451 to interface with it.
The 93LC46 device is active high for chip select so I used the "General SPI Write Script" example and modified it a bit.
I've connected 4 wires between my device and the USB-8451 device. SDI, SDO, SCLK and CS. pin 16 on 8451 to my SCKL, pin 15 on 8451 to my SDO, pin 14 on 8451 to my SDI and pin 13 on 8451 to my CS.
The ORG pin on the 93LC46 is pulled down to ground (see wiring diagram) so it's a 128-8bit organization. The read instruction I am trying to send is 10bits long so I am sending 2 bytes, one byte at a time.
When i try to run my program and look at the SPI signal on my oscilloscope, all i see is my 4 lines toggle their signal once and then nothing. Obviously, I'm doing something wrong since I can't even see my clock signal running! I have attached the datasheet of my EEPROM device the wiring diagram for it. I also attached the code I am using.
Any help or advice is greatly appreciated! Hope this makes sense.
Thank you.
Serge
Solved! Go to Solution.
06-25-2015 05:33 PM
Hello SergeB,
Can you describe in more detail what you mean by all 4 lines toggle once and then nothing? Is the pulse just a single single a digital high on all 4 lines? You could try using an example VI from the Basic API. It’s even simpler then the Scripting API. If this behavior persists we may want to investigate your connections further.
Regards,
j_bou
06-26-2015 12:00 PM
Hi j_bou,
Thanks for taking the time to reply. I did try the basic API but I realized some assumptions the code was making did not work for my device. The pulse that I was seeing on the SPI lines was a mix of low->high->low or high->low->high.
Since I couldn't see any clock running, I was thinking that my EEPROM must be a slave to something else and running off their clock. This EEPROM is part of a board assembly so I was looking at what other IC's were on the board and there's a PIC18F252, so i'm thinking I have to write code to talk to the PIC to be able to talk to the EEPROM and that I cannot talk to the EEPROM directly. Hopefully, it works out!
Don't know if I should keep this thread open until my problem is resolved because this issue might be related to something different that what I am asking here.
- Serge
07-06-2015 01:32 PM