FPGA: SPI Controller

The Serial Peripheral Interface (SPI) Bus is a full duplex synchronous serial communication standard. SPI is common in embedded applications due to it’s high throughput and relatively simple interface. This is a simple SPI controller implementation with an 8 bit word length and a single slave select line.

Continue reading “FPGA: SPI Controller”

FPGA: 4 Bit Counter

The heart of the VGA controller described in previous articles is a modified binary counter. The VHDL code provided below is a simple 4 bit counter with clock enable and reset inputs. The  4BitCounter_Test file provides a testbench to stimulate the counter and verify it’s operation.

A counter can also be implemented as an altium designer schematic, writing no VHDL, with little effort.  In this case an 8 bit counter is used to simplify connection to the on board LEDs.  A clock divider is used to create a 2 Hz clock signal to drive the counter.  When uploaded to the FPGA board the LEDs will cycle indicating that the counter is working.

Both the VHDL files and designer schematic are available for download at the end of this post.


Altium 8 Bit Converter Schematic
Altium 8 Bit Converter Schematic


Continue reading “FPGA: 4 Bit Counter”