Uart 1
Uart 1
(15EECC207)
• The UART takes bytes of data and transmits the individual bits
in a sequential fashion.
void delay(void);
void serial(void);
unsigned char mg; void serial()
{
int main() PINSEL0 = 0x00000005;
{
U0LCR = 0x83;
unsigned int i;
unsigned char msg[]={"BVB"}; U0DLL = 0x61;
serial(); U0LCR = 0x03;
}
while(1)
{
for(i=0;i<3;i++)
{
while(!(U0LSR & 0x20));
U0THR = msg[i];
} void delay()
{
while(!(U0LSR & 0x01)); unsigned int i;
mg=U0RBR;
for(i=0;i<10000;i++);
U0THR=mg;
delay(); }
}
}
19/06/2025 SCHOOL OF ELECTRONICS AND COMMUNIC 20
ATION ENGINEERING
Summary
• What is Serial & Parallel Communication
• Asynchronous Serial Communication
– UART
• UART Registers
– LCR, DLL & DLM, THR, RBR, LSR
• UART Program