Forum Discussion
Altera_Forum
Honored Contributor
17 years agoEpcs4 interface problem
Hi,
I am using EPCS4SI8N through SPI interface to a microcontroller to write and read data. Right now I have done the connections accordingly but have problems with read and write to the serial EEPROM. I am not getting any response for any of the opcodes. The logic looks simple but dont know where I am going wrong. Thanks in advance!14 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- Hi, By pulling it down u mean...connect a resistor from that line to ground? Thanks! --- Quote End --- yes, if it's a real 1 then you shoudn't have any problem. but if it's Z ( that is shown as 1 ) you will get 0. right? - Altera_Forum
Honored Contributor
Hi,
By pulling it down u mean...connect a resistor from that line to ground? Thanks! - Altera_Forum
Honored Contributor
Hi,
255 probably means High Impedance. you can check it by pulling it down. are you sure that the IC is properly powered? - Altera_Forum
Honored Contributor
10MHz is less than 25MHz - hence it is OK :-)
- Altera_Forum
Honored Contributor
Hi,
My MCU bus frequency is 20MHz. So I can assign 10MHz for SPI. Well is that okay? Thanks! - Altera_Forum
Honored Contributor
Hi,
the slowest device should run with at least 25MHz, but check the data sheet I mentioned. Regards, Heiko - Altera_Forum
Honored Contributor
Hi,
I shall check with that datasheet. I have set my SPI clock to 5MHz. Initially it was 2MHz but I have changed it. Is that okay? Thanks! - Altera_Forum
Honored Contributor
Hi,
you have a problem with your interface as 255 is definitly wrong. You should get something like 0x01, 0x02. 0x12. You may download the data sheet of S25FL004A and compare with figure 9.3. Is your speed too high? Regards, Heiko - Altera_Forum
Honored Contributor
Hi,
I have done what you told but I get 255 from the eeprom. I have just sent 0x20 and am reading 3 bytes, nothing else. Is that right? Thanks! - Altera_Forum
Honored Contributor
Hi,
so best is realy to start with the indentifier command (0x20). - CS low - write 0x20 - read 3 bytes - CS high I assume you'll get zeros again. If so, you need to check with a scope the right order of the bits, clock edges, etc. Best is to compare it with the drawings e.g. in the data sheet of M25P32. Regards, Heiko