Compilation errors


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Aug 2010
    Posts
    25

    Default Compilation errors

    Hi.

    I'm trying to learn how to program PIC's, using a swedish education material......And I have sucessfully made a few programs.
    When I tried to use ICSP, I got some problems and I suspected that my PBP was too old, so I upgraded to 2.60.

    Now I get compilation errors every time, even when I try to compile old programs that worked before!

    ERROR Line 11: LOOP without a matching DO. (blink2.pbp)
    ERROR Line 15: Syntax error. (blink2.pbp)


    loop: HIGH PORTB.0 'Tänd lysdiod (line 11)
    PAUSE 100 'Vänta 100 ms
    LOW PORTB.0 'Släck lysdiod
    PAUSE 900 'Vänta 900 ms
    GOTO loop 'Hoppa tillbaka till loop (line 15)
    END

    What's up? Am I doing something wrong/different?

  2. #2
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    I'm hoping others will correct me, but I beleive LOOP is recognised as a command rather than a label in 2.60. Try changing LOOP: for MAIN:

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


    Did you find this post helpful? Yes | No

    Default

    With the new version of PBP LOOP is a command.
    Anyplace you have LOOP as a label will give trouble.
    Try changing the LOOP labels to LOOP1.

    Malcolm beat me to it
    Last edited by mackrackit; - 2nd September 2010 at 12:47. Reason: to slow
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Aug 2010
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    So it really IS a software version problem!

    Thanks guys, this was driving me nuts!

    My education material is obviously based on the older software, I wonder if I should go back to 2.50?

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mikebike View Post

    My education material is obviously based on the older software, I wonder if I should go back to 2.50?
    Easy to use the replace function in MCS just replace Loop with another word or spelling like 1LOOP, or ALOOP or any other word which makes sense to you, that is not already a restricted word, (there is a list of those words in the manual). I think they made this change in PBP to make it more in keeping with " C " conventions, since many people code in either.

    ver. 2.6 supports chips that 2.5 does not, and has some REAL BONUS FEATURES over 2.5 .
    Last edited by Archangel; - 4th September 2010 at 04:28.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  6. #6
    Join Date
    Aug 2010
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    Yes, loop1 works fine.

    I think I must download the manual for 2.60......

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


    Did you find this post helpful? Yes | No

    Default

    You get the manual when you purchase PBP 2.60.
    It is not available for download.
    Dave
    Always wear safety glasses while programming.

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