Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with reading EEPROM with PIC16F628

Status
Not open for further replies.

optech

Member level 1
Joined
Dec 19, 2004
Messages
37
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
407
I am trying to read EEPROM(93c46) with PIC16F628. I had 93c46's datasheet and wrote a firmware. But it didn't work.
Now I want to explain that I did. Where is my fault?

In the datasheet, READ insturuction is given --> " SB-->1 + OP CODE-->10 + (for 8 BIT)ADRESS-->A6-A0 "

According to datasheet, I used this infos like that:

* HIGH CS pin (Chip Select)
* HIGH DI pin (Data Input) and set CLKpin two times.
* LOW DI Pin AND set CLK pin

thus, I sent "110". (Those bits are SB-->"1" + OP CODE-->"10" )

* Then send adress bits. (A6-A0 is given. Why is not A7-A0(8 bits)? I did that in this way: when I sent "1" or "0" to DI, I set CLK one by one.

* After of those CLKs(Adress CLKs), with each CLK, i receive a bit. And I constituted a byte with those bits. Later, I wrote down this byte to a register.

* HIGH CS and LOW CS

With this way, I could not success. Where is the problem?
or
If is there an another solution and you share with me, i will be happy.

Thanks....
 

Re: READ EEPROM with PIC

In 93C46 (Microchip) the organization is 64x 16 what means that you have only A0 ..A5, and not like you send A6 .. so to read one word from EEprom you need 25 clock cycles: SB (1), Code(10), Address (A0, A1, ..,A5) and Data word (D15, .., D0).
Some of 93C46(eg. National Semiconductor) will also have 1 dummy bit before the bit D15 is read .. se attached data sheet https://www.pjrc.com/tech/8051/93CS46.pdf
 

Re: READ EEPROM with PIC

optech,

is there a special reason to use an external EEPROM with 16F628??

This PIC has 128 bytes built in EEPROM why don't you use this??

best regards
 

Re: READ EEPROM with PIC

@IanP
* I have atmel's 93c46. In its datasheet, adress is given A6-A0 for 8 bits. I saw datasheet which you send. In this dataheet, it is given A5-A0 for 16 bits. I think it is a difference between 8 bits or 16 bits.



@C-Man
* I need to develop a circuit that reads 93c46 in an another circuit.
 

Re: READ EEPROM with PIC

Maybe you have timing problem. Remember, all occures on the rising edge of the clock pulse.
I looked in my routines (not for PICs); in my case DI and DO were connected together (to save pins) and what I did was I asserted additional clock pulse so it looked as if I had 2 start bits .. and it worked just fine. So be open and just try to play with the clock pulses..
As you can see there are a lot of these eeproms named as equivalents, but in fact each brand has something different ..
 

Re: READ EEPROM with PIC

I have found where my fault is. It was a CLK and ORG problem. I set the CLK pulses and give GND to 6 th pin of 93c46 (ORG) for 8 bit. And FINALLY it is ok. It works very good.

Thanks for your answers....
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top