We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi there, I am trying to config LPC930's uart port using the following codes: void uart_init ( void ) { // configure UART // clear SMOD0 PCON &= ~0x40; SCON = 0x50; // set or clear SMOD1 PCON &= 0x7f; PCON |= (0 << 8); SSTAT = 0x00;
// configure baud rate generator BRGCON = 0x00; BRGR0 = 0xF0; BRGR1 = 0x02; BRGCON = 0x03;
// TxD = push-pull, RxD = input P1M1 &= ~0x01; P1M2 |= 0x01; P1M1 |= 0x02; P1M2 &= ~0x02;
// initially not busy mtxbusy = 0;
// TI = 0; // set isr priority to 0 IP0 &= 0xEF; IP0H &= 0xEF; // enable uart interrupt ES = 1;
} // uart_init
and after calling this uart_init() i then tried to do a printf("hello world\n");
actually i did the printf() in a while(1) loop, hoping to catch something on the PC terminal. however, i dont get anything. then i tried to probe the TxD pin on LPC930, then i saw only one pulse going from high to low at the time the printf() should be executed. Can anyone help me with this issue?
I am using LPC930, internal xtal @ 7.373MHz, desired baudrate is 9600.
thanks
Andy is normally one of the most civil contributers to this forum, sir. Calling someones a jerk is not that friendly, either...!
Andy is the saint.
I'm the ruffian
(but I normally end up wanting, when Erik is at his best) :)