blink led 12f683


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2006
    Posts
    60

    Default blink led 12f683

    trying to blink led & pullin relay on a 12f683 this code doesn't work.

    fanon var GPIO.0
    ledflasher var GPIO.1
    CMCON0=%00000111
    ANSEL=%00000000
    TRISIO=%111100
    GPIO=%000000

    Fan:
    high fanon
    high ledflasher
    pause 1000
    low fanon
    low ledflasher
    goto fan
    end

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Add a "Pause 1000" right before your "Goto fan" line.

    Regards,

    Nick

  3. #3
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Try adding another pause statement. It is probably going low for about 1/4000000th of a second or so.

    to this:
    Code:
    Fan:
       high fanon
       high ledflasher
       pause 1000
       low fanon
       low ledflasher
       pause 1000
    goto Fan
    end
    Oops, yeah, what Nicmus said!

  4. #4
    Join Date
    Sep 2005
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    use: CMCON =%00000111

  5. #5
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by hoyles View Post
    use: CMCON =%00000111
    With the PIC12F683 it should actually be CMCON0 =%00000111

  6. #6
    Join Date
    Jun 2006
    Posts
    60


    Did you find this post helpful? Yes | No

    Default

    Sorry didn't post back sooner. It was just the other pause. Works fine now. Looked at that 1,000 times and just didn't see it. Thanks.

    Mike

  7. #7


    Did you find this post helpful? Yes | No

    Default Thanks

    Mike ... (and anyone else reading this!)

    Congrats on getting your PIC blinking :-) YAY

    Thanks a million for the feedback !
    I think more than anything else it's awesome for anyone and everyone reading these posts to see your feedback , especially when things are working!

    So sad how certain threads have guys helping on a problem and the thread is kind of left with someone saying they will eventually give feedback about a certain problem and then there is nothing back :-(.
    Obviously feedback could take some time (yes sadly for most of us everyday life forces us to put things on hold for a while ;-) ) but it's so nice to see feedback (and/or solutions) for problems.

    So this is a thank you to Mike and everyone who always provides feedback :-)

    And of course a big thank you to everyone who assists and gets involved with the threads on here :-)

    Kind regards

    Dennis

Similar Threads

  1. Conway's Game Of Life
    By wellyboot in forum mel PIC BASIC Pro
    Replies: 45
    Last Post: - 28th May 2020, 06:14
  2. new and need help
    By smeghead in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd November 2008, 20:19
  3. Novice 16F83A BLINK LED program help
    By owali in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 25th July 2007, 05:02
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  5. Can't get a 12F629 to blink a led
    By Sharky in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 27th June 2005, 11:28

Members who have read this thread : 3

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