??? 11/29/08 01:56 Read: times |
#160395 - The escaping escape character Responding to: ???'s previous message |
Per Westermark said:
Several strange things here (but you should have posted your example as code too).
Your formatting strings starts with " r " - there should have been a " r " in the output - before the date/time. Your formatting string ends with a " n". It should have ended with a "n" to signal a new line. .. .. And have you made sure that OLEN has a value of 2^n, where n is >= 1? Yeah my formatting had a backslash before the "r" and "n". But the Forum editor has stripped it off from my post and possibly from your reply too. I realize the note on OLEN size. It is right now "2". The code was a copy-paste from the Silabs IDE editor. I did not post the whole code as the printing at 9600k was anyway happening consistently. But I will just post the ISR of the UART0 for check out : //=============== UART 0 ISR ====================// static void UART0_ISR (void) interrupt 4 // Serial port ISR { char c ; if (RI0) // Received data interrupt. { RI0 = 0; c = SBUF0; // Read character.. if ( istart + ILEN != iend ) { inbuf [ iend++ & (ILEN-1)] = c ; // Put character into buffer } } if (TI0 != 0) // Transmitted Data interrupt. { TI0 = 0; if ( ostart != oend ) // If character in buffer { SBUF0 = outbuf [ ostart++ & (OLEN-1)] ; // Transmitt character FLG_Sendfull = 0; } else { FLG_Sendactive = 0; // All caharcters send. Clear sendactive. } } } //================================================= Raghu |
Topic | Author | Date |
Extra "R" in printf | 01/01/70 00:00 | |
Retyping or copying? | 01/01/70 00:00 | |
The escaping escape character![]() | 01/01/70 00:00 |