Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help me with a program for a trigger reset circuit

Status
Not open for further replies.

me_guitarist

Full Member level 6
Joined
Oct 3, 2006
Messages
338
Helped
0
Reputation
0
Reaction score
0
Trophy points
16
Location
Malaysia
Activity points
0
Can anyone pls help to write a program to make this little circuit work?

thanks in advance.
 

PIC Program needed

how you want the circuit should work
 

PIC Program needed

I need D1 & D2 turn on when SW1 pressed once, reset by SW2.

Sw1 is a normally open device with LED indication in series, SW2 is just a ordinary push to on switch.

This is a demo circuit where I can present my devices to others how it work.

Regards
 

Re: PIC Program needed

Unless I am missing something from your schematic, SW1 would need to latch in order for D2 to be illuminated along with D1 (assuming a working program). This would involve reading GP4 (IC Pin #3... incorrectly labelled as GP3.....) firstly as input, de-bouncing and then modifying TRISIO to output, in order to light D2. If SW1 is a momentary push switch, a release will result in an open-circuit to D2 and not a chance of it being lit.

Also, if SW1 is latching, when a reset occurs from SW2, SW1 will still read closed and D1 & D2 will be lit.

Since GP0, GP1 & GP5 are currently unused, why not redo the scematic and use one of them exclusively for SW1 or D2?
 

PIC Program needed

Hi MIckster,

SW1 is a open circuit device with LED indication so it can't be separate with LED & will turn off if SW1 opened,its ok.

I do some searching on the net & found maybe D-type Flip Flop 4013 logic device is what I want. But I'm an electronic beginner so won't understand the circuit. Is nice if U guys can point me some.

Thanks in advance!
 

Re: PIC Program needed

Even though the LED is incorporated in the switch, there should be separate terminals for the LED in SW1. Check the switch terminals with an Ohm meter and determine the actual switching contacts Vs the LED terminals.

If you can provide a link to the actual switch you have, or take a look at it's datasheet yourself, the job will be made much easier...

For now, imagine the switch has 4 terminals.

You would probably find that only 2 are the ones connected to the switch contacts and the other 2 are connected to the LED. (If 6 terminals, 2 for LED & 4 for switch contacts. etc.)

From here, you could connect SW1's switching contacts to GP4 as you have already, but use a pull-up resistor to stop GP4 from floating when not pressed, then monitor for a ground when pressed. Don't forget a de-bounce routine.

Now, the other 2 terminals could be connected to ground and through a current-limiting resistor to Q1, to control the switch LED.

Or, you could use one of the un-used GP pins to rapidly flash the switch LED, whilst D1 remains constantly lit.

Some food for thought.

Added after 12 minutes:

P.S. Are you really using 24V to supply this circuit, or is that just an "example" schematic?

Which voltage regulator is being used for IC2?
 

Re: PIC Program needed

The solution is use seperatly , SW1 and D2.
 

PIC Program needed

Hi guys,

I use PIC12F675 D-type flip flop to set up the circuit as I found it on the net. It works very well till now.

My supply is 24VDC with 78L05 regulator for PIC.
Coz I need to trigger 24VDC devices on this project.

Added after 2 minutes:

 

PIC Program needed

anyone got any comments on this project?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top