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.
Hello!
I have created a GUI that can send data to any available serial port that it detects. Currently my GUI detects my lpc1114 however I do not fully understand what format I have to send data in to trigger my lpc1114 to respond. On the Lpc1114 itself I have a set of configs that I programmed and they work fine but I don't understand how to send the data via my GUI to trigger the lpc1114 to respond. Here's the code for the UART:
/* configure PINs GPIO1.6, GPIO1.7 for UART */ LPC_SYSCON->SYSAHBCLKCTRL |= ((1UL << 6) | /* enable clock for GPIO */ (1UL << 16) ); /* enable clock for IOCON */
LPC_IOCON->PIO1_6 = (1UL << 0); /* P1.6 is RxD */ LPC_IOCON->PIO1_7 = (1UL << 0); /* P1.7 is TxD */
/* configure UART0 */ LPC_SYSCON->SYSAHBCLKCTRL |= (1UL << 12); /* Enable clock to UART */ LPC_SYSCON->UARTCLKDIV = (4UL << 0); /* UART clock = CCLK / 4 */
LPC_UART->LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit */ LPC_UART->DLL = 4; /* 115200 Baud Rate @ 12.0 MHZ PCLK */ LPC_UART->FDR = 0x85; /* FR 1.627, DIVADDVAL 5, MULVAL 8 */ LPC_UART->DLM = 0; /* High divisor latch = 0 */ LPC_UART->LCR = 0x03; /* DLAB = 0 */
LPC_UART->FCR |= (1UL << 0); /* Enable the UART Fifos */ LPC_UART->IER |= (1UL << 0); /* Enable the Receive Data interrupt */
NVIC_EnableIRQ(UART_IRQn); }
http://www.keil.com/forum/59822/ seems to be essentially the same question.