How to stop a process by running one time

Status
Not open for further replies.

xilinx1001

Member level 3
Joined
Apr 3, 2013
Messages
60
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,781
Hi,

I wrote a code for triggering the ultrasonic SRF05 sensor

The trigger should be given for 10usec and give a delay of 50msec before next trigger

The process is running with the clock and is running continuously.

code:

Code:
process(check_bit,clk)   
begin	


  if(clk'event and clk = '1') then 
  if (check_bit = X"74") then  


   if(count2 <= "000000000001001011000"  ) then
	
    trg2 <= '1';
	   count2 <=count2+"0000000000000000000001" ;
   else	
    trg2 <= '0';
	
	 count2 <=count2+"0000000000000000000001" ;
	 
	 if (count2 ="1001100010010110100000") then
	 
	 count2<="0000000000000000000000";	 
	 		
	end if;
	end if;
  end if;
end if;
 end process;

How to stop it from triggering continuously

I need to trigger it for only once


Thanks in advance
xilinx1001
 

after first trigger off 50 ms duration use infinite loop such as while(1); which stop ur process till reset
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…