Generating a output signal with a specific pulse width

A

arturomeza

How can I generate an output signal with a specific pulse width using
VHDL. I'm using a 1MHz clock and the pulse width that I'm trying to
generate has a width of 200us, the signal does not repeat it self.
Someone told me use a downto counter, but I'm not sure how to get
started. Thanks a lot.
 
J

Jonathan Bromley

How can I generate an output signal with a specific pulse width using
VHDL. I'm using a 1MHz clock and the pulse width that I'm trying to
generate has a width of 200us, the signal does not repeat it self.
Someone told me use a downto counter, but I'm not sure how to get
started. Thanks a lot.

Solution (1)
~~~~~~~~~~~~
Synchronously...
Wait for the signal that says "I want a pulse".
Set your output pulse high.
Preset a counter to 200, and let it count down at 1MHz.
Wait until the counter counts down to zero.
Clear your output pulse to low. For extra credit,
consider metastability issues on the control input.

Solution (2)
~~~~~~~~~~~~
Design a state machine to solve the original problem.
Invent names for each of the 201 states that it will need.
Code the state machine in VHDL in the standard manner.
Make appointment at chiropractor to deal with ensuing
carpal tunnel injury.

Solution (3)
~~~~~~~~~~~~
Find a very, very elderly electronics engineer. Rummage in
his junk box (it will surely be "his"; there are few elderly
female electronics engineers) until you find a 74LS221
monostable. Rummage even deeper until you find the corresponding
data sheet. Obtain suitable resistor and capacitor, having first
calculated the required values according to data sheet. Connect
to appropriate pins of 74LS221. Apply 5V power appropriately.
Be prepared to answer embarrassing questions about why the 1MHz
clock input is unused.

Solution (4)
~~~~~~~~~~~~
Abandon your career and take up real-estate agency or something
else that is more profitable and less taxing than electronics.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail:[email protected]
Fax: +44 (0)1425 471573 Web: http://www.doulos.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
H

Hal Murray

Be prepared to answer embarrassing questions about why the 1MHz
clock input is unused.

"Hey, kid. I'll give you this watch if you tell me how tall
that building is."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top