Flash Memory and Voltage Level

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

Good day Freaks!

 

I have a question that I would to get an opinion. As some may know, my big project I have been working on is an arcade machine. I have the majority of the systems prototyped with breadboards (audio, video, and controller input) and working great. I have slowly been working on getting things together for the main driver board.

 

However, recently this week I have been prototyping the audio system. Now this works great in it's current state (I have only been at it for about a week, so it's still pretty early in breadboard stage).

For the final design, I would like to integrate an SPI Flash memory chip that will go on the cartridge for the games.

 

Now the problem I seem to have encountered in my searching is that SPI Flash chips all seem to be 3.3v logic (the ones I found on DigiKey and Mouser). I would like to integrate at least 2MB (16MBit) but preferably something more like 4MB or even 8MB.

 

Currently, my video driver is based on 5 volt logic and is using an ATmega1284. I have this board already designed and routed. It is currently the only major system that is actually routed.

I would like all my main chips to be running the same logic level as the game cartridge CPU will communicate with the audio and video systems via SPI.

 

TLDR:

Most modern SPI Flash chips I've found are 3.3v volt logic and my current design is 5 volt. I see a few options here:

  • Scrap my current video driver design which uses 5 volt logic and develop everything (audio and video) with ARM technology
  • Use resistor dividers on the logic/supply pins for SPI Flash chips?

 

I have yet to get a stable image using an ARM processor (was testing on a D21 and it had way too much jitter) and that is why my current design uses an AVR8, as I was able to get perfect cycle timing using assembly.

Either way, I would still like to get VGA video working with an ARM but at this point I am just looking at a way to learn more options in this.

 

I really hope this isn't just a completely stupid question. Thanks for your help!

This topic has a solution.

My digital portfolio: www.jamisonjerving.com

My game company: www.polygonbyte.com

Last Edited: Wed. Jul 20, 2016 - 01:51 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you considered just getting a level shifter IC?  For example:  https://www.maximintegrated.com/...

 

Just out of curiosity, what's preventing you from using the atmega at 3.3v?  Why is it either atmega at 5 or ARM at 3.3?

Last Edited: Tue. Jul 19, 2016 - 08:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also suggest a level shifter. TI has some nice ones that can also serve as bus multiplexers. Sorry, can't remember a part number right off.

 

Jim

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

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

Rezer wrote:
Have you considered just getting a level shifter IC? For example: https://www.maximintegrated.com/...

My electronics component knowledge is pretty limited so I was unsure of what kind of component would help in this area. I've heard of level shifters/translators mentioned on here and other places but never actually used one. This looks to be a good solution! It looks like I can get a single chip with 4, or even 8 channels, so I could run MOSI, MISO, CLK, and SS from it.

 

Rezer wrote:
Just out of curiosity, what's preventing you from using the atmega at 3.3v? Why is it either atmega at 5 or ARM at 3.3?

Specifically with the video system, I am running the mega at 20MHz, which according to the datasheet requires at least 4.5 volts.

 

[Edit] Formatting

My digital portfolio: www.jamisonjerving.com

My game company: www.polygonbyte.com

Last Edited: Tue. Jul 19, 2016 - 08:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ah, yes it does.  I shoulda guessed a video application would be running at full tilt blush

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

I just use series current limiting resistors...works fine with AT 45DB321

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

chartman wrote:
I just use series current limiting resistors...works fine with AT 45DB321

That'll work one way (dropping AVR 0/5 to 0/3.3 as it goes from AVR to memory) but there might be issues back the other way where the 0/3.3 swing coming out of the memory chip might not be in the bounds for a true 0/1 as far as the 5V chip is concerned.

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

clawson wrote:

chartman wrote:
I just use series current limiting resistors...works fine with AT 45DB321

That'll work one way (dropping AVR 0/5 to 0/3.3 as it goes from AVR to memory) but there might be issues back the other way where the 0/3.3 swing coming out of the memory chip might not be in the bounds for a true 0/1 as far as the 5V chip is concerned.

