Frequency meter based on FPGA Cyclone II_EP2C5 EP2C8 Frequency meter based on FPGA_Cyclone_II_EP2C5/EP2C8 Function description: Press the 1, 2, 3... keys on the 4*4 keyboard to measure the frequency division signals of 25000000Hz, 12500000Hz... in turn and display them on 8 digital tubes. This design consists of the following four modules. freqtest.v -8-bit decimal frequency meter (top module)KeyBoard.v -4*4 keyboard scanning module (select different measured signals)cnt10.v -decimal counter module (measure frequency and count)scan_led.v -digital tube dynamic scanning module (display measurement results)/* freqtest.v -8-bit decimal frequency meter*//* Copyright 2008-2018 *//*modification history--------------------01a,16jan08,52mcu 163haole@163.com*//*DEscriptION Cyclone II EP2C5Q208C*/module freqtest(clock,freq_input,dig,seg,test,col,row,rstkey);input clock; //system clockinout freq_input; //measured signal clockoutput[2:0] dig; //digital tube selection outputoutput[7:0] seg; //digital tube segment output pin output[9:0] test; //output frequency signal for testing output [3:0] col ;input [3:0] row ;input rstkey ;reg[25:0]counter; //clock frequency division counter reg[31:0]freq_result; //frequency measurement result register wire [31:0]pre_freq; //pulse counting register reg rst;wire divide_clk; //1Hz gate signal wire clk_scan; //digital tube scanning clock wire cout1,cout2,cout3,cout4,cout5,cout6,cout7;assign clk_scan = counter[15]; //dynamic scanning clock assign test = counter[9:0]; //output frequency signal for testing reg [31:0] Mega_cnt;reg[3:0]key;reg freq_input_r; //clock frequency division process: separate 1hz reference signal always @(posedge clock)begin if(divide_clk) counter<=26\'d0; else counter<=counter+1\'b1;endassign divide_clk=(counter>=26\'d50000000);//
You Might Like
Recommended ContentMore
Open source project More
Popular Components
Searched by Users
Just Take a LookMore
Trending Downloads
Trending ArticlesMore