Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] UART0 and Printf

2006-04-24 by Robert Adsett

Quoting jstamos111 <jstamos111@...>:
> Any thoughts on why I am not seeing any output in hyperterminal?
>
> Here is my code which I compiled uvision by keil tools.  I pretty
> much stole this code from hitex's book for the philips LPC
> processors.
>
> void UART0 (void)
> {
> PINSEL0 = 0x05; 	// Select TxD and RxD on pin connect block
> U0LCR = 0x80;		//Enable programming of divisor latches
>
> U0DLL = 0xC2;		//Program the divisor latch for 19200 baud
> U0DLM = 0x00;
>
> U0LCR = 0x33;		//Program the line control 8\N\1
> U0FCR = 0x4F;		//enable the FIFO's
>
> }
>
> int main() {
> 	UART0();
>
> 	printf("Hello World\n"); //Call the printf function
>        while(1) {}
>        return 0;
> }

I don't see any code for connecting printf to the serial port.

Robert

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.