Ah very interesting point on the resistors. My original thinking was to use two resistors as a voltage divider to drop the 5 volts to 3.3 but had not considered the step up from 3.3 to 5 volts.

 

I like the level shifter, though. It was a component I honestly didn't know to consider. This helps to improve my component knowledge.

I want to thank you all for the help provided in improving my knowledge!

My digital portfolio: www.jamisonjerving.com

My game company: www.polygonbyte.com

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

David (aka frog_jr)

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

Data sheet says Vih min = 0.6*Vcc. So a good 3v3 should produce a good 0 and 1 to the processor. If it's 'marginal', add a weak pull up to Vcc on the MOSI pin ( if needed)

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

The reason I suggested there could be a problem was that I wasn't sure if that 0.6 figure applies to every model of AVR. I had an inkling that some might be 0.7 and that would mean 3.5V.

 

Actually I just happened to have mega16 datasheet open. It tells me 0.6Vcc on most pins, 0.7Vcc on Xtal1 (as an input) and 0.9Vcc on the Reset pin. The Reset bit is irrelevant here but the Xtal1 thing may not be.

 

(wonder if Atmel have per device XML that hold things like VIL VIH figures? I was hopeful the .atdf files might, but they don't).

Last Edited: Wed. Jul 20, 2016 - 02:47 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

chartman wrote:
So a good 3v3 should produce a good 0 and 1
Best check the Voh min of that 3v3 device just in case... often that "marginal" is too uncomfortable, at least for me (even with pull up).

David (aka frog_jr)

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

clawson wrote:
The reason I suggested there could be a problem was that I wasn't sure if that 0.6 figure applies to every model of AVR. I had an inkling that some might be 0.7 and that would mean 3.5V.

 

While datasheets (at least AVR8 datasheets since I started looking at them) give the "guaranteed" 0.6/0.7 or similar, at least the newer models have a "typical" chart.  And the "typical" is usually very close to Vcc/2, with some hysteresis.  E.g. Mega164P

So, picking e.g. 5V Vcc then "1" is about 2.6V and "0" is about 2.2V.  Consistent with a hysteresis [a bit over] 0.4V.

 

That is about 0.52 for "1" and 0.44 for "0".

 

'1284P numbers are similar.

 

[anecdote:  An app that used analog comparator with a "trip" in the Vcc/2 range had a bit of trouble with the narrow hysteresis of the AC.  Using digital input and pin-change with typical as in the charts above worked perfectly.  YMMV]

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Have you considered using the XMega? 3.3 V and 32 MHz. (Atomic Zombie (King of cycle accurate video) (certified 2X overclocking for hobby use))

 

https://www.avrfreaks.net/forum/overclocking-xmega-results-now-including-xmega384

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

RickB wrote:

Have you considered using the XMega? 3.3 V and 32 MHz. (Atomic Zombie (King of cycle accurate video) (certified 2X overclocking for hobby use))

 

https://www.avrfreaks.net/forum/overclocking-xmega-results-now-including-xmega384

As it is, I've already got the video system working great with an AVR8. Hence my original quest to see if I can get away with not having to re-design that aspect of it. If I were to switch it to a faster processor, it would be a 32-bit ARM processor. I've gotten video working with a 48MHz D21 but it was using the internal 32.768 kHz crystal with the PLL. It had way too much jitter and was written in C, so the timing was not exactly cycle accurate. I suspect I could get much better, stable video if I had an external 32.768 crystal but that's for another day of learning and experimenting. If and when I get back to trying cycle accurate video with an ARM, I'll try to mix C and assembly for the video generation.

 

As for the Zombie...I've learned a lot from reading his blogs about VGA, so my designs owe a great deal to his fantastic work!

My digital portfolio: www.jamisonjerving.com

My game company: www.polygonbyte.com