Re: Need help in converting YUV to RGB using OV7620
- From: paul$@pcserviceselectronics.co.uk (Paul Carpenter)
- Date: Sat, 11 Mar 2006 11:28:06 +0000 (GMT)
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
.
- References:
- Re: Need help in converting YUV to RGB using OV7620
- From: nuky8181
- Re: Need help in converting YUV to RGB using OV7620
- Prev by Date: Re: Which RTOS?
- Next by Date: Re: Can program 16F688 but not 18F4431
- Previous by thread: Re: Need help in converting YUV to RGB using OV7620
- Index(es):
Relevant Pages
|