WRTITING DATA INTO MEMORY

SINCE i am at very novice level of learning...i am stuck with one problem.
I am trying to write a code for transferring a block of data stored in sram in arduino to external memory.How to do it.Plz help.
THanks

Which external memory? Part number and link to datasheet? Please use [ url ] tags for links.

How much data? (Does it actually fit in SRAM?)

What code do you have so far? Please use [ code ] tags.

100 bytes of data in external memory CY6264 (8K*8)
http://www.cypress.com/file/43026/download

Some of us are using tablets and other devices that make it difficult to copy-paste a link. Help us help you by using [ url ] tags.

You can edit your post. You may also wish to edit the 8) smiley. Put a space between the 8 and the )

8k x 8

Here's that link:- CY6264 - 8 K × 8 Static RAM

@Abhas123_S-tar, the datasheet makes it pretty clear how to write to and read from the EEPROM SRAM chip. Exactly what trouble are you having?

Could you post your code, please? (Between [code]code tags[/code] of course. :slight_smile: )
As MorganS already asked.

Edit: Which Arduino board are you using. You need up to 25 I/O pins.

Edit2: I don't see much point in adding one of these chips just to (temporarily) store 100 bytes. Of course, being SRAM, it's 'volatile' memory and all data will be lost when the chip is powered down.
If you want 'non-volatile' storage, you're better off using the Arduino's built-in EEPROM memory.

CY264 static SRAM

You need quite a bit of pins; 13 address lines (if you want to be able to use the full capacity; for 100 bytes you can limit it to 7), 8 data lines and 4 control lines (you can probably get away with one less). Which Arduino are you using?

The general approach for writing

  1. disable output (/OE high)
  2. make datapins output (on Arduino) and set data on the databus
  3. set address on the address bus
  4. enable chip (/CE1 high; you can tie CE2 to Vcc)
  5. set write low (/WE)
  6. restore (/WE and / CE1 high)

For reading

  1. set address on address bus
  2. set datapins (on Arduino) to input
  3. enable chip (/CE1 low; you can tie CE2 to Vcc)
  4. enable output (/OE low)
  5. read data
  6. restore (/WE and / CE1 high)

You need to take into account all timing parameters; for e.g. write, address and data need to be available a certain time before you make /WE low

i m using arduino mega 2560

Use a serially interfaced part such as
http://www.digikey.com/product-detail/en/fujitsu-electronics-america-inc/MB85RS64VPNF-G-JNERE1/865-1260-2-ND/4022654
Be much easier to code for, no messing with address counter, controlling databus, multiple control lines.