bigal_scorpio
Active Member
Hi to all,
I am trying to get my head around what I thought would be a simple task!
I am running a Carputer and have used a relay to bridge the on off switch (momentary push to make switch) so when the relay is energised I.E. when the ignition is turned on, it shorts the switch for about a second turning on the PC.
When the ignition is turned off it again shorts the switch again and turns off the PC (standby)
Now this setup is working but the problem is if I need to turn the ignition on or off a couple of times within a short period. This can cause the pulse to be ignored if the PC is still either starting up or shutting down.
So I thought why not use a PIC and have a set period - say a minute - where the PIC would ignore any more offs and ons of the ignition and always be in sync.
Thats where I get stuck! I think I can manage the program part which I would be writing in MikroBasic, but I cannot for the life of me think how to go about the actual logic of the on, off and ignore. The more i try and think about it the more puzzled I become.
Any suggestions out there?
Thanks.........Al
I am trying to get my head around what I thought would be a simple task!
I am running a Carputer and have used a relay to bridge the on off switch (momentary push to make switch) so when the relay is energised I.E. when the ignition is turned on, it shorts the switch for about a second turning on the PC.
When the ignition is turned off it again shorts the switch again and turns off the PC (standby)
Now this setup is working but the problem is if I need to turn the ignition on or off a couple of times within a short period. This can cause the pulse to be ignored if the PC is still either starting up or shutting down.
So I thought why not use a PIC and have a set period - say a minute - where the PIC would ignore any more offs and ons of the ignition and always be in sync.
Thats where I get stuck! I think I can manage the program part which I would be writing in MikroBasic, but I cannot for the life of me think how to go about the actual logic of the on, off and ignore. The more i try and think about it the more puzzled I become.
Any suggestions out there?
Thanks.........Al