Pumpkin, Inc.

Pumpkin User Forums

Loop problems

For issues specific to Microchip's PICmicro® MCUs, including compilers (e.g. HI-TECH PICC & PICC-18, Microchip MPLAB®-C18) and IDEs (e.g. Microchip MPLAB®).

Loop problems

Postby MeX » Wed Sep 04, 2002 3:32 am

Hi there, here I am again thnx for the help last time!

still got a few problems

unsigned char
getch() {
/* retrieve one byte */
while(PIR1 & 0x20) /* set when register is not empty */
continue;
return RCREG;
}

while compiling: 'continue' must appear in a loop statement
is "continue" realy required?

Next problem:
Building MAIN.O...

Compiling MAIN.C:
Command line: "C:mcc18inmcc18.exe -ms -Ol+ -Oa- -w2 -Ot- -Ob- -p=18F452
-iC:AFINCLUDE;C:MCCH;C:MCCSRCPROC C:AFMAIN.C"
Warning[2058] C:AFMAIN.C 32 : call of function without prototype

Build completed successfully.

will the program work properly with this warning?

Last problem (@ this moment :0)

void init_comms(void);
void putch(unsigned char);
unsigned char getch(void);
unsigned char getche(void);

type mismatch in redeclaration of 'putch'
type mismatch in redeclaration of 'getch'
type mismatch in redeclaration of 'getche'

hope someone can help me with this stuff

Regards

MeX
 
Posts: 2
Joined: Mon Sep 02, 2002 11:00 pm
Location: Gronsveld,Limburg,Netherlands

Re: Loop problems

Postby Salvo Tech Support » Wed Sep 04, 2002 8:34 am

Hello.

For these MPLAB-C18-specific questions, you should post them to Microchip's MPLAB forum http://asp.microchip.com/webboard/wbpx.dll/~devtools.

They're pretty good at answering these sorts of questions, and there are a lot more MPLAB-C18 users there, too.

Regards,

------------------
--------
Salvo Technical Support
Please request all tech support through the Forums.

--------
Salvo Technical Support
Please request all tech support through the Forums.
Salvo Tech Support
 
Posts: 173
Joined: Sun Nov 19, 2000 12:00 am


Return to PICmicro MCUs

Who is online

Users browsing this forum: No registered users and 1 guest

cron