hi
i am writting a program to recieve data throuth serial port (UART) of
AT89S51 microcontroller.Using the interrupts i have wriiten the ISR as
void serial_ISR () interrupt 4 using 2
{
if(RI == 1)
{
led = on;
RI=0;
}}
the interrupt is occuring but the led do not get ON
if i write ISR like this
void serial_ISR () interrupt 4 using 2
{
led = on;
if(RI == 1)
{
RI=0;}
}
now led gets on
this means it is getting some thing but why RI == 1; is not working
do the recieve flag automatically gets clear
i am writting a program to recieve data throuth serial port (UART) of
AT89S51 microcontroller.Using the interrupts i have wriiten the ISR as
void serial_ISR () interrupt 4 using 2
{
if(RI == 1)
{
led = on;
RI=0;
}}
the interrupt is occuring but the led do not get ON
if i write ISR like this
void serial_ISR () interrupt 4 using 2
{
led = on;
if(RI == 1)
{
RI=0;}
}
now led gets on
this means it is getting some thing but why RI == 1; is not working
do the recieve flag automatically gets clear