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 support@ccsinfo.com

PIC 18F452 - Using a RS-232 PORT

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



Joined: 03 Jun 2005
Posts: 8

View user's profile Send private message

PIC 18F452 - Using a RS-232 PORT
PostPosted: Mon Jun 06, 2005 4:43 pm     Reply with quote

Please I want to find out if anyone has experienced this problem. I can't get the code(Ex10 in development kit) below to work with my MCU.

#include <protoalone.h>
#include <utility.c>
#include <stdlib.h>
#include <input.c>

void main()
{
long a,b,result;
char opr;

setup_timer_0(RTCC_INTERNAL);
while(TRUE)
{
printf("\r\nEnter the first number: ");
a=get_long();

do
{
printf("\r\nEnter the operator (+-*/): ");
opr=getc();

}while(!isamoung(opr,"+-*/"));

printf("\r\nEnter the second number: ");
b=get_long();

switch(opr)
{
case '+' : result=a+b; break;
case '-' : result=a-b; break;
case '*' : result=a*b; break;
case '/' : result=a/b; break;
}

printf("\r\nThe result is %lu ", result);
}
}
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Tue Jun 07, 2005 4:26 am     Reply with quote

Can you be a bit more specific? What kind of problems do you experience?
aderogba



Joined: 03 Jun 2005
Posts: 8

View user's profile Send private message

PostPosted: Tue Jun 28, 2005 5:15 pm     Reply with quote

Thanks. The problem was due to wrong clock specification.
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