This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I can't find out why my TxD1 does not transmit.

I have a problem with the UART1 port (on P0.1 and P0.16). It sends no data.
My initialisation:
void Seriel_init (void)
{ // TxD: Port 0.17
// RxD: Port 0.16
LPC_PINCON->PINSEL0 |= 0x40000000; // set bit
LPC_PINCON->PINSEL1 |= 0x00000001; // set bits
LPC_PINCON->PINMODE0 |= 0x80000000; //set bit
LPC_PINCON->PINMODE1 |= 0x00000002; // set
// complex initialisation routine
LPC_SC->PCONP |= 0x00000010; // Set bit
LPC_SC->PCLKSEL0 |= 0x00000100; // Set bit
LPC_UART1->LCR |= 0x83; // set bit s

// Baudrate: 19.200 Baud per secondds
LPC_UART1->DLM = 0; // set to 0
LPC_UART1->DLL = 52; // set to 50?
LPC_UART1->LCR |= 0x03; // set 2 bits
LPC_UART1->FDR = 0x01; // set to 1
LPC_UART1->FCR |= 0x07; // set 4 bits
LPC_UART1->TER |= 0x80; // set bit
LPC_UART1->IER |= 0x02; // set 5 bits
}

For sending a character, I use the following code:

unsigned char UART1_PutChar (unsigned char ch)
{ while (!(LPC_UART1->LSR & 0x20)); // is bit set
return (LPC_UART1->THR = ch); // put ch into reg
}

Nothing happens on TxD1 .
tell me why.

0