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
Whoops,
Better fix that error:
No idea what you're on about (or on), but your post made me laugh.
you're on about (or on)...
15mg Hydrocodone, 650mg of APAP, 20mg Diazapam, 350mg of Cordosiporol, 1.5 shots of Bacardi 151, one "Rules for Coding [Monkey] Radicals," one fulll lip of Copenhagan, and bio-lab bunker level #3 with elevated O2 levels. Yet I still function at a higher strata than a sardine: 999.
Dirty-Deeds-Done-Dirt-Cheap.... what a concocted world I live in.
--Cpt. Vince Foster 2nd Cannon Place Fort Marcy Park, VA
That should be, "a higher stratum", surely??
As usual, Vince, you rock...! :-)
"Diazapam, a benzodiazepine, C16H13ClN2O, used for alleviation of anxiety and tension..."
Have been working to close to warheads lately, captain :-)
I'm glad to see you are up to you old antics. Now I have a excellent mental image to carry my through the day.
Thanks Vince
Cyril ! a Boy Prodigy!
#1) High-Stress, High-Tension Pressure Cooker World leads to "stress-n-tension headaches" A) Pain-Management, and Anti-Anxiety/Anti-Tension along with a muscle relaxant to combat it.
#2) "DO NOT TAKE W/ ALCOHOL" means "effects are amplified" A) Late in the evening, I can do a x2 gain on the 'effects'
#3) Increased blood-flow to the brain A) Nicotine does that
#4) The brain needs Oxygen A) Elevate O2 levels kick ass on that & helps O2 levels to the brain
#5) Caffeine would keep normal ppl awake. A) Hydrocodone's side effect does that for me. no need for more
#6) As usual, Vince, you rock...! :-) A) Was listening to AC-DC at the time. Led Zeppelin is still #1
#7) All of the above with the exception of the Alcohol was approved by both the physicians and management. Cranking out quality ranks higher than the physical or mental states.
Remember kids (I'm 'old'), if you get a "buzz" from any medication, you have taken too much of it. Hence if you get a "buzz" you are abusing it. Moderation at all times.
999) Well, except the music part... and the "amplifier" (of which *they* didn't approve of, but I did), I was within bounds.
Same old Antics,
--Cpt. Vince Foster (with no Trazadone detected) 2nd Cannon Place Fort Marcy Park, VA
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 !