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

Help 9346 EEPROM!

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ninjanick



Joined: 25 May 2004
Posts: 25

View user's profile Send private message

Help 9346 EEPROM!
PostPosted: Tue Apr 12, 2005 11:23 pm     Reply with quote

I've implemented 9346.c with my main program and what I'm discovering is that the write routines function fine once. When I try to write to the EEPROM again, it will not write correctly. I have to power cycle the PIC and I will be able to write again one more time. After that, I have to power cycle the PIC again. It almost sounds like the WR Enable pin is floating, but it's not ... it's hard wired on the PCB.

93C46 Atmel EEPROM
PIC16F73 at 4Mhz external oscillator


Last edited by ninjanick on Wed Apr 13, 2005 12:00 pm; edited 1 time in total
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Apr 13, 2005 12:26 am     Reply with quote

Do you have a data sheet for the 94C46 eeprom ?
I did a web search and could not find one.

Microchip mentions it in AN572.
http://ww1.microchip.com/downloads/en/AppNotes/00572.pdf
They say the 94C46 is a "x16" device.

But the 9346.c driver is for a "x8" device. It won't work for a x16
device. Look at the data sheet for the 93AA46, which has both
x8 and x16 modes. The x8 mode uses 18 clocks for a write command
and the x16 mode uses 25 clocks. You can see the differences by
comparing the Instruction Set tables for the two modes.

So you need to modify the 9346.c driver to make it work with the 94C46.
But there's is apparently no data sheet available, so I'm not sure how to
do it.
ninjanick



Joined: 25 May 2004
Posts: 25

View user's profile Send private message

PostPosted: Wed Apr 13, 2005 12:00 pm     Reply with quote

Sorry ... typo ... should be 93C46.
ninjanick



Joined: 25 May 2004
Posts: 25

View user's profile Send private message

PostPosted: Thu Apr 14, 2005 12:06 am     Reply with quote

The 93C46 is set to 8-bit mode and the EEPROM does seem to work. As I can read/write to the EEPROM many times consecutively and not. What I found out is that if Port B0 fluctuates (high to low back to high), the EEPROM stops responding to write commands. I can see the DO, DI, CS, and SK lines trying to access the EEPROM, but the EEPROM is not allowing any writes. I'm thinking it's dirty power or possibly a voltage fluctuation on the W/R Enable pin causing the EEPROM to "lock out".
This situation only occurs when RB0 has multiple high-low transitions.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Apr 14, 2005 12:57 pm     Reply with quote

Is RB0 connected to the EEPROM ? If so, to what pin ?

Is RB0 being used for External Interrupts ? If so, a transition on RB0
could cause an interrupt (depending on what edge is selected).
The interrupt could occur during the transmission of a command to the
EEPROM, and possibly this could disrupt the operation of the EEPROM.
Is this what's happening in your program ?
ninjanick



Joined: 25 May 2004
Posts: 25

View user's profile Send private message

PostPosted: Thu Apr 14, 2005 5:27 pm     Reply with quote

RB0 isn't connected to the EEPROM and I disabled the RB0 Interrupt. This is just wierd. I can read and write to the EEPROM all the way up until I toggle the signal on RB0. After that it locks to any more writes. It can still read ... just no write access.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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