Altera_Forum
Honored Contributor
19 years agoNeed help for my RS232 in NIOS II
Hi,
I am doing a project with NIOS II and I need to transfer data between my board and the PC through the RS232. I generated a NIOS II system with RS232 support. On my test, I can transfer data from the FPGA board to PC through RS232 by using the "IOWR_ALTERA_AVALON_UART_TXDATA" macro, but I can't write data into the FPGA board through RS232. My question is: If I want to write data into the FPGA board through RS232, do I need to setup the RS232's control register as "0x0080" (RRDY) before the writing? Or I just need to check the status register's value and write data when it is "0x0080". Even easiler, I just need to use the "IOWR_ALTERA_AVALON_UART_RXDATA" to write data directly without checking or setting the status of RS232. Actually, I've tried all of the three above methods but failed. Everytime when I tried to read the data that I wrote in by using the "IORD_ALTERA_AVALON_UART_RXDATA", the value is "0". Could anyone help me? Thanks.