Compilation errors


Closed Thread
Results 1 to 14 of 14
  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 13: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 05: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.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mikebike View Post

    I think I must download the manual for 2.60......
    Quote Originally Posted by mackrackit View Post
    You get the manual when you purchase PBP 2.60.
    It is not available for download.
    - one of the pitfalls of using a pirated version, it's also a give away that you have not purchased a copy too

    I bet it won't be long before it's available on the net though

  9. #9
    Join Date
    Aug 2010
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    I purchased the software together with a LAB-X1, U2 Programmer, books et.c. as a package.
    I have contacted the supplier, but no answer yet.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mikebike View Post
    I purchased the software together with a LAB-X1, U2 Programmer, books et.c. as a package.
    In that case then you should of received the printed manual for PBP

    Quote Originally Posted by mikebike View Post
    I have contacted the supplier, but no answer yet.
    That's a serious amount of dosh you have paid out so make sure you keep pestering them until they send you the manual

  11. #11
    Join Date
    Aug 2010
    Posts
    25


    Did you find this post helpful? Yes | No

    Default Manual

    Hello again.

    My manual has a sticker on the back that says 2.60, but I wonder if that's true?
    Appendix C lists "reserved words", and loop is not listed.
    Copyright @2008 on the inside of the cover.
    Is there a way to determine which version the manual is?


    But the biggest problem is probably that the educational books that I have are made for 2.50

  12. #12
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mikebike View Post
    Hello again.

    and loop is not listed.

    Is there a way to determine which version the manual is?


    But the biggest problem is probably that the educational books that I have are made for 2.50
    Hi, Mike

    simple to check :

    v2.60 shows 222 pages and Copyright 2009 , v2.50 ... 212 pages

    loop is listed in the second column second row on p 218 for v2.60

    Now, except the LOOP change, all 2.50 programs are fully 2.60 compatible ... so, no big headache.
    All your lib progs still can be " copied and Pasted " ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  13. #13
    Join Date
    Aug 2010
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    well, my manual has 210 pages.....so definitely not 2.60 then!

    I wonder what's in the missing 12 pages, nothing important i hope?

  14. #14
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mikebike View Post
    well, my manual has 210 pages.....so definitely not 2.60 then!

    I wonder what's in the missing 12 pages, nothing important i hope?
    210 pages ???

    it's the 1.08 release of the manual, the one everybody can download from melabs site ...

    you didn't miss anything important ... just enhancements.

    Any news from your reseller, by the time ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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