Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- add this module in sopc first and then ----> open it in your eclipse code like FILE *fp, look in to system.h for path of RS232 /dev/rs3232, and use function fopen fwrite etc. --- Quote End --- Thank you kaushal, I followed your tip, I wrote this code on NIOSII IDE. Build is ok but it doesn't seem to work... # include "alt_types.h"# include "altera_up_avalon_parallel_port.h" //university program# include "sys/alt_irq.h"# include "system.h"# include "binary.h"# include "altera_up_avalon_rs232.h"# include "altera_avalon_spi.h"# include <string.h># include <stdlib.h># include <stdio.h># include <unistd.h> # define CLOCK 50000000; void delay_us(int us); /*****************MAIN**********************/ int main() { char* msg = "a"; FILE* fp; fp = fopen (RS232_NAME, "w"); //RS232_NAME defined in system.h if (fp!=NULL) { fprintf(fp, "%s",msg); fclose (fp); } return 0; } What is wrong in your opinion? Thank you rollingringhio