Blinking LED will not Blink


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Red face Re: Blinking LED will not Blink

    Hi Steve...

    It was the missing pause.. I worked it out just now...All working now :-)

    Totally didn't see that for 4 hours yesterday.....


    Thank you both Mark and Steve

    Have also righted the port setup too

    BR
    Andy

  2. #2
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Blinking LED will not Blink

    I can make some suggestions for improvements if you want. Like use GOSUB. Bye the way as you use HIGH and LOW the tris is set automatically and you do not need to set it in your code. If you used LED=1 and LED=0 then you have to set tris in your code.

  3. #3
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: Blinking LED will not Blink

    Hi

    Always open to suggestion…. I did think of using Gosubs…But then reasoned as my code only 0k5 not worth it..

    Seems to be TRIS's seem to depend on how the sea state is in Liverpool as to when to set or not set. :-)

    Thank you again…..

    All help / suggestions welcome

  4. #4
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Blinking LED will not Blink

    The only reason is to learn as one never knows when or indeed if what one learns will be useful.

    Create two subroutines one for dot and one for dash. Then in main D will be

    Gosub Dash
    Gosub Dot
    Gosub Dot

    Just as a start.

  5. #5
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: Blinking LED will not Blink

    Hi

    Thank you…. Pity I couldn't have them all on same line…:-

    D: GOSUB Dash, Dot, Dot

    Or could I ?

    TY Again !!

  6. #6
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Blinking LED will not Blink

    What PBP do you have?

  7. #7
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: Blinking LED will not Blink

    2.50C

    Thinking of PBP3 Silver but is it that much different…?

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Blinking LED will not Blink

    Quote Originally Posted by andybarrett1 View Post
    Hi

    Thank you…. Pity I couldn't have them all on same line…:-

    D: GOSUB Dash, Dot, Dot

    Or could I ?

    TY Again !!
    From the book...
    4.13. Multi-statement Lines

    In order to allow more compact programs and logical grouping of related commands, PBP supports the use of the colon ( to separate statements placed on the same line. Thus, the following two examples are equivalent:

    W2 = W0
    W0 = W1
    W1 = W2

    is the same as:

    W2 = W0 : W0 = W1 : W1 = W2

    This does not, however, change the size of the generated code.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Simple Blinking LED - WTF!!
    By johnnylynx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st February 2010, 07:19
  2. PIC16F819 LED not blinking
    By ronbowalker in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 1st December 2009, 03:04
  3. blinking LED
    By kindows in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 31st July 2009, 17:08
  4. PIC18f452 blinking led ?
    By iugmoh in forum General
    Replies: 5
    Last Post: - 7th March 2008, 15:12
  5. Why is my LED not blinking?
    By Gary Goddard in forum General
    Replies: 14
    Last Post: - 1st January 2007, 21:23

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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