Easiest way to add RAM?

Status
Not open for further replies.

sa_penguin

New member
I was drawn in by the Kickstarter and Hackaday articles.
So I'm no really familiar with all the ins & outs of the Teensy models.
I noted one Hackaday comment about uClinux, saying 4 - 8 MB of RAM would be "better".

What's the easiest way to add that much RAM to a Teensy?

A huge RAM chip would have a bucket load of pins, and I'm not sure how it would hook up.
A serial RAM of some type (SDA? I2C?) would be easier, but slower to read / write.

Is there a quick & easy solution to adding more RAM?
 
I'm not Paul, but I don't believe there is any way to add SDRAM or normal flash memory after the fact. You can add external flash memory that you can use SPI calls (and perhaps DMA) to access memory, but it is not automatically used. And the 3.5/3.6 does have a built-in micro-SD card reader that you can use.

I believe some versions of the chip inside the Teensys have support for external memory, but it isn't in the packaged Teensy that you can buy.
 
Last edited:
Is there a quick & easy solution to adding more RAM?

No, there is no quick and easy solution. There are some kludgey, difficult, poorly performing ways with limited size. SPI-based ram can work really well for certain types of applications like audio delay, but it's really not useful as a general purpose RAM.
 
Howdy Paul / forum users,

I am working with the Teensy3.6 to see if it can be used for a video project.

Briefly, I have a camera which is PAL / NTSC and which has a BTU.656 port on its bottom. This amounts to an 8-bit port clocked at 28MHz, which over the course of 40 msec (for PAL) sends out the two fields of an interlaced frame.

I would like to capture that, and store to UH-1 microSD card (good for 90MB/sec writes).

I think that I need to write to the card in 512byte chunks (minimum). I also want to store the image locally (in RAM) to compare with previous frames. If there is a repetition of a frame (due to integration) then I would like to not write the second (or third etc) frames.

Now I think I need a µC that can do port reading / SD writing at 30 MHz. The Teensy might be out of its depth here - right now I can get 12.19 MHz out of the tightest loop available, just toggling a pin., when compiled for Fastest + PureCode + LTO + overclock @240MHz. But there might be ways to make it run faster that I have not yet explored.

Code:
const int led = 13;

void setup() {
  pinMode(led, OUTPUT);
}

void loop() {

    digitalWrite(led, HIGH);
    digitalWrite(led, LOW);
    
}

If anyone has any thoughts, please feel free to advise.

Regards, Tony Barry
Sydney, AUS
 
When looking at your code, my first thought is that you should study the K66 processor reference manual and the Teensyduino core files. For example, the digitalWrite() command is by far not the quickest way to toggle a Pin - direct port register manipulation might speed that up by 4 to 6 times. Second, relying on the loop() for timing is also a bad idea since after each loop run, some hidden background functions are executed to check if data has arrived on the serial ports, and so on.

The principle of the Arduino developing environment is mainly to help beginners with little hardware and coding knowledge starting first and relatively simple projects. When it comes to “power programming” and to get a maximum out of an embedded system, thorough study of hardware details and higher coding skills and experience are absolutely required.

Port reading @30MHz is thus theoretically possible with a T3.6, as is transferring that data to memory with advanced techniques like DMA, even without overclocking. But I’m not sure if the SDIO will then still be able to keep up.
 
Yes, loop() adds unnecessary overhead. However, your test above says nothing - you don't want to toggle an LED, you want to do something more specific. That's why it doesn't help to toggle an LED - This has no informative value- you have to measure about what you need. Toggling a pin takes the least time by far if it is done correctly.
 
Please start a new thread with this question. It's off topic with regards to this thread.

Howdy Paul / forum users,

I am working with the Teensy3.6 to see if it can be used for a video project.

Briefly, I have a camera which is PAL / NTSC and which has a BTU.656 port on its bottom. This amounts to an 8-bit port clocked at 28MHz, which over the course of 40 msec (for PAL) sends out the two fields of an interlaced frame.

I would like to capture that, and store to UH-1 microSD card (good for 90MB/sec writes).

I think that I need to write to the card in 512byte chunks (minimum). I also want to store the image locally (in RAM) to compare with previous frames. If there is a repetition of a frame (due to integration) then I would like to not write the second (or third etc) frames.

Now I think I need a µC that can do port reading / SD writing at 30 MHz. The Teensy might be out of its depth here - right now I can get 12.19 MHz out of the tightest loop available, just toggling a pin., when compiled for Fastest + PureCode + LTO + overclock @240MHz. But there might be ways to make it run faster that I have not yet explored.

Code:
const int led = 13;

void setup() {
  pinMode(led, OUTPUT);
}

void loop() {

    digitalWrite(led, HIGH);
    digitalWrite(led, LOW);
    
}

If anyone has any thoughts, please feel free to advise.

Regards, Tony Barry
Sydney, AUS
 
Status
Not open for further replies.
Back
Top