Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help, Verilog code for frequency "adder and substractor"

Status
Not open for further replies.

sebastian.barbosa

Newbie level 1
Joined
May 12, 2013
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,288
Hello, im new to verilog and i need your help.
I have to create a verilog code capable of "add or substract" frequencies (+-1 Hz).
What i mean is this:

I need a code with (for example) input A, and input B


If I have a 1K [Hz] clock input , I can divide its frequency to (for example) 500 hz . Then the my code has to do this:
If A then add 1 hz to 500hz (now the frequency is 501 hz) , If B then substract 1 hz from my current frequency.


I cant think how to make this code. I know i can divide frequency with counters but add or substract 1 hz is out of my knowledge. Thank you
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top