View previous topic :: View next topic |
Author |
Message |
burnsy
Joined: 18 Oct 2003 Posts: 35 Location: Brisbane, Australia
|
Software uart2 - Cant call function |
Posted: Mon May 23, 2005 6:58 am |
|
|
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
|
|
Posted: Mon May 23, 2005 7:01 am |
|
|
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
|
|
Posted: Tue May 24, 2005 6:56 am |
|
|
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
|
|
Posted: Wed May 25, 2005 2:33 am |
|
|
Hi everyone,
turned out to be the compiler. 3.209 works perfectly _________________ This is the last code change until its ready.... |
|
|
|