Posts

Showing posts from May, 2025

FPGA in VHDL - 7-segment display

Image
 There is an idea to drive 7-segment display with FPGA Let's start with the hardware. The construction of the display is quite simple. For one display we have 7 + 1 diodes. One LED for each segment of 'figure 8' plus one for display point. See this: Then, the 'inside' schematic is as below. Presenting here only one (of two) option(s), named common anode, as this is what is built in Nexys Digital Systems Builder board. Also, the PNP transistor and resistor is not a part of the 7-segment display. It is here for explaining logic of driving with development board. Schematic of 7-segment display with CA (common anode) arrangement as in Nexys FPGA board From this schematic you can fetch some important information. To activate a single segment, let's say A, we need to do two things: 1. Drive the anode. As this arrangement is with PNP transistor, the anode is 'activated' by providing LOW state to AnodeDrive. This makes a possibility for the current to flow thro...

Code FPGA: AND gate in VHDL

Image
 AND gate in VHDL This is a code used in FPGA program to represent AND gate. The .vhd file is a main file, telling what the programmer wants to achieve. In below example we want to use two switches as user inputs. User can set each of switch to be set to '0' (low state) or '1' (high state). Result of the AND operation will be shown on LED, where '1' equals to diode lighting, '0' diode stays inactive or dark. In my case the program is edited and synthesised in software named ISE 14.7 It is a free software available from XILINX and possible to run on Windows 10 with Virtual machine (from ORACLE). I hadn't had a succesful installation on Win 11.  Note: Maybe it can work with simultaneous linux installation (Win 11 + Linux). In this case ISE would be installed on Linux. I didn't try this. Hardware: I have an old Nexyx - Digital Systems Builder board, where I tested my programs.  I used small software named Adept from DIGILENT, where I can recognise ...