How can I do this (reversing high & low states depending on deployment & user need)


Results 1 to 6 of 6

Threaded View

  1. #1
    Join Date
    Mar 2009
    Posts
    653

    Default How can I do this (reversing high & low states depending on deployment & user need)

    Forgive the esoteric subject but it's hard to articulate what I'm trying to resolve.

    I have a MOSFET under PIC control.....a mosfet gate is normally low but when a tactile switch is pressed, a PIC interrupt happens & a PIC output pin goes high & switches the MOSFET on - no worries thus far.

    *but* occasionally, depending on the deployment (& I won't know in advance so it'll be down to the end user to establish) I will need the above scenario to reversed & this will then be the default .....therefore the MOSFET gate will normally be high & when a tactile switch is pressed an interrupt is triggered and a PIC output pin goes low & switches the MOSFET off.

    So what I'm thinking here is when the user deploys & it doesn't want the default...that he can change it.

    But what I don't want is a massive long program to cater for both scenarios...I'm thinking that if the user holds a switch prior to powering up, then the 'default' can be selected to the non default (in other words, a toggle).

    You following this at the back?

    in summary, this is what I'm trying to achieve....

    factory_default...
    mosfet_gate = low
    when switched pressed mosfet_gate = high

    user_selectable_new_default....
    mosfet_gate = high
    when switched pressed mosfet_gate = low

    How do I tackle this in an efficient way?
    Last edited by HankMcSpank; - 16th May 2012 at 23:32.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts