- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi, how can I write a program for a timer which counts up to 6.4 micro seconds?
thanks in advanceLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
entity timer is
end entity timer;
architecture time of timer is
signal timer : std_logic;
begin
timer <= '0', '1' after 6.4 us;
end architecture time;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use a template from Quartus
Create a new vhdl file. Select edit menu->insert template-> Select VHDL->Full Designs->Counters->Binary Count Then modify then MAX_COUNT value depending on your input clock speed. i.e. how many input clock periods in 6.4us Templates are agood way of finding out how to code various constructs Hope this helps- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tricky gave a solution which is NOT synthesizable. Good for simulation only.
I am agree with Vernmid
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page