Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/08/07 12:22
Read: times


 
#138817 - That's what I thought!
Responding to: ???'s previous message
I'd expected it to work, too, but everything after the first character is junked. I diagnosed as a timing error, but it did seem odd. Code:
void initSerialPorts(void){
	TMOD =0x21;//put timer 1 into mode 1	
	TH1=254;//value to set timer to after it rolls over
	TL1=254;
	TR1=1;//start timer 1 running
	PCON = 0x00;//double clock for UART0
	TB8=0;//set programmable 9th data bit so it's a stop bit
	SCON0= 0xD0;//put serial port 0 into mode 3 and enable receiving
	ES0=1;//enable serial port interrupts
	EA=1;//enable interrupts
	return;
}

This is called in main(), before entering the primary loop. Clock speed is 7.3728M.

I'll get to plugging on the timer method, of course, but I'd much prefer it to be a stupid error on my part that means I don't have to rewrite my queueing code.

Thanks,
Bob Robertson

List of 16 messages in thread
TopicAuthorDate
Spoofing 2 stop bits?            01/01/70 00:00      
   tghere is no such thing as 2 stop bits            01/01/70 00:00      
      Inidistinguishable            01/01/70 00:00      
      Some UARTs of yesteryear supported it!            01/01/70 00:00      
         Yesteryear?            01/01/70 00:00      
      question?            01/01/70 00:00      
   9N1=8N2!            01/01/70 00:00      
      That's what I thought!            01/01/70 00:00      
         code - or comment - wrong            01/01/70 00:00      
            just lazy commenting, sorry n/t            01/01/70 00:00      
         I repeat            01/01/70 00:00      
         stopbit = 1!            01/01/70 00:00      
            1!1!!!1            01/01/70 00:00      
               what exactly...            01/01/70 00:00      
   Resolved            01/01/70 00:00      
      RTFM, or WTFM?            01/01/70 00:00      

Back to Subject List