Forum Discussion
Altera_Forum
Honored Contributor
13 years agoUART on DE2
Hi, I'm using DE2 (old kit) and my application has a UART to exchange data with PC. I'm using the kit's RS232 connection (not the JTAG). I created the system (including the UART at 9600bps) in Qsys a...
Altera_Forum
Honored Contributor
13 years agoIt is quite simple to use interrupts : look at Nios II examples. You just need few functions like
// Read status and compare to RRDY_MSK
if (IORD_ALTERA_AVALON_UART_STATUS(UART1_BASE) & ALTERA_AVALON_UART_STATUS_RRDY_MSK)
{
donnee = IORD_ALTERA_AVALON_UART_RXDATA(UART1_BASE);
}
//...
By doing this way, your main program will be interrupted at every character received (of course). Be careful about blocking situations. Good Luck