Content originally posted in LPCWare by manish87 on Mon Mar 19 21:31:47 MST 2012
i have downloaded all the sample code,
but building and running uart one [PHP]
[LEFT]#include "driver_config.h"
#include "target_config.h"
#include "uart.h"
extern volatile uint32_t UARTCount;
extern volatile uint8_t UARTBuffer[BUFSIZE];
int main (void) {
/* Basic chip initialization is taken care of in SystemInit() called
* from the startup code. SystemInit() and chip settings are defined
* in the CMSIS system_<part family>.c file.
*/
/* NVIC is installed inside UARTInit file. */
UARTInit(UART_BAUD);
#if MODEM_TEST
ModemInit();
#endif
while (1)
{ /* Loop forever */
if ( UARTCount != 0 )
{
LPC_UART->IER = IER_THRE | IER_RLS; /* Disable RBR */
UARTSend( (uint8_t *)UARTBuffer, UARTCount );
UARTCount = 0;
LPC_UART->IER = IER_THRE | IER_RLS | IER_RBR; /* Re-enable RBR */
}
}
}[/LEFT]
[/PHP]
i have connected them to rs232 9 pin connector
gnd to gnd
rx to tx
tx to rx
the connector is connecting my pc to the board.