how to make inputs toggle


Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Dec 2005
    Posts
    23

    Smile how to make inputs toggle

    Hi all!
    I havnt posted in a while, so here goes!
    Using a 12F675 and need a way to toggle an input.
    If a button is pushed, it goes to a label that is a simple flash on and off routine which counts up to a number using a for-next loop. When it reaches the number, it stops by going out of that label.
    What I need is a way to push the same button again and cause it to stop flashing immediately and reset, regardless of the for next count. (I am also using the MCLR as a momentary pulldown reset to turn everything off by resetting the program to the start of the code)
    This push button is only a momentary close, but need it to work like a mechanical "push on-push off" switch. There are a couple of these push buttons which each work with their own outputs
    Anyone have ideas - and if so, maybe some sample code?
    Thanks much for any help!
    Ron
    Last edited by MARAD75; - 19th February 2007 at 14:01.

Similar Threads

  1. Toggle command
    By mr.sneezy in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 16th December 2011, 02:07
  2. How come they make electronics hard as poss
    By George in forum Off Topic
    Replies: 9
    Last Post: - 13th July 2007, 23:54
  3. TOGGLE code space and ICD
    By duncan303 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th October 2006, 16:08
  4. dip switchs & inputs
    By grounded in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 19th September 2006, 13:37
  5. Using portb as inputs PIC goes crazy
    By peterdeco1 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 14th November 2005, 14:15

Members who have read this thread : 0

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