rar

Frequency meter based on FPGA Cyclone II_EP2C5 EP2C8

  • 2013-09-22
  • 3.92KB
  • Points it Requires : 2

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);//

unfold

You Might Like

Uploader
flexbuilder
 

Recommended ContentMore

Popular Components

Just Take a LookMore

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
×