tonybarry13
Member
[I moved this post to a new thread at the instigation of Robin]
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:
If anyone has any thoughts, please feel free to advise.
Regards, Tony Barry
Sydney, AUS
[Two posters offered thoughts on the topic, which is good - responses below]
@ https://forum.pjrc.com/members/36745-Theremingenieur
@ https://forum.pjrc.com/members/37133-Frank-B
Thank you for your thoughts. As it turned out, I tried the usual (AVR) DDRx / PORTx / PINx and they were actually slower than digitalWrite ( ! ) If there is a Teensy alternative to these commands I have not yet found it. And while the data sheet will be of good use, the Arduino environment is the arbiter of commands and syntax. I have not seen a way to delve into what that environment will accept. But all suggestions are gratefully received.
Regards, Tony Barry
Sydney, AUS
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:
Code:
const int led = 13;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH);
digitalWrite(led, LOW);
}
Regards, Tony Barry
Sydney, AUS
[Two posters offered thoughts on the topic, which is good - responses below]
@ https://forum.pjrc.com/members/36745-Theremingenieur
@ https://forum.pjrc.com/members/37133-Frank-B
Thank you for your thoughts. As it turned out, I tried the usual (AVR) DDRx / PORTx / PINx and they were actually slower than digitalWrite ( ! ) If there is a Teensy alternative to these commands I have not yet found it. And while the data sheet will be of good use, the Arduino environment is the arbiter of commands and syntax. I have not seen a way to delve into what that environment will accept. But all suggestions are gratefully received.
Regards, Tony Barry
Sydney, AUS
Last edited: