TCM8240MD connector and example

Hi.

Just registered here so that I can ask a quick question regarding this cam. It’s not explicitly mentioned in the datash**t, but I assume in JPEG mode that DCLK is used to strobe the data. Can anyone confirm that this is correct?

Reading through the thread it looks like interesting times ahead. Seems to me that the only low-cost way to do this is to blat the data as quickly as possible into memory of some sort, and worry about decoding it all later.

edit>>

Another question: Has anyone tried the Full Mega output without JPEG mode? I know it’s a lot more data, but at least the timing is consistent - unlike JPEG mode, apparently. I should add that I only ordered my modules the other day, so they haven’t arrived yet :(.

Yes, the cam created a DCLK based on your input clock, a divider and it’s pll.

This means that max output clock without PLL is same as input clock.Minimum input is 6 MHz.

You can get the cam to divide down EXTCLK to DCLK by setting low rez outputs and reducing framespeed. 1/2, 1/4 and maby less.

When PLL is active, it tripples the speed. Lowest DCLK I have managed with PLL on is about 8.5 MHz.

PLL must be ON for JPEG mode.

DCLK runns all the time, and data is valid during the high pulse of DCLK and a minimum of 10µs before and after. I recommend using rising edge to trigger if using software to capture data so as to have as much time as possible before data is invalid. If using hardware, latching on falling flank may be better as then the setup-time has been longer.

HBLK is used to tell you when there is valid data. (Only when HBLK is high.)

VBLK is used to tell you that a frame is being transmitted. (Image.) It remains high during the entire image and can be used to synch to start of frame.

Now, if someone could tell me what register to change to get the camera to output a nice image and not just obscure art, I’d be very happy…

Cool. Thanks for the reply.

PLL must be ON for JPEG mode.

So does that imply that for Full Mega output without JPEG you can turn off PLL - in which case you could also reduce the frame rate.

All* you need to do then (according to the data sh**t) is to watch for the VBLK low to high transition, and count 2,928,768 clock pulses (which you’re controlling) capturing bytes until the end of the image. 2.6mb of data later you should have a full-frame uncompressed image.

*Yes, I know it’s not quite that simple :slight_smile:

The problem isn’t synching. That part is very easy.

The problem is:

  1. Where will you put 2.6 MB of data in a microcontroller that only has 8kbyte of memory?

  2. How do you read, store, increment address, check for end of image or count bytes within the alotted time vs your cpu frequency… (My 8-bit avr’s run at 16 MHz or so, and with cam outputting at 6, 3 or 1.5 mbyte/s I then have 2, 4 or 8 instructions pr cycle to do it all in.)

That’s why I am going for a faster mcu with built in hardware for the DMA transfer of the data. Then I can focus on making the system for writing data to SD-cards for my camera project.

Suddently realized… AVR32 does not have internal flash!

Wonder how I could have missed that for so long!

I’ll have to choose something else later. I don’t want external flash on my design as it will ruin the small layout. Oh well…

KreAture:
The problem isn’t synching. That part is very easy.

The problem is:

  1. Where will you put 2.6 MB of data in a microcontroller that only has 8kbyte of memory?

  2. How do you read, store, increment address, check for end of image or count bytes within the alotted time vs your cpu frequency… (My 8-bit avr’s run at 16 MHz or so, and with cam outputting at 6, 3 or 1.5 mbyte/s I then have 2, 4 or 8 instructions pr cycle to do it all in.)

That’s why I am going for a faster mcu with built in hardware for the DMA transfer of the data. Then I can focus on making the system for writing data to SD-cards for my camera project.

Oh sure, I agree. It just seems like JPEG mode is a bit dead in the water for 2 reasons:

  1. The sporadic nature of the data.

  2. The fact that you have to use PLL which means a massively fast data rate.

Of course, with a Silabs running at 50MHz and 1.5 mbyte/s output we’d have 33 instructions per cycle - perhaps more achievable, no?

I’ll let you know when I’ve run it with the AVR32 at 150 MHz.

I’ll utilize the dma too so I should be able to just trigger the storage for each DCLK. The AVR32 setup I have here has 32 MByte memory so I can easily buffer entire frames, even a short MJPEG clip.

KreAture:
I’ll let you know when I’ve run it with the AVR32 at 150 MHz.

I’ll utilize the dma too so I should be able to just trigger the storage for each DCLK. The AVR32 setup I have here has 32 MByte memory so I can easily buffer entire frames, even a short MJPEG clip.

Sounds good.

I’m interested in capturing JPEG data from the camera at full resolution.

I’m now working with a PIC32 that can do 120MIPS at 80MHz (supposedly).

Since it only has 32KBytes of on-board memory, I’m hoping to buffer the image directly to flash memory.

KreAture:
This means that max output clock without PLL is same as input clock. Minimum input is 6 MHz.

When PLL is active, it triples the speed. Lowest DCLK I have managed with PLL on is about 8.5 MHz.

PLL must be ON for JPEG mode

So this 8.5MHz corresponds to a EXTCLK a little less than 3MHz. This is under the minimum spec of 6MHz that you referred to, but I guess it’s best to use a 3MHz clock until I can verify that the microcontroller can handle data at a faster rate.

My plan is to set up interrupts based on two sources: HBLK and DCLK

On rising edge of HBLK, enable interrupts on the rising edge of DCLK.

On falling edge of HBLK, disable DCLK interrupts.

-David

Hi pple …

I am thinking of buying either TCM8230MD or TCM8240MD …

seems like TCM8240MD is having more problem …

which would you recommend ?

I intended to use a PIC uC together with the image sensor.

anyone have similar setup?

if possible, pse share the details, thanks.

(so that it will save my some grieves … :lol: )

I intended to use a PIC uC together with the image sensor.

anyone have similar setup?

if possible, pse share the details, thanks.

why on earth would you post this message on a thread with 150 other messages explaining why its not possible to store a 640x480x16-bit image in 30k of RAM to people who have asked that exact same question multiple times?

silic0re:

I intended to use a PIC uC together with the image sensor.

anyone have similar setup?

if possible, pse share the details, thanks.

why on earth would you post this message on a thread with 150 other messages explaining why its not possible to store a 640x480x16-bit image in 30k of RAM to people who have asked that exact same question multiple times?

thanks for the reply … I am curious …

did I ever mention I going to store it in the PIC uC ?

i am just using it for processing … maybe sending to USB directly …

havent decide yet … just sourcing for ideas …

Thanks … :smiley:

I just wish the one person that has so far gotten a viable image from the TCM8240MD would tell me what register settings he used.

From what I can see it’s black/white so apparantly color was either disabled or that was a single color-channel.

So far my cams, (yes I got a bunch of em), only send me horrible images but very nice testpatterns.

KreAture:
I just wish the one person that has so far gotten a viable image from the TCM8240MD would tell me what register settings he used.

Who was the person who got an image? Twingy got some small images with the TCM8230MD. Was there someone else?

Oh! So that was with the 30!

Nice, then I am still in the lead with this beautiful rendition:

http://kreature.org/ee/avr/cmos_cam/not … re_yet.png

Hi KreAture…

Can I get the part list of the breakout board you have developed for TCM8240MD?

Thank you so much :slight_smile:

Hi KreAture…

Can I get the part list of the breakout board you have developed for TCM8240MD?

Thank you so much :slight_smile:

Hi KreAture…

Can I get the part list of the breakout board you have developed for TCM8240MD?

Thank you so much :slight_smile:

Ofcource ofcource ofcource :slight_smile:

It is in this file, along with the eagle-project files for the board:

http://kreature.org/ee/avr/cmos_cam/TCM … ut_1.1.rar

It’s called .bom you can’t miss it.

Sorry for the triple post :oops: It was giving errors so I couldn’t know they are posted :slight_smile:

Thanks btw