Forum Discussion
Altera_Forum
Honored Contributor
11 years agoTrigger and counter.
Hi, I'm trying to implement a counter that counts down when it recieves a trigger pulse from the hardware (in this case, it's a short burst of AC, in the order of a few hundred µs), which keeps...
Altera_Forum
Honored Contributor
11 years agoI assume this code is placed in a while loop, and you are polling the trigger_reg. However, if your burst is short, then your polling is simply missing the trigger. You should be using interrupts.
Better yet, you should implement this circuit in hardware - verilog or vhdl.