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

Software uart2 - Cant call function

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



Joined: 18 Oct 2003
Posts: 35
Location: Brisbane, Australia

View user's profile Send private message Send e-mail Visit poster's website

Software uart2 - Cant call function
PostPosted: Mon May 23, 2005 6:58 am     Reply with quote

Problem 2

After invoking a software uart with the #use statement, I can use the putc() function to pass a char to a seriaL printer. However, if I call a function with a putc() in it, it doesn't work?

eg

myputc('A');

void
myputc(char x)
{
putc(x);

}

This doesn't work, but a normal putc('A'); DOES work.

Looks like a compiler problem, as this works on my old 16F processors. Pulling my hair out.. need help ;) Thanks everyone
_________________
This is the last code change until its ready....
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Mon May 23, 2005 7:01 am     Reply with quote

Is there any chance you are running out of stack space? Look at the calling tree vs the stack depth for your processor.
_________________
The search for better is endless. Instead simply find very good and get the job done.
burnsy



Joined: 18 Oct 2003
Posts: 35
Location: Brisbane, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Tue May 24, 2005 6:56 am     Reply with quote

Stack space seems to be ok. List files says level 5 + 2 for interrupts. The call that doesn't seem to work is only 3 function calls into the stack, I think?

If you saw my other post RE comms problems, it would seem I have a compiler problem, or, the whole thing setup wrong.

regards
_________________
This is the last code change until its ready....
burnsy



Joined: 18 Oct 2003
Posts: 35
Location: Brisbane, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Wed May 25, 2005 2:33 am     Reply with quote

Hi everyone,

turned out to be the compiler. 3.209 works perfectly Smile
_________________
This is the last code change until its ready....
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