**Project: Blinking LED on DE0-Nano (Intel FPGA)**

**Tools You'll Need**
* [FPGA](https://www.ampheo.com/c/fpgas-field-programmable-gate-array) Board: DE0-Nano (Cyclone IV [EP4CE22F17C6N](https://www.ampheo.com/product/ep4ce22f17c6n-16601))
* Software: Intel Quartus Prime Lite Edition
* Language: Verilog
* PC OS: Windows/Linux
**Step-by-Step Guide**
**1. Create a New Quartus Project**
* Open Quartus Prime Lite → File > New Project Wizard
* Name: blinky
* Family: [Cyclone IV E](https://www.vemeko.com/cyclone-iv-e-fpga/)
* Device: [EP4CE22F17C6](https://www.ampheo.com/product/ep4ce22f17c6-17774)
**2. Write Verilog Code**
Create blinky.v:
```
verilog
module blinky (
input wire clk, // 50 MHz onboard clock
output wire led // Connect to one onboard LED
);
reg [24:0] counter = 0;
always @(posedge clk) begin
counter <= counter + 1;
end
assign led = counter[24]; // Adjust bit to control blink rate
endmodule
```
**3. Assign Pins to FPGA I/O**
Use Pin Planner or create .qsf file entries manually:
For DE0-Nano:

**Manual .qsf Example:**
```
tcl
set_location_assignment PIN_R8 -to clk
set_location_assignment PIN_A15 -to led
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to clk
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to led
```
You can also use the GUI (Assignments > Pin Planner) to do this visually.
**4. Compile the Project**
* Click Compile Design (takes ~1–2 minutes)
* Fix any syntax or pin assignment issues
**5. Program the FPGA**
* Connect the DE0-Nano via USB
* Open Programmer (Tools > Programmer)
* Detect USB-Blaster
* Load .sof file and click Start
Your onboard LED should now blink!
**Bonus: How It Works**
* The counter increments at 50 MHz
* counter[24] toggles ~1.49 Hz = ~0.67s on/off → visible blinking
Change counter[23] or counter[25] to adjust speed.
**Summary**
