CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Interface AT25F4096 with PIC16F877
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
bal_square



Joined: 05 Dec 2018
Posts: 11

View user's profile Send private message

PostPosted: Fri Dec 07, 2018 1:01 pm     Reply with quote

Ttelmah wrote:
You are still not showing a crystal in the circuit. Also the ENVREG pin needs
to be tied to Vdd.
Also look at Figure 2-1. This shows the minimum connections required for the PIC to work.
You need to check that the chips are both receiving the right supply. The way that Proteus hides the supply pins and can then connect the wrong supply (with no standard for voltage levels and names existing), can easily lead to a chip not being powered,
Big question is whether the Proteus model of the memory actually works....
Unfortunately they often don't. I'd say at least 10% of parts have significant
issues in Proteus.
It is a very poor simulator, and people relying on it are most of the time
wasting their time...
The SO pin will not be driven till CS is low.



It's very strange...I checked SI(yellow line) and SCK(blue line), It sends signals correctly, but flash memory doesn't respond.


Last edited by bal_square on Fri Dec 07, 2018 2:24 pm; edited 1 time in total
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Dec 07, 2018 2:05 pm     Reply with quote

I'd try another memory device. Originally you attached it to an 877, a 5 volt PIC, so it could easily now be defective.
Your 'link' didn't work for me, came back '404'

Jay
bal_square



Joined: 05 Dec 2018
Posts: 11

View user's profile Send private message

PostPosted: Fri Dec 07, 2018 2:24 pm     Reply with quote

temtronic wrote:
I'd try another memory device. Originally you attached it to an 877, a 5 volt PIC, so it could easily now be defective.
Your 'link' didn't work for me, came back '404'

Jay

Sorry, corrected
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Dec 07, 2018 6:23 pm     Reply with quote

temtronic wrote:
I'd try another memory device. Originally you attached it to an 877, a 5 volt PIC, so it could easily now be defective.
Jay

The Proteus model could be defective. He is not using an actual chip.
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Sat Dec 08, 2018 2:18 am     Reply with quote

Agreed. I suggested this earlier.
Also, his Proteus oscilloscope 'plot', does not show the CS line, or have a high enough sample rate to actually see what is being clocked out.
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Sat Dec 08, 2018 8:19 am     Reply with quote

Have done a little checking.
People are using the Proteus model OK, but all say you must _write_ to the chip before the Proteus model will support a read.
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Dec 08, 2018 8:47 am     Reply with quote

I was curious, so downloaded the EEPROM datasheet...
tidbits of information that must be noted...


WRITE ENABLE (WREN): The device will power up in the write disable state when VCC
is applied. All write instructions must therefore be preceded by the WREN instruction.

PROGRAM (PROGRAM): In order to program the AT25F4096, two separate instructions
must be executed. First, the device must be write enabled via the WREN
instruction. Then the Program instruction can be executed.

I don't have the chip, but it seems your 'driver' needs to implement these details or instructions...

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Sat Dec 08, 2018 10:09 am     Reply with quote

Yes, but not unless he writes to the memory.

The read instruction on a real chip, will work without WREN.

As I say though people are reporting that you cannot read from the Proteus
chip until you have written to it (their model seems not to actually support
reading from a 'blank' chip). To do a write, the driver will have to enable
writing.

I found a poster complaining that a read did not work in Proteus, and
somebody advised him to write first, and he reported back that it did then
work.
bal_square



Joined: 05 Dec 2018
Posts: 11

View user's profile Send private message

PostPosted: Sat Dec 08, 2018 11:48 am     Reply with quote

Ttelmah wrote:
Yes, but not unless he writes to the memory.

The read instruction on a real chip, will work without WREN.

As I say though people are reporting that you cannot read from the Proteus
chip until you have written to it (their model seems not to actually support
reading from a 'blank' chip). To do a write, the driver will have to enable
writing.

I found a poster complaining that a read did not work in Proteus, and
somebody advised him to write first, and he reported back that it did then
work.


YES, a lot of thanks, You're my hero. IT works.
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Sat Dec 08, 2018 12:48 pm     Reply with quote

You now perhaps understand a little of why we are so scathing of Proteus...
It is very much 'not a good way' of finding how electronics will actually
behave. Sad
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group