Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

Reading from the RS232 Port

Honored Contributor I

Hello everybody, i'm a bignner in software development using Nios II and i'm trying to read some data sent from my computer to my De2-70. I built this, shown in the image below, using the Qsys tool.  


I followed the steps described here: 


This tutorial helped me sending data from the De2-70 to my computer using this code here: 

# include <stdint.h># include "system.h" int main(void) { volatile uint32_t *uart = (volatile uint32_t*) UART_BASE; char *str = "Hello from NIOS II\n"; while (1) { char *ptr = str; while (*ptr != '\0') { while ((uart[2] & (1<<6)) == 0); uart[1] = *ptr; ptr++; } } return 0; } 


I would like to know how to read the data sent from my computer? I tried to include "altera_up_avalon_rs232.h" to use the int alt_up_rs232_read_data(...), but when i compiled this code this lib was not found. 


Thank you all for the attention.
0 Kudos
0 Replies