LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SPI communication with 93LC46 EEPROM

Solved!
Go to solution

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

Certified LabVIEW Developer

0 Kudos
Message 1 of 4
(4,033 Views)

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

0 Kudos
Message 2 of 4
(3,966 Views)

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

Certified LabVIEW Developer

0 Kudos
Message 3 of 4
(3,942 Views)
Solution
Accepted by topic author SergeB

I went out and bought just the EEPROM chip and powered it up and was able to read, write and erase the flash no problem. So my problem lies deeper in hardware and/or software of the PCB assembly...

 

- Serge 

Certified LabVIEW Developer

0 Kudos
Message 4 of 4
(3,877 Views)