I've messed with it so much now, it's hard to tell what the original problem was. This now works according to the watch window, watching debug. ==============================start code========================= // PIC UART Baud Rate #define ProcessorClock 20 // Processor clock speed in MHz #define BitRate 19200 // bits per second int debug; // Something to watch as we debug void main(){ debug=ProcessorClock; debug=BitRate; ===============================end code ============================ Kelly Kohls pointed out that there should not be a semicolon after the defines. Checking my C reference, I see that's correct. There should be no semicolon at the end of a define. I'm just so used to seeing "missing semicolon" errors whenever I write in C or Pascal, that I guess I'm a bit too liberal with them. It's interesting that the "step by step" calculation below works, but if I try to calculate brg in one expression, it messes up. void InitSerial(){ // Initialize on chip UART. long brg; // Calculate baud rate generator divider step by step brg=62500; brg=brg*ProcessorClock; brg=brg/BitRate; brg=brg-1; OpenUSART(USART_TX_INT_OFF&USART_RX_INT_OFF&USART_ASYNCH_MODE&USART_EIGHT _BIT&USART_CONT_RX&USART_BRGH_HIGH,brg); } Thanks for the help, all! Harold On Tue, 23 Apr 2002 14:01:35 -0500 Mike Mansheim writes: > > Stepping past the second instruction, debug ends up with 0x00. > > > debug=19200; > > This might be too simple, but have you defined the watch property > as 16 bits? Just so happens that the low byte of 19200 is 0. > > -- > http://www.piclist.com hint: The list server can filter out > subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics > > FCC Rules Online at http://hallikainen.com/FccRules Lighting control for theatre and television at http://www.dovesystems.com ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics