I ran the following program after connecting the CC2530 module to the computer's serial port to test the UART functionality.
#include<iocc2530.h>
void main()
{
U0CSR |= 0x80; //UART mode selected for USART0.
U0UCR &= ~0x40; //H/w flow control disabled.
PERCFG &= ~0x01; //Alernative 1 selected for UART0 peripheral.
P0SEL |= 0x0C; //P0.2 and P0.3 peripheral mode enabled.
U0GCR |= 0x08; U0BAUD = 0x3B; //Baud rate set to 9600 bps.
U0DBUF=0x56;
U0DBUF='A';
U0DBUF='D';
U0DBUF='V';
}
I was expecting the ASCII characters assigned to U0DBUF to be printed but the output on the terminal was just a bunch of question marks as seen in screenshot 1.
Screenshot 2 shows the register status post execution of the main() routine.
Somebody help me debug this please.
.