Zybo Z7 PCam 5C Demo
Zybo Z7 PCam 5C Demo
(https://reference.digilentinc.com/_detail/learn/programmable-logic/tutorials/zybo-z7-pcam-5c-demo/pcam-5c-
running.jpg?id=learn%3Aprogrammable-logic%3Atutorials%3Azybo-z7-pcam-5c-demo%3Astart)
Overview
Description
The Zybo Z7 Pcam 5C project demonstrates the usage of the Pcam 5C as a video source by forwarding the streaming image data
out to the HDMI TX port. The behavior is as follows:
Video data streams in through the Pcam port and out through the HDMI source (TX) port.
A UART interface is available to configure the image sensor and additional post processing IP Cores.
The following table lists the currently supported video resolutions and output formats from the image sensor. Note that
resolutions with frame rates lower than 60Hz are over sampled to 60Hz to output over the HDMI port.
Supported Supported Image Sensor Supported OV5640 Image Image Processing Features
Resolutions: Output Formats Processing Features Performed in FPGA
1 of 11 8/28/2018, 7:38 PM
Zybo Z7 Pcam 5C Demo [Reference.Digilentinc] https://reference.digilentinc.com/learn/programmable-logic/tutorials/zyb...
Supported Supported Image Sensor Supported OV5640 Image Image Processing Features
Resolutions: Output Formats Processing Features Performed in FPGA
Features Used
Not Used Used
4 slide switches X
5 LEDs X
6 push buttons X
USB-UART Bridge X
HDMI Sink X
HDMI Source X
User EEPROM () X
Serial Flash X
Prerequisites
2 of 11 8/28/2018, 7:38 PM
Zybo Z7 Pcam 5C Demo [Reference.Digilentinc] https://reference.digilentinc.com/learn/programmable-logic/tutorials/zyb...
Skills
Basic familiarity with Vivado & SDK
This experience can be found by walking through our “Getting Started with Vivado” guide
Hardware
Zybo Z7-20 board
External 5V supply (http://store.digilentinc.com/5v-2-5a-switching-power-supply/)
Micro-USB cable
1 HDMI Type A to Type A or HDMI Type A to DVI-D cable
1 Pcam 5C assembly
HDMI or DVI monitor
Software
Vivado Design Suite & Xilinx SDK 2016.4
Version 2016.4 must be used to generate the project
Downloads
Zybo Z7-20 Pcam 5C Project Repository – ZIP (https://github.com/Digilent/Zybo-Z7-20-pcam-5c/releases/download/v2016.4-1
/Zybo-Z7-20-pcam-5c-2016.4-1.zip) GIT Repo (https://github.com/Digilent/Zybo-Z7-20-pcam-5c)
3 of 11 8/28/2018, 7:38 PM
Zybo Z7 Pcam 5C Demo [Reference.Digilentinc] https://reference.digilentinc.com/learn/programmable-logic/tutorials/zyb...
Plug one end of the HDMI cable into the HDMI TX port of the Zybo Z7 and the other into your HDMI monitor. Also
attach a USB micro cable between the Zybo Z7 and your computer. Finally, attach an external 5V power supply, since the
power demand surpasses the USB power budget.
(https://reference.digilentinc.com/_detail/learn/programmable-logic/tutorials/zybo-z7-pcam-5c-demo/pcam-5c-
hdmi.jpg?id=learn%3Aprogrammable-logic%3Atutorials%3Azybo-z7-pcam-5c-demo%3Astart)
4 of 11 8/28/2018, 7:38 PM
Zybo Z7 Pcam 5C Demo [Reference.Digilentinc] https://reference.digilentinc.com/learn/programmable-logic/tutorials/zyb...
Attach the Pcam 5C assembly (which includes the Pcam 5C and the attached 15-pin flat flexible cable) by inserting the other
end of the FFC into the Pcam connector on the Zybo Z7 as shown in image below. Ensure the cable is securely latched by
pressing down firmly on the connector with two fingers. For a more detailed set of instructions, see the Pcam section in the
Zybo Z7 Reference Manual (https://reference.digilentinc.com/reference/programmable-logic/zybo-z7/reference-manual#pcam_port).
If the cable has become disconnected from the Pcam 5C, please see the Pcam 5C reference manual
(https://reference.digilentinc.com/reference/add-ons/pcam-5c/reference-manual) for instructions on how to reattach it.
(https://reference.digilentinc.com/_detail/reference/programmable-logic/zybo-z7/zybo-z7-pcam-
attach.png?id=learn%3Aprogrammable-logic%3Atutorials%3Azybo-z7-pcam-5c-demo%3Astart)
To see the UART communication channel, open a terminal program on your computer set to 115200 baud rate, 8 data bits,
no parity bit and 1 stop bit. On startup, the Zybo Z7 will display the image sensor control and post processing menu, shown
below.
(https://reference.digilentinc.com/_detail/learn/programmable-logic/tutorials/zybo-z7-pcam-5c-demo/pcam-5c-
teraterm.png?id=learn%3Aprogrammable-logic%3Atutorials%3Azybo-z7-pcam-5c-demo%3Astart)
5 of 11 8/28/2018, 7:38 PM
Zybo Z7 Pcam 5C Demo [Reference.Digilentinc] https://reference.digilentinc.com/learn/programmable-logic/tutorials/zyb...
Color Accuracy
6 of 11 8/28/2018, 7:38 PM
Zybo Z7 Pcam 5C Demo [Reference.Digilentinc] https://reference.digilentinc.com/learn/programmable-logic/tutorials/zyb...
We have seen some issues with the accuracy of the colors produced in some conditions. The affect is that colors seem less vivid
and washed out. In some cases the image tends to look a little skewed towards “yellow-ish”. When the gamma adjustment is
set higher, this affect becomes more noticeable. The images below compare the image produced with the Pcam 5C to images
produced by a high-quality USB web camera. The camera used was a Logitech C920. The USB camera is on the right and
the Pcam 5C image is on the left.
(https://reference.digilentinc.com/_detail/learn/programmable-logic/tutorials/zybo-z7-pcam-5c-demo/pcam-5c-color-gamma-
crop.jpg?id=learn%3Aprogrammable-logic%3Atutorials%3Azybo-z7-pcam-5c-demo%3Astart)
(https://reference.digilentinc.com/_detail/learn/programmable-logic/tutorials/zybo-z7-pcam-5c-demo/pcam-5c-color-
crop.jpg?id=learn%3Aprogrammable-logic%3Atutorials%3Azybo-z7-pcam-5c-demo%3Astart)
7 of 11 8/28/2018, 7:38 PM
Zybo Z7 Pcam 5C Demo [Reference.Digilentinc] https://reference.digilentinc.com/learn/programmable-logic/tutorials/zyb...
Some situations that contain a mix of dark and bright areas will cause the brighter areas to look overexposed. Notice the
very white area of the image produced by the Pcam 5C.
(https://reference.digilentinc.com/_detail/learn/programmable-logic/tutorials/zybo-z7-pcam-5c-demo/pcam-5c-exposure-
crop.jpg?id=learn%3Aprogrammable-logic%3Atutorials%3Azybo-z7-pcam-5c-demo%3Astart)
8 of 11 8/28/2018, 7:38 PM
Zybo Z7 Pcam 5C Demo [Reference.Digilentinc] https://reference.digilentinc.com/learn/programmable-logic/tutorials/zyb...
The top and left edges of the image have a single pixel gray line. This artifact is introduced by our post processing IP,
axis_raw_demosaic. It is an accepted side-effect of the border interpolation algorithm used and we plan to provide other
options in future versions of the IP. The image below is taken with the Pcam 5C lens cap on, which makes the gray line very
visible on the all black image.
(https://reference.digilentinc.com/_detail/learn/programmable-logic/tutorials/zybo-z7-pcam-5c-demo/pcam-5c-
border.jpg?id=learn%3Aprogrammable-logic%3Atutorials%3Azybo-z7-pcam-5c-demo%3Astart)
9 of 11 8/28/2018, 7:38 PM
Zybo Z7 Pcam 5C Demo [Reference.Digilentinc] https://reference.digilentinc.com/learn/programmable-logic/tutorials/zyb...
(https://www.facebook.com
/Digilent)
(https://www.youtube.com
/user/DigilentInc)
(https://instagram.com
/digilentinc)
(https://github.com/digilent)
(https://www.reddit.com
/r/digilent)
10 of 11 8/28/2018, 7:38 PM
Zybo Z7 Pcam 5C Demo [Reference.Digilentinc] https://reference.digilentinc.com/learn/programmable-logic/tutorials/zyb...
(https://www.linkedin.com
/company/1454013)
(https://www.flickr.com/photos
/127815101@N07)
11 of 11 8/28/2018, 7:38 PM