Hi everyone!!
Introduction on DE0-Nano Board
The DE0-Nano board introduces a compact-sized FPGA development platform suited for a wide range of portable design projects, such as robots and mobile projects.
The DE0-Nano is ideal for use with embedded soft processors—it features a powerful Altera Cyclone IV FPGA (with 22,320 logic elements), 32 MB of SDRAM, 2 Kb EEPROM, and a 64 Mb serial configuration memory device. For connecting to real-world sensors the DE0-Nano includes a National Semiconductor 8-channel 12-bit A/D converter, and it also features an Analog Devices 13-bit, 3-axis accelerometer device.
The DE0-Nano board includes a built-in USB Blaster for FPGA programming, and the board can be powered either from this USB port or by an external power source. The board includes expansion headers that can be used to attach various Terasic daughter cards or other devices, such as motors and actuators. Inputs and outputs include 2 pushbuttons, 8 user LEDs, and a set of 4 dip-switches.
About my Mini Project
I am starting with a warm-up activity to blink a LED using a 50MHz clock crystal oscillator and I am planning to release mini-project series.
Since the clock frequency is of 50Megahertz, using a 32bit counter to count ''+1" for every positive edge of the clock pulse, to make it run for 2500000 times i.e., 0.5 seconds would have passed. For every change in the state of the LED(ON/OFF), the 32bit counter is initialized to 'zero' and counts 2500000 until the state of the LED is inverted. So, for a LED to ON and OFF together takes 1 second.
Software used: Quartus Prime 20.1 along with Modelsim
Coding Language: Verilog HDL
Code:
module LED_Blink
(
input clk, rst,
output out
);
reg [31:0] counter;
reg LED;
initial
begin
LED = 1'b0;
counter = 32'b0;
end
always @ (posedge(clk))
begin
if(rst==1) //hold the current state of LED
begin
if(counter<2500000)
counter <= counter + 1'b1;
else
begin
LED <= !LED;
counter <= 32'b0;
end
end
else
counter <= 32'b0;
end
assign out = LED;
endmodule
Output Video
Please comment on my flaws or suggestions if any.
Also, suggest to me some great mini projects
Thank you for your support guys!