I have a strange problem in my code. I cannot receive characters via the serial port.
I've read up on the TI and RI interrupts and I think I am handling these correctly.
The program goes to the serial I/O isr, but just sits at the gets(comin,4) line. When I examine comin in the watch window and input chars via the SIN = xx (where xx is an ascii code), I can see the comin array remains empty.
Below is the serial I/O interrupt routine (my application does not need Tx)
pre void uart_rx_isr (void) interrupt 4 using 3 { signed char index=0; EA=0;
if (RI == 1) { gets(comin,4); command = atoi(comin); } RI=FALSE; /* finished isr - clear flag */ TI=FALSE; /* TI will not be used - always clear it*/ EA=1; }
/pre
Here is a fragment from main() - you can see that I set TI=1 initially to set the UART up
pre
TI=TRUE; /* always set TI=1 initially to allow serial printing */ RI=0;
loop: //RI=0; //IDLE
while ((1));
goto loop; } /pre
Appreciate some pointers here.
Jason
I see the horribly confused yet strangely black and white 'world of Malund' continues to be nicely augmented by the fantasy world of Cpt. 'Pointless Comment' Foster.
I suppose life wouldn't be quite so colourful without these, er, experienced developers.
"And the lord spake unto them - the truth, in the eyes of the creators of the standard that thou hast forsaken, is that there shall be no such single entity. Strike forth all thought ye may posess of one truth and understand that all that is not false is true. And may ye also banish from thy mind any false belief that const is constant, nay it is as fickle as a lady who giveth her address without resistance" - and so on.
Hello Jack,
Well, now that you are immersed in all that religious zeal and passionate desire to make the world a better place, why not offer the OP salvation, too...?
So, Sardin. You are returned to spew you bile again. Great.
I meant:
So, Sardin. You have returned to spew you bile again. Great.
So, Sardine. You are returned to spew you bile again. Great.
Final revision:
So, Sardine. You have returned to spew you bile again. Great.
Mr Blip,
Is that your way of bumping a topic?
no, it's just my tendency to make typos and to...BLIP !
if this forum (as many others do) had an edit after posting feature
"if this forum (as many others do) had an edit after posting feature"
Absolutely - Then one could fix those glaring errors before they got set in stone ;)
But ... It would be nicer still if you could go back in time and use hindsight when writing the posts in the first place.
since the 'brain' I know the most about is not the human one but the '51 I can only guess.
However my guess is that looking at the preview immediately after the writing you do not actually 'read' but more remember what you wrote and thus do not see misspellings etc.
Erik
This forum is in serious need of some strong moderation. Besides all the Pointless cross sniping, this thread has been totally hijacked. That's all I'm going to say.
this thread has been totally hijacked.
have you never, while doing a come to think of b?
Yes, there has been a diversion triggered by 4 attempts to write the same, but should you repost "I have taken care of what has been suggested, here is what I have and the problem now is ... " would bring the therad back to subject, which your little gripe above never will.
Sardine figure,
I have noticed something strange about you - maybe it is because you are like that, maybe you just try to be provocative. most of the time somebody dares to disagree with you, you attribute that to "completely missing the point", "read the manual" etc. And worse, now you begin with religious references (were you not quoting some holy text up there?). I do have a lot of respect for religion, but it really is not hard to imagine you as some kind of lunatic freak running around in circles waving his arms...!!! shame on you for harnessing devine powers!
It was a faked citation to mock you ;)