Beginner in need of help !!


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2015
    Posts
    45

    Question Beginner in need of help !!

    Hi everyone, I am completely new to both these forums & pic programming. I am working with the 12f683 which I have managed to flash led 's read potentiometers etc, very basic stuff.

    Now to my question. I want to turn an LED on/off with a single tap of a tactile button. So press & release button: led turns on, then repeat to turn led off.

    I knio how to turn an LED on/off by holding the button for on & releasing for off, but I can't work out how to do the above.

    Any help would be greatly appreciated, I intend to over come any hiccups, not give up.

    Thanks,
    Rob

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Beginner in need of help !!

    The easiest way would be to use the TOGGLE command.

    start:
    if (your input pin) = 0 then toggle (your led port) : pause 50 : goto start
    goto start

  3. #3
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Beginner in need of help !!

    Please don't post the same question in multiple locations. Pretty much everybody reads all the forums here, and it's helpful to keep all the responses together. Welcome aboard!

  4. #4
    Join Date
    Jan 2015
    Posts
    45


    Did you find this post helpful? Yes | No

    Default Re: Beginner in need of help !!

    Sorry Charlie, I wasn't sure of where to post this. I was going to ask a mod to close one of them, bit silly really.

Similar Threads

  1. Beginner in need of help !!
    By robbo78 in forum General
    Replies: 71
    Last Post: - 31st January 2015, 23:48
  2. Beginner help!
    By Recognize in forum General
    Replies: 14
    Last Post: - 26th April 2012, 14:55
  3. need help! to beginner
    By emilhs in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 6th May 2009, 18:44
  4. Beginner at PB
    By alphahr in forum Off Topic
    Replies: 1
    Last Post: - 21st April 2008, 17:43
  5. Can anyone help a beginner in a struggle?
    By douglasjam in forum mel PIC BASIC
    Replies: 1
    Last Post: - 5th May 2005, 23:29

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