PDA

View Full Version : Bizarre compile errors



evildrome
- 9th September 2014, 10:52
Hi All,

New to PIC Basic programming. I'm starting with examples for my PIC16F877A development board.

I copied the 7 segment display example from here:


http://melabs.com/samples/PBP-mixed/7segment.htm


The first time I compiled it (at work), it compiled fine.

I went home and changed a port assignment and it failed to compile.

Next day I tried again at work, it failed to compile on exactly the same machine I had successfully compiled it on the previous day.

I re-copied from the site and cut it down to just the erroring code to keep it simple and now I have two visually identical bits of code, one that compiles and one that doesn't.

Now I could run with the one that does but as a beginner I really want to know what the hell is going on.

Please see the attached screenshots.

Cheers,

Wilson.

74417442

Amoque
- 9th September 2014, 11:46
One is compiling for a 12F, the other for a 16F. There is no PORTB in a 12F683, hence the issue.

evildrome
- 9th September 2014, 12:07
Doh!


Thanks,

Wilson.

Amoque
- 10th September 2014, 23:34
Yay! One I can answer! Thank You!