Professional Documents
Culture Documents
1 - POWER - USER - CH - 002 - DS0001 - Exploring A Simple LED Driver
1 - POWER - USER - CH - 002 - DS0001 - Exploring A Simple LED Driver
1 - POWER - USER - CH - 002 - DS0001 - Exploring A Simple LED Driver
Overview
In this exercise we will use a Digital IO Instrument and Configurable LED Controller, to control a row of 8 tricolor LEDs
on the NanoBoard 3000. Each LED has 3, user accessible pins (one for each of the R, G, & B values). Power is
supplied by the NanoBoard using a low-side driver. The RGB signals are accessible through a port plugin component.
To modify the RGB values, we’ll drive each of the LED controller’s inputs with an output of Digital IO Instrument.
Prerequisites
This tutorial assumes a basic understanding of the process of placing and wiring objects in Altium Designer (including
components, net labels (including net connectivity), and wires / buses). No additional information is required.
Design Detail
For this exercise, you will need to place the following components from their respective libraries:
LED_R[7..0]
LED_G[7..0] FPGA NB3000 Port-Plugin.IntLib LEDS_RGB
LED_B[7..0]
U?
LED0_ON LED0
FPGA Peripheral.IntLib LED_CTRL
C
LED_CTRL
U?
Configurable Digital IO
AIN[7..0] AOUT[7..0] FPGA_Instruments.IntLib DIGITAL_IO
DIGITAL_IO
8. From the Libraries panel, locate and select the DIGITAL_IO component and click Place.
9. While it is floating on the cursor, press Tab to open the Component Properties dialog.
10. Change the component’s Designator to U2, then click the Configure button on the lower left of the dialog to
open the Digital I/O Configuration dialog.
11. For the Input Signal AIN[7..0], change the Style property to LED Digits, and the Color property to Red.
12. Using the Add button to the right of the Input Signals section of the Digital I/O Configuration dialog, add 2
additional groups of input signals. These will appear as BIN[7..0] and CIN[7..0] in the list of Input
Signals.
13. For these new Inputs, set the Style property to LED Digits, and the Color property to Green and Black
respectively (we will use Black as there is no Blue option).
14. Now for the Output Signals. For the existing Output Signal, AOUT[7..0], change its Style property to
Slider.
15. Using the Add button to the right of the Output Signals section of the Digital I/O Configuration dialog, add 2
additional groups of Output Signals. These will appear as BOUT[7..0]and COUT[7..0] in the list of Output
Signals.
16. Configure these new Output Signals to also have a style of Slider, as shown in Figure 4.
17. Click OK to close the Digital I/O Configuration dialog and place the DIGITAL_IO component on the schematic
below the LED_CONTROLLER, as shown in Figure 1.
18. Place Bus lines to wire up the LED_CONTROLLER output pins back to its input pins, as shown in Figure
5.
The DIGITAL_IO is also connected to the input pins of the LED_CONTROLLER. These connections can be
created by placing Bus lines directly between the DIGITAL_IO pins and the LED_CONTROLLER pins, or
alternatively, Net Labels can be placed, creating what is called logical connectivity in Altium Designer. As the
designer, you can choose when it is more appropriate to use physical connectivity (hard wiring) or logical
connectivity, depending on the requirements of the design and your organisation.
19. To connect using Net Labels, click the Net Label button, then press the Tab key to open the Net Label
dialog. Type in the Name Blue[7..0], and place the first Net Label on the upper-most Bus line, as shown in
Figure 5.
Figure 5. Connect the output pins to the input pins using Bus lines, and place Net Labels.
27. The Configuration Manager will open automatically, showing the constraint files that have been detected and
added to the project, and the configuration that has been created (NB3000XN_04). A configuration is simply a
set of constraint files, using configurations allows you to divide your constraints into separate constraint files,
and also allows you to easily target the same design to different devices. We will use this automatically
created Configuration, click OK to close the dialog.
28. The build flow buttons should now appear below the NanoBoard icon (Figure 7), with an arrow showing which
target FPGA the design will be downloaded into. Below that is the selected project + configuration that will be
programmed into the device.
29. Click the Program FPGA button in the build flow to run through the stages up through and including
programming the device. Note that the Xilinx ISE software must be installed to be able to do this, as it is used
to perform the Build stage of the process.
30. From the Devices View, right-click the DIGITAL_IO instrument in the Soft Devices chain and select
Instrument to bring up the component’s Instrument Rack.
31. Adjust the sliders and notice the change in the colours and intensity of the tricolour LEDs.
Figure 8. Move the sliders to illuminate the LEDs in the chosen color.