one shot and continuous trigging

Status
Not open for further replies.

Kryten

New Member
Hi I need some help in putting together a circuit that can give a 5v one shot by pressing S1 and give continuous pulses when S2 is pressed.

The pulses are about 4-5 ms long and the pause is 0.5 s long.

I have been looking at 555 timer but cant get my head around how to make the continuous pulse train.

Thanks in advance
 
If you are PIC fan, it it is much easier to design such circuit than using 555 timer. Any further adjustments would be easy since no hardware to be replaced, instead, it is only changing delay time in the software.
 
Last edited:
How do you propose to end the continuous pulse train that occurs from S2? What I mean is, after S2 is pressed and pulse train starts, what would end the pulse train?
 
So something like using a 12f629 and have two input pins and one output pin.

code something like this?
Code:
if GPIO.1 ==1 then 
 {     GPIO.3=1;
       delay.ms(5);
       GPIO.3=0;
}
elseif GPIO.2 ==" then
{      GPIO.3=1;
       delay.ms(5);
       GPIO.3=0;
       delay.ms(500);
       GPIO.3=1;
       delay.ms(5);
       GPIO.3=0;
}
else 
{     
      GPIO.3=0;
}
 
Last edited:
How do you propose to end the continuous pulse train that occurs from S2? What I mean is, after S2 is pressed and pulse train starts, what would end the pulse train?

Was thinking about a switch rater than a push button
 
You need two 555 timers (or a 556 dual timer). Connect the trigger of one 555 configured as a 4.5ms one-shot to the output of the second 555 connected as an astable with a period of 0.5s. Use S1 to trigger the one-shot. Use S2 (SPDT) to connect either S1 or the astable to the one-shot.
 
Why wont my code work??

Code:
#include <p12f629.inc>

 void main()
{
  CMCON  = 7;             // Turn off the comparators
  TRISIO = 0x07;          // Set up 0,1 as inputs and 2-5 as output
  GPIO = 0;               // Turn off all pins

 while (1){
 if (GPIO.1 == 1 & GPIO.2 ==0) Then
	{
	GPIO.3 = 1;
	delay.ms(5),
	GPIO.3 = 0;
	}
else if (GPIO.1 == 0 & GPIO.2 == 1) then
	{
	GPIO.3 = 1;
	delay.ms(5),
	GPIO.3 = 0;
	delay.ms(500);
	}
else 
	{
	GPIO.3=0;
	}
}
}

please help me
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…