- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I used the following code to access the UART (rs232 serial port) component I created in Qsys, I connected the txdata pin to the oscilloscope and it shows nothing, i am wondering why couldn't I use IOWR_ALTERA_AVALON_UART_TXDATA(UART_BASE, txdata); to transmit data to UART? What I want to do is Nios processor reads data from FPGA, Nios transmits the data to serial port and plot graph real time using Maltab,using de0 nano. I do not need to read data from serial port. #include "altera_avalon_uart_regs.h" #define UART_BASE 0x00002000 int main (void) {alt_u16 status, rxdata=0,aa=0, txdata=0; while (! (status & 0x0040)) // Wait for transmission completion status = IORD_ALTERA_AVALON_UART_STATUS (UART_BASE); printf("status= %.2f V \r\n", (float) status); rxdata = 5; // assuming I get this data by accessing sdram in Nios txdata = rxdata; IOWR_ALTERA_AVALON_UART_TXDATA(UART_BASE, txdata); printf("txdata= %.2f V \r\n", (float) txdata); return 0;} Could you please give me some hints? ThanksLink Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm having the exact same problem. Could you tell me if you got past it? Thanks
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page