Forum Discussion
Altera_Forum
Honored Contributor
15 years agoUart data ready
Hi all, I am periodically sending data from LabView to my cycloneIII development kit (bemicro) and I want to check if there is data available to be read in NIOS II. Unfortunately, I have not be...
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- status = IORD_ALTERA_AVALON_UART_STATUS(UART_BASE); if (status & ALTERA_AVALON_UART_CONTROL_RRDY_MSK) { } --- Quote End --- In this IF statement,you have put ' & ' operator which is not logical and.It is bitwise and,so any value except 0x00,will cause to go into IF body I think you should compare your IF result to some specific hex value that you want to get Ex: if ( status & ALTERA_AVALON_UART_CONTROL_RRDY_MSK == 0x..) { temp_read= read_data; }