Go Down

Topic: SRAM class using 23K256 (Read 8510 times) previous topic - next topic

philippedal

Good luck. MUST work, it does for me..:) Keep me posted.
Ph

vmarguerie

#16
Jun 28, 2011, 07:14 pm Last Edit: Jun 28, 2011, 07:26 pm by vmarguerie Reason: 1
Hi Philippe,

I received the resistors today and YES it works ! THANKS 4 your help  8)

But there's still a small problem either with the Uno board or the Mega board.

When I plug or reset the Arduino, the Serial prints

121   ms to write full SRAM
error in location  
1

Luckily I made a this: Unplug and replug the 1K resistor between MOSI and SI, while keeping the board (Uno or Mega) plugged and the serial console open. And there it works :-)))

122   ms to write full SRAM
no errors in the 32768 bytes

Other thing, it doesn't works correctly if I plug the 0.1µf capacitor.

121   ms to write full SRAM
error in location 
481

Does anyone has an idea about this problem ?

Best Regards
Vincent

philippedal

Hi, Vincent,

great to read it works... but I'm surprised though with the problems you have... as you see on the picture, mine is connected permanently and never failed... You may have to experiment a little with resistors of similar value to possibly reach stability.. Do you use the 3.3V from the areduino? do you have a common ground between arduino and sram chip?

vmarguerie

#18
Jun 29, 2011, 09:20 pm Last Edit: Jun 30, 2011, 12:34 am by vmarguerie Reason: 1
Hi Philippe.

Problem solved  8)

I had a faulty cable and I had to experimented with the resistors.

Finally, it works without any problems with the 0.1µf capacitor but I had to removed the 1K resistor between ground and Pin 6 of the 23K256, that made the system unstable when I moved it. Strange, but now it works like expected !

Now, I'll have to check that with this 23K256, I'll be able to solve the memory problem I have with my "Big" program. It takes 4ko of memory when I upload it to the board then exceeds the 8Ko available with the mega board when it runs. That's another story.

Thanks again.
Vincent

Telson

Hi,

You have changed  in the SRAM.h

#define setupSPI SPCR = 0x50
#define setupDDRB DDRB |= 0x07
#define selectSS PORTB &= ~0x01
#define deselectSS PORTB |= 0x01


But in the file of registers definitions for the ATmega2560 : http://cna.mikkeliamk.fi/Oppilas/MB210/CV/cvavr/inc/mega2560.h 

I read :
sfrb DDRB=4;
sfrb PORTB=5;

Could you explain why.

Could you give me a example for write and read in the SRAM 23K256.

Thanks for you help I so lost !!!






philippedal

Hi, Telson.

Sorry for the EXTREMELY long delay in returning, but I was too busy to go back to forums the last months.....

Regarding your demand, no time to investigate the "why", but as a matter of fact, the scheme I made does work (use eventually the modifications as suggested by Vincent...). As for a program that reads and writes, I used the program to test the chip from carl as provided in the very first item in this thread...... So you basically have everything you need.

Hope it will work for you, but it DID work very well for me...:)

Cheers

Phil

Go Up