cancel
Showing results for 
Search instead for 
Did you mean: 

DCMI using G-Eval and OV9655 (the eval camera)

Posted on November 18, 2011 at 13:55

Hi,

In order to try and make sense of the DCMI I began by playing with the G-Eval board, using Keil MicroVision as my debugger. 

So taking the working RGB 565 firmware as a starting point, I put the OV9655 camera into Colour bar test mode by setting the Color Test Bar bit in the camera registers Com3 and Com20, as per the camera chip data sheet. This displays bars on the Screen of the G-Eval, although they are greyscale, still never mind that for now.

What is troubling me is that in the debugger, I am having trouble converting the hex 32bit data into meaningful RGB data that aligns with what I see on the screen. I figured I would just convert it to binary, break out two 8 bit words from the end, and parse into 5, 6 and 5 bits and convert to decimal to get my RGB back for one pixel.

However I cannot seem to make sense of values I am getting, they often have a heavy green bias. A shot of part of the DMA stream destination memory is attached.

Could somebody talk me through this in order to get started on the right foot please? I am obviously missing something stupid here! First time getting involved with camera ports...

Help!

 

Thanks,

Tony  

    

#dcmi-g-eval
1 REPLY 1
amin23
Associate II
Posted on November 23, 2011 at 10:23

Hi Brad,

how to convert RGB565 to pixel code:

RGB565 pixel bitmasks:

Red:   1111 1000 0000 0000

Green: 0000 0111 1110 0000

Blue:  0000 0000 0001 1111

red = ((data & 0xF800)>> 11);

green = ((data & 0x07E0) >> 5);

blue = (data & 0x001F) << 3;