Happy Programmer - Expanded Mega2560 RAM to 544K

I just plugged in a little QuadRAM card for the first time and ran some tests:

Writing  512K QuadRAM (2604900 usec)
Checking 512K QuadRAM (2934768 usec)
512K test completed in 5539668 usec.

I've set up the QuadRAM's 512K as sixteen 32K pages with software that automatically switches pages so that I can do either random or sequential accesses in a 0-524,288 byte address space simply by storing/loading to the address using a pointer.

My application (normally) logs test data once per second, and this should provide 8-10 hours of logging capacity, and will be fast enough to not interfere with real time test control functions.

I like it! :grin:

Yes I got one of those I think. Was it from Rugged Circuits?

Unfortunately I don’t normally need to store that much data. :wink:

It is from Rugged Circuits. Although I'm completely happy with it, I've downloaded a copy of EagleCAD so that I can design a 1MB Mega-size shield that can also accommodate an RTC - so that I can re-instate my Touch Shield at the top of my card deck. I seem to be proving the rule that before you can do anything, you have to do something else. ;)

I expect that I'll only need to store that much data at the end of a day-long test, and that only until my testing phase has been completed. At this stage, I'm wanting all the data I can get - and this is a sizable step in the right direction.

the rule that before you can do anything, you have to do something else.

AKA, you can't get there from here :)


I'll get one too! I've looked at the spec sheet. Sounds like old 1980's memory shadowing if you address more than 64KB, like 96KB on an apple II.

As you probably noticed, there are a number of ways the CPU addressing can be configured. My Mega already has 32K of RAM, so I opted for dividing the QuadRAM into 32K chunks that map into the space immediately following the existing RAM (primarily to minimize the amount of bank switching needed).

I access it by passing an address in the 0-512K range to a function that switches the bank (only) if the current bank is different from the previous - and which returns a pointer to that location in the current 32K bank, which lets me do both

*QuadRAM(addr) = variable; // Store variable = *QuadRAM(addr); // Fetch

My Mega already has 32K of RAM,

?, Doesn't the 2560 spec out with 8KB of SRAM?


You're right - it does. Too much 32K on my mind (or what sometimes passes for one) :grin: