CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Help me with compiler errors

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
mahalingam



Joined: 17 Jul 2010
Posts: 4
Location: Malaysia

View user's profile Send private message Send e-mail Yahoo Messenger

Help me with compiler errors
PostPosted: Sat Jul 17, 2010 11:38 pm     Reply with quote

Can anybody please help me to solve errors or correct my coding?
Code:

#include <18F14K50.h>
#fuses INTRC,NOWDT,NOPROTECT,NOLVP // use Internal osc
#use delay(clock=16000000)
#use rs232(baud=9600,xmit=PIN_C6,rcv=PIN_C7)

int Buffer,Buff=0,b;

#int_rda   //enable usart receive interrupt
rs232_handler()   //interrupt driven data read and store
{
b=getch();   //load character
Buffer[Buff+1]=b;   //store character    [Error line 32]
Buff++;   //increment pointer
}

main()
{
enable_interrupts(INT_RDA);
enable_interrupts(GLOBAL);
do { while(True); }

}
[Error line 41]

Errors:
Quote:

*** Error 66 Line 32(13,14): Previous identifier must be a pointer
*** Error 75 Line 41(1,2): Expect WHILE rs232_handler

Please help me as soon as possible friends.
Thank you.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jul 18, 2010 12:54 am     Reply with quote

Quote:

*** Error 66 Line 32(13,14): Previous identifier must be a pointer

Look at the Ex_Sisr.c example to see how to declare an array
for use as a buffer in the #int_rda routine. Here is the file location:
Quote:

c:\program files\picc\examples\ex_sisr.c


Quote:
*** Error 75 Line 41(1,2): Expect WHILE rs232_handler

Read a tutorial on how to correctly make a do-while statement:
http://blog.robbychen.com/2010/07/13/c-do-while-loop/

You need to learn C. This forum is not a C learning forum.
In other words, we don't want to teach you C. You need to
learn it outside of the forum. We'll help you with using CCS C
to write your programs, but it's your responsibilty to learn basic C.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group