Using 64k EEPROMS

Started by mrrmckenzie May 17, 2005
Just bought my first BX-35 and am just a bit overwhelmed. I have seen
posts referring to using 64k EEPROMS but don't seem to be able to
assemble all the details I need to determine if I can use them and how
I would need to connect them. Ideally I would want to run program code
from a 64k EEPROM and also be able to read and write data in a separate
64k EEPROM (although 2X32K chips would solve my problem) which will be
relatively static data.

cheers & thanks
Rod


--- In basicx@basi..., "mrrmckenzie" <mrrmckenzie@y...>
wrote:
> I have seen posts referring to using 64k EEPROMS but don't seem to
> be able to assemble all the details I need to determine if I can
use
> them and how I would need to connect them.

The pinout of the 64K SPI EEPROM that you need is exactly the same
as the 32K. Therefore, you connect it just like the 32K. Note that
you have to tell the IDE that you're using a 64K EEPROM otherwise
downloads won't work. Also, PutEEPROM doesn't work on the 64K
version (because it can't do single byte writes).

> Ideally I would want to run program code from a 64k EEPROM and
> also be able to read and write data in a separate 64k EEPROM
> (although 2X32K chips would solve my problem) which will be
> relatively static data.

You would connect your "data" EEPROM in exactly the same way as
the "code" EEPROM except that you will need to use a separate I/O
pin to serve as the chip select for the second EEPROM. You'll have
to read the datasheet on the device to find out what the commands
are to read and write, etc. and what the proper command sequence
is. Also, you'll need to read up on the OpenSPI() and SPICmd()
library functions. You'll probably want to use those to communicate
with the second EEPROM.

Don

>
> cheers & thanks
> Rod


Don

Thankyou for your response.

To paraphrase:-

Assume I connect 1X64K and 2X32K eeproms in parallel with the
exception of the CS(pin 1).
The 64K eeprom with CS connected to PB4-SS (pin 5) of the BX35 will
deliver program instructions byte by byte.
(I am aware I cannot write to 64K eeproms byte by byte from the BX35 -
I use the IDE to write the program)
The other two eeproms have their CS connected to 2 other unused pins
(say PA0 and PA1)
I use the OpenSPI once to nominate eeprom 2 as channel 2 using PA0
I use the OpenSPI once to nominate eeprom 3 as channel 3 using PA1
Thereafter I can use SPICmd nominating channel 2 to read/write eeprom
2 or channel 3 to read/write eeprom 3 as necessary.

If you can confirm this is fundamentally correct I should be fine
from here.

Thanks heaps
Rod

--- In basicx@basi..., "Don Kinzer" <dkinzer@e...> wrote:
> --- In basicx@basi..., "mrrmckenzie" <mrrmckenzie@y...>
> wrote:
> > I have seen posts referring to using 64k EEPROMS but don't seem to
> > be able to assemble all the details I need to determine if I can
> use
> > them and how I would need to connect them.
>
> The pinout of the 64K SPI EEPROM that you need is exactly the same
> as the 32K. Therefore, you connect it just like the 32K. Note
that
> you have to tell the IDE that you're using a 64K EEPROM otherwise
> downloads won't work. Also, PutEEPROM doesn't work on the 64K
> version (because it can't do single byte writes).
>
> > Ideally I would want to run program code from a 64k EEPROM and
> > also be able to read and write data in a separate 64k EEPROM
> > (although 2X32K chips would solve my problem) which will be
> > relatively static data.
>
> You would connect your "data" EEPROM in exactly the same way as
> the "code" EEPROM except that you will need to use a separate I/O
> pin to serve as the chip select for the second EEPROM. You'll have
> to read the datasheet on the device to find out what the commands
> are to read and write, etc. and what the proper command sequence
> is. Also, you'll need to read up on the OpenSPI() and SPICmd()
> library functions. You'll probably want to use those to
communicate
> with the second EEPROM.
>
> Don
>
> >
> > cheers & thanks
> > Rod


--- In basicx@basi..., "mrrmckenzie" <mrrmckenzie@y...> wrote:
> [...] If you can confirm this is fundamentally correct I should be
> fine from here.

That is correct. I have used a single external 32K EEPROM (AT25256A)
before but never two at once. Conceptually, it should work just as
you described.

Reading the datasheet you'll find that after you give the EEPROM a
write command it takes a while for it to complete the operation and it
won't be able to respond to anything other than a "read status
register" command. It is fairly simple to add code to check the
status before attempting to read or write. You could keep state
information around that indicates that a write was performed recently
and only check the status in that case. That would make for slightly
faster operation.

Don



--- In basicx@basi..., "mrrmckenzie" <mrrmckenzie@y...> wrote:
> [...] If you can confirm this is fundamentally correct I should be
> fine from here.

That is correct. I have used a single external 32K EEPROM (AT25256A)
before but never two at once. Conceptually, it should work just as
you described.

Reading the datasheet you\'ll find that after you give the EEPROM a
write command it takes a while for it to complete the operation and it
won\'t be able to respond to anything other than a "read status
register" command. It is fairly simple to add code to check the
status before attempting to read or write. You could keep state
information around that indicates that a write was performed recently
and only check the status in that case. That would make for slightly
faster operation.

Don