SparkFun Forums 

Where electronics enthusiasts find answers.

Have a good idea for a new product for SFE or Olimex? Let us know!
By chrisjp
#91802
Hey all,

I've developed a new breakout board / interface to an FPGA starter board.

The board consists of the TCM8240 camera, as well as the Cypress Semi Cy768013A. This board then connects to the Spartan 3E starter kit via the board-board extension connector.

So far the camera is producing the proper full size MEGA images without JPEG. I'm currently working on getting the USB development suite set up on this PC (windows 7 driver problems argg). From using the cypress chip in the past it shouldn't be too bad to get it working.

Cool tidbits about the board:
8 bit/48 Mhz interface to usb FIFOs.
All signals routed to the FPGA, including I2C.
Optional interconnection via header to connect USB MCU and camera's I2C pins. Currently the camera is controlled by the FPGA.

If anyone is interested in the eagle files/pcb/or a built board, please let me know as I have 3-4 extras.

Sorry for the craptastic image, it was taken through a magnifying glass with an iphone ;)

Image

Image

Look forward to getting this working!
Chris
By KreAture
#91805
chrisjp, I have dropped the 8240 due to the craptastic images it has delivered. If you have settings that may solve my issue, I'd be veryy happy.

The AVR32 with linux appears to have no problems handling the data flow from the TCM8240 and my V4L2 integration appears to work well, but no matter what I do with the settings, I get over-exposed pink images that usually are off-centered or contain other black marks/divisions.

I have entire sets of images captured automatically as the settings are cycled and they all give horrible results. I may be able to post a video of the images tomorrow.
By lilalinux
#91977
Has anybody yet found out, how to configure the cam to operate the TCM8230MD with 2.5V PVDD/IOVDD?

The datash**t :roll: says:
*If using 2.5V, must input setting command. (Default setting is 2.8V.)
I think :idea: they mean the SCMD register, which is a 20 bit register spanning from 2B to 2D. It's all 0s per default except bit B2.

Also I wonder, how am I supposed to configure IO to a different voltage using IO with the wrong voltage :?:

I'd really love to power this device with 2.5V as I want to connect it to a FPGA (Spartan 3E) where I could power one bank directly with 2.5V and wouldn't need level shifters.
By KreAture
#92005
Here's a picture I took at 352x288.
I tried a tonn of settings and the best I ended up with gave this.
Image
By KreAture
#92045
Very nice lilalinux!
That looks like it is behaving much better than the TCM8240.
My breakout for the 8230 is done now and I am adjusting my TCM8240 V4L2 driver to allow avr32Linux support for the TCM8230 too.
By choppter
#92925
Hey KreAture, lilalinux,

Can you share the I2C register settings you are using?
I am getting those pinkish pictures at all resolutions and even the color bar test screen has funny colors...
I am using the default YUV mode and use ImageMagick to display it.

Thanks,
Thomas
By KreAture
#92929
If your colorbar test patters look funny, you are using the wrong YUV or RGB interpretation. For RGB mode remember, the cam outputs GBR.
For YUV, check the doc, I don't remember the sequence, but it is odd.

Here's a pic from the tcm8230 btw:
Image
The banding is probably noise from my poor interfacing. Looking into fixing that. (2.8v doesn't talk well to 3.3v at 20 MHz.)
By lilalinux
#92931
I'm using the cam in RGB mode and extend the 16 bits to 24 bits by mirroring the LSBs of each channel. e.g. if you have 5 bits 43210 you can extend that to 8 bits 43210012. That gives nicer results than just shifting and is cheaper to implement than spreading, as you don't need arithmetics (especially no division).

For my TCM8230 I use only 3 registers and in this order:

02 : fps_30, acf_60, dclk_pol_normal, acf_det_auto
1e : d_mask, codesw_off, codesel_orig, hsyncsel_blanking, testpic_no, picsel_colorbar
03 : doutsw_on, datahz_out, picsiz_vga, picfmt_rgb, cm_color
By lilalinux
#92932
KreAture wrote:For RGB mode remember, the cam outputs GBR
Oh yeah, I almost forgot about that!
By choppter
#92938
KreAture,

I figured it is the UYVY 4:2:2 coding, but I guess this could be wrong. I'll try shuffling this around a bit.

I saw some sort of banding too. But when I set DCLKP to inverse it worked. (I capture into a dualport BRAM in a Spartan6)

Thanks
Thomas
By choppter
#92940
lilalinux,

Interesting expansion method! If I don't get the YUV stuff to work I'll try this.

Thanks for the registers! Makes all sense, but what did you set:
1e : d_mask to?

Thomas
By KreAture
#92943
I only change the bits I am supposed to.

My driver reads all registers off camera and stores em in a struct with bitfields.

Whenever I need to change anything I can adjust the values I want and write the reg back to cam. In some cases I read the reg from cam first, if it's a flag that can change by itself.

I keep all values on default, in d_mask case it is supposed to be 01 I believe.
By lilalinux
#92961
KreAture wrote:I keep all values on default, in d_mask case it is supposed to be 01 I believe.
Yes, d_mask is 01.
By hust
#92972
@linalux

Have you found the answer to 2.5V issue?
I'm having exactly the same problem

If it is the SCMD register, what value must it have for 2.5V, anything except
the default value ?

And can it be done starting from 2.5??
  • 1
  • 18
  • 19
  • 20
  • 21
  • 22
  • 31