![Digilent Nexys 4 Reference Manual Download Page 28](http://html1.mh-extra.com/html/digilent/nexys-4/nexys-4_reference-manual_2497480028.webp)
Nexys4 DDR™ FPGA Board Reference Manual
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page
28
of
29
Vdd
Gnd
Pulse Window
Pulse Width
Digital Signal
Analog Signal (PWMA)
= 1 / Pulse Frequency (
f
)
Figure 31. Simple waveform represented as PWM.
The PWM signal must be integrated to define an analog voltage. The low-pass filter 3dB frequency should be an
order of magnitude lower than the PWM frequency, so that signal energy at the PWM frequency is filtered from
the signal. For example, if an audio signal must contain up to 5 KHz of frequency information, then the PWM
frequency should be at least 50 KHz (and preferably even higher). In general, in terms of analog signal fidelity, the
higher the PWM frequency, the better. Figure 32 shows a representation of a PWM integrator producing an output
voltage by integrating the pulse train. Note the steady-state filter output signal amplitude ratio to Vdd is the same
as the pulse-width duty cycle (duty cycle is defined as pulse-high time divided by pulse-window time).
10% Duty Cycle
50% Duty Cycle
90% Duty Cycle
Vdd
Gnd
PWMA = 0.1·Vdd
PWMA = 0.5·Vdd
PWMA = 0.9·Vdd
Figure 32. Representation of a PWM integrator producing an output voltage by integrating the pulse train.
17 Built-In Self-Test
A demonstration configuration is loaded into the Quad-SPI flash device on the Nexys4 DDR board during
manufacturing. The source code and prebuilt bitstream for this design are available for download from the Digilent
website. If the demo configuration is present in the flash and the Nexys4 DDR board is powered on in SPI mode,
the demo project will allow basic hardware verification. Here is an overview of how this demo drives the different
onboard components:
The user LEDs are illuminated when the corresponding user switch is placed in the on position.
The tri-color LEDs are controlled by some of the user buttons. Pressing BTNL, BTNC, or BTNR causes them
to illuminate either red, green, or blue, respectively. Pressing BTND causes them to begin cycling through
many colors. Repeatedly pressing BTND will turn the two LEDs on or off.
Pressing BTNU will trigger a 5 second recording from the onboard PDM microphone. This recording is then
immediately played back on the mono audio out port. The status of the recording and playback is
displayed on the user LEDs. The recording is saved in the DDR2 memory.
The VGA port displays feedback from the onboard microphone, temperature sensors, accelerometer, RGB
LEDs, and USB Mouse.
Connecting a mouse to the USB-HID Mouse port will allow the pointer on the VGA display to be
controlled. Only mice compatible with the Boot Mouse HID interface are supported.
The seven-segment display will display a moving snake pattern.
All Nexys4 DDR boards are 100% tested during the manufacturing process. If any device on the Nexys4 DDR board
fails test or is not responding properly, it is likely that damage occurred during transport or during use. Typical
damage includes stressed solder joints and contaminants in switches and buttons resulting in intermittent failures.