#include<lpc21xx.h>
void int_uart0()
{
U0FCR=0x07;
U0LCR=0x83;
U0DLL=98;
U0LCR=0x03;
}
void uart0_send(unsigned char data)
{
U0THR=data;
while((U0LSR&0x40)==0);
}
void uart0_receive()
{
while(!(U0LSR&0x01));
uart0_send(U0RBR);
}
void uart_msg(unsigned char *msg)
{
while(*msg)
{
uart0_send(*msg);
msg++;
}
}
main()
{
PINSEL0=0x00000005;
int_uart0();
uart_msg("WELCOME TO VIIT PUNE");
while(1)
{
uart0_receive();
}
}
Tuesday, 20 March 2018
UART-LPC2148
Subscribe to:
Post Comments (Atom)
PIC Course with IIT Bombay
Embedded Lab Course with PIC18F4550 by IIT Bombay 2017-18 Overview: Below course was conducted as an outreach initiative of Wadhwani Elect...
-
The APB divider determines the relationship between the processor clock (CCLK) and the clock used by peripheral devices (PCLK). The APB di...
-
The pin connect block allows selected pins of the microcontroller to have more than one function. Configuration registers control the mult...
-
Interrupt controller The Vectored Interrupt Controller (VIC) accepts all of the interrupt request inputs and categorizes them as Fast Inte...
No comments:
Post a Comment