SPI errors with Mega8 and AT45DB021B 8 pin flash ram

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi All

I am occasionally getting errors when reading from sram buffer of
AT45DB021B flash ram, and/or might be getting them during writes.
I'm not reading what was written to buffer.

Mega8 @ 5v & 14.7456MHz with all the needed caps,
Etc, its running stable.
AT45DB @ 2.7v
SPI @ sysclk / 4 SPI mode 3

Wired together directly; datasheet says 5.0V-tolerant
inputs: SI, SCK, CS, RESET and WP Pins

Chip select, memory setup & hold times are greater then minimums

What I've tried, some out of desperation:
Changing SPI speed
Pull-ups & dns on data & control lines
Filter caps on data & control lines
Op codes for other SPI modes
Increasing chip select, memory setup & hold times

Any one got any ideas?

thanks
Squiggy

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The SO of the AT45DB may not be high enough for the Mega8's Vil. Maybe a level shifter is needed, or bump up the voltage on the AT45DB to 3.3V.

j.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Adding to the previous post, I think he is suggesting that the 5V processor port pins may not be dropping LOW enough to be recognized as a zero by the AT45DB when it is powered at 2.7V.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, what I meant is that the inputs to the AT45DB are 5V tolerant, so driving them with a 5V powered AVR shouldn't be a problem. But the output from the AT45DB, SO, is just at 2.7V levels,... there is another post on this subject, do a search, about the output levels and the thresholds of the AVR input, but I think the best thing to do is boost up the AT45DBs power supply to 3.3V. I am using AT45DBs with great success running at 3.3V to a 5V AVR.

One other thing, if you have a scope available, put it on the SO output, and make sure the signal is nice and "sharp," if you know what I mean.

j.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks j_sorensen

I tried 3.0v and it worked great.

Went back and moved everything closer together on the breadboard
and used shorter hook up wires.

Works.

Went back to 2.7v

Works.

Squiggy

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Breadboard = high capacitance = slugging fast changes = change not reaching correct values in the time alloted.
Mike

Keep it simple it will not bite as hard