Re: Need help in converting YUV to RGB using OV7620



On Saturday, in article
<Q4GdnVdN9d9LHo_ZnZ2dneKdnZydnZ2d@xxxxxxxxxxxx>
k2skate2003@xxxxxxxxx "nuky8181" wrote:
Hi,

Anyone can tell me if I am getting the wrong U and V data?

I have check that there is signal coming our from the UV port of the
OV7620 using oscilloscope.

My micro controller operating freq is 20Mhz while the OV7620 is returning
PCLK at 5Mhz. Thus, if I am to read in thy Y or UV data continuously, i
should be able to read in 4 identical data for either Y or UV for each
PCLK.

I would love to know how you expect the microcrontroller to gurantee
grabbing every single data point as I doubt you are doing what you
think you are doing.

Firstly you have NOT checked that your microcontroller can accept data
at 10MHz for UV data! On these devices Y data is clocked out at 5MHz on
ONE clock edge, whilst UV is clocked out at 10MHz by using the rising
edge for one of the data bytes and falling edge for the next byte. There
is a register in the OV7620 for setting which edge clocks U or V so read
the datasheet.

Unless you have taken the UV data to ports on the microcontroller that
work either on BOTH edges of the PCLK signal or to two ports that can
be configured one on rising edge the other on falling edge, it won't
work.

Similarly the microcontroller must really be able to get the data in by
clocking the data in from an EXTERNAL clock to drive the data capture
NOT the microcontroller. Then there is the Y data at 5MHz can you really
get your 20MHz microcontroller to clock in 15MHz of continuous data as
16/24 bit data.

I have verify this by reading in data from the digital port and check that
everydata is repeated 4 times. Thus somehow, i am quite convince that I am
getting the correct data but I amd still unable convert it into RGB
value.

Have you really checked what happens to the data on BOTH edges of PCLK?
I doubt it. You have not checked the integrity of the data against a
known colour pattern object, to check the data is correct.

May I know if anyone have ever tried reading in the YUV data and manage to
convert it to RGB data? Is it possible to just show me that section of the
code?

Due to the data transmission structure most people use some form of PLD/FPGA
to clock the data into memory for the processor to deal with. On cheap camera
modules they use an ASIC to convert the data into something like JPEG format
and transmit the JPEG data as a stream of data.

Regards,
Linus

--
Paul Carpenter | paul@xxxxxxxxxxxxxxxxxxxxxxxxxxx
<http://www.pcserviceselectronics.co.uk/> PC Services
<http://www.gnuh8.org.uk/> GNU H8 & mailing list info
<http://www.badweb.org.uk/> For those web sites you hate

.



Relevant Pages

  • Re: Your patch: ARM: AMBA: Add pclk definition for platforms using primecells
    ... Your patch added a new clock to the ep93xx platform called "apb_pclk". ... Since there are no users of "pclk" in the kernel I have no problems just ...
    (Linux-Kernel)
  • Re: Is this wrong behavior?
    ... always @(posedge pclk or negedge presetn) ... IDLE: begin ... Is t_ready generated in logic clocked by pclk? ... May of the issues of "same cycle" behavior where the simulation output changes in the same cycle as the input is because of clocking issues where the input gets scheduled just before the clock transition events are triggered. ...
    (comp.lang.verilog)
  • Re: Help me solve this design problem PLEEEZ
    ... any single chip microcontroller could handle the job - the ... >> clock the microcontroller at 32.768kHz. ... which added with some logic gates allows the first timer to work ...
    (sci.electronics.design)
  • Re: need a prog to pause
    ... that comes to mind is to count about 5 clock ticks of the timer ... unsigned short temp = CLOCK; ... microcontroller can in a never ending loop to update a monitor display. ... However in about an hour the PC overwrites some values on the ...
    (comp.os.msdos.misc)
  • Re: Help me solve this design problem PLEEEZ
    ... > that needs a 24-bit counter, for which you could use the LSI LS7166 ... any single chip microcontroller could handle the job - the ... > clock the microcontroller at 32.768kHz. ... which added with some logic gates allows the first timer to work ...
    (sci.electronics.design)