Maker Pro
Maker Pro

programming a 25C320 EEPROM from PIC16F628

I am trying to program the 25C320 EEPROM from my
PIC16F628 microcontroller. I even have a sample
Microchip pgm that does examples of the fundamental operatiuons

Trouble is, my version of this pgm originally worked
and now doesn't and I am getting sporatic results

I have great plans for using this EEPROM and would like
to know if there are common problems
with these devices

Larryk
 
F

Frank Bemelman

Jan 1, 1970
0
I am trying to program the 25C320 EEPROM from my
PIC16F628 microcontroller. I even have a sample
Microchip pgm that does examples of the fundamental operatiuons

Trouble is, my version of this pgm originally worked
and now doesn't and I am getting sporatic results

I have great plans for using this EEPROM and would like
to know if there are common problems
with these devices

Perhaps you zapped the outputs of your PIC16F628. Or
zapped them half. Check the signals with an oscilloscope.

I assume you didn't go beyond the 1 million erase/write
cycles.
 
R

Rich Grise

Jan 1, 1970
0
I am trying to program the 25C320 EEPROM from my
PIC16F628 microcontroller. I even have a sample
Microchip pgm that does examples of the fundamental operatiuons

Trouble is, my version of this pgm originally worked
and now doesn't and I am getting sporatic results

I have great plans for using this EEPROM and would like
to know if there are common problems
with these devices

What did you do between the time when it worked and the time when
it didn't?

Thanks,
Rich
 
the program gives a sample of each command.
write enable, write a byte, read a byte, read status register

I tried to expand these samples into practical loops of
of writes and reads. At one point I apparently wrote 3 bytes
and could read back the 2nd & 3rd but the 1st byte was all 1's.

But even this pgm failed to work subsequently. I will probably still
go back
to the sample pgm, but I have been trying different things with the
clock
and throwing in write enables, etc.

I know I will debug this, but just looking for ideas.
Larryk
 
D

Donald

Jan 1, 1970
0
the program gives a sample of each command.
write enable, write a byte, read a byte, read status register

I tried to expand these samples into practical loops of

Ok, here is your problem.

Now you did backup the version that worked to compare against, didn't you.
 
L

Luhan

Jan 1, 1970
0
I am trying to program the 25C320 EEPROM from my
PIC16F628 microcontroller. I even have a sample
Microchip pgm that does examples of the fundamental operatiuons

Trouble is, my version of this pgm originally worked
and now doesn't and I am getting sporatic results

I have great plans for using this EEPROM and would like
to know if there are common problems
with these devices

Are you remembering to check the write-in-progress bit in the status
register?

Luhan
 
thanks for all the help

there are 2 things I am working on

one thing the app notes specified was a 10k pullup resistor
for cs (chip select) which is active low -
I am wiring this in right now

the other thing stressed was setting and reading the status register
on the EEPROM. I will put in code to set this properly. My
understanding
was that wiring /WP and /hold high I could override any settings of
the status register.

there is a WIP check in my code already and it may be working OK.

no problem with 1 million writes and I do go from one PIC unit to
another
my programmer I developed myself
I go from assembly lang code to burnt chip in 25 seconds
the PIC16F628 has been very dependable
but it originally took me over a year to get any signs of life out of
it
as I studied the 160 pages of specs and 30 pages of specs
for programming the PIC !

Once I get to pgm this EEPROM, I have plans for labeling files,
searching for files, etc.
 
L

Luhan

Jan 1, 1970
0
one thing the app notes specified was a 10k pullup resistor
for cs (chip select) which is active low -
I am wiring this in right now

The cs pullup is not manitory since it is driven by an output-only pin
on the PIC. The same goes for Clock line. You *need* about a 2k
pullup on the Data line which is bi-directional.

Luhan Monat (luhanxmonat-at-yahoo^dot^com)
http://members.cox.net/berniekm/
"Reality: what a concept!"
 
signals off! even tho I haven't had chance to run all my
programs, I think I've found the problem
a loose connection on the SCK (clock) line from PIC to EEPROM
don't know whether to rejoice or cry !
I've learned a few pointers from the discussions - thanks
Larryk
 
last word -- the bad solder connection was not the
only problem. I had to tweek software routines
BYTIN and BITIN before things worked.

Interesting note: the tradeoff in using serially interfacing
memory units: simpler hardware, more complex software.
Conventional mem units need maybe 12 pins for
address, and 8 pins for data. But only signal you need
to send is a WRITE or a READ!

But I feel happier with minimal hardware and extensive software !
Larryk
 
Top