PDA

View Full Version : Compilation errors



mikebike
- 2nd September 2010, 12:40
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?

malc-c
- 2nd September 2010, 12:45
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:

mackrackit
- 2nd September 2010, 12:46
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 :)

mikebike
- 2nd September 2010, 12:51
So it really IS a software version problem! :mad:

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?:rolleyes:

Archangel
- 4th September 2010, 04:25
My education material is obviously based on the older software, I wonder if I should go back to 2.50?:rolleyes:
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 .

mikebike
- 4th September 2010, 08:38
Yes, loop1 works fine.

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

mackrackit
- 4th September 2010, 09:01
You get the manual when you purchase PBP 2.60.
It is not available for download.

malc-c
- 4th September 2010, 10:25
I think I must download the manual for 2.60......


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

mikebike
- 4th September 2010, 14:23
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.

malc-c
- 4th September 2010, 14:31
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



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 :)

mikebike
- 6th September 2010, 08:49
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

Acetronics2
- 6th September 2010, 09:05
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

mikebike
- 6th September 2010, 09:19
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? :rolleyes:

Acetronics2
- 6th September 2010, 09:29
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? :rolleyes:

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