Page 1 of 1

PIC 18F13K22 compiler error?

Posted: Thu Aug 07, 2025 11:44 am
by baz_w
Hi,
I an unable to compile a program for a PIC18F13K22(or PIC16F1847) I keep getting a 3178 while 1, ^(312)";" expected,FCS2 20A V3.0.0.0c:,3554mainendloop; , ^ (374)missing basic type; int assumed (warning), ^(314)";"expected, 3555;), ^(285) no identifier in declartion' ^(374)missing basic type: int assumed (warning), ^(314)";" expected, (908) exit status = 1.
Whatdose all this mean? Have I done something wrong or is it a compiler bug.
project file attached.
Many thanks Barry W

Re: PIC 18F13K22 compiler error?

Posted: Thu Aug 07, 2025 11:54 am
by chipfryer27
Hi

It is telling you that in your C-code block you have omitted the ";" character

If you add it to your Oscon calculation it compiles correctly for me.

OSCCON = 0x72;

Regards

Re: PIC 18F13K22 compiler error?

Posted: Thu Aug 07, 2025 2:23 pm
by baz_w
Many Thanks, FC5 used to tell you checkyour C code on that type of error, pity FC9 dont. so once again THANKs

Re: PIC 18F13K22 compiler error?

Posted: Thu Aug 07, 2025 3:12 pm
by chipfryer27
Hi

It is not the first time I've done similar, unable to see the wood for the trees :)

It can be very hard to proof read something you have just written..

Regards