Forum Discussion
Cyclone IV E, transferring data using serial port
Hello everyone,
In a nutshell I have the following FPGA: http://fpga.redliquid.pl/images/ep4ce6/1.jpg (FPGA Cyclone IV E, ECP4E6), and what I want to do is to use the serial port. I've been following the following tutorial: https://www.youtube.com/watch?v=7xj9dhvdcwu (My quartus 2 is version 17.1). As far as I know this tutorial should be adapted for my specific board. I'm quite new to FPGA, so I might get confused a bit. At 3:40 is where I get confused, it is my understanding I need to map the I/O of the UART module created using that procedure to the I/O of the RS232 on the board. I don't actually know what the correspondings pins are, and also I can't manage to find anything in the documentation, but I think it's me reading something in the wrong way. Can anyone help me with this? I'm sure it is a "silly" thing to do. (of course if you know a simpler procedure please share). My final goal would be practice a bit with serial port and later developing some arithmetic units and passing data using my pc. https://alteraforum.com/forum/attachment.php?attachmentid=15101&stc=1 Thank you19 Replies
- Altera_Forum
Honored Contributor
Hi,
Error describes that design required more memory than available. 1.What is total memory size set in On-chip memory? (set 512 or 1024 bytes) Let me know if this has helped resolve the issue you are facing or if you need any further assistance. Best Regards, Anand Raj Shankar (This message was posted on behalf of Intel Corporation) - Altera_Forum
Honored Contributor
It should be 70Kb, following some tutorial I set it quite "large". Should I make it smaller? Also is there a rationale on why the modules in the platform designer must be connected in a certain way?
Image below with the settinghttps://alteraforum.com/forum/attachment.php?attachmentid=15118&stc=1 - Altera_Forum
Honored Contributor
Hi again, sorry still bothering. I've changed the on chip memory size to 1024, very small. It sorted out compilation issues, programming the device was also fine the only bit missing. I've used putty instead of hyperterminal as you suggested. But it kind of get stuck in the communicatio (namely I don't see any output of my C program). Any suggestion?
- Altera_Forum
Honored Contributor
Hi,
Can add your code(c program)? Go through the reference design online. ftp://ftp.altera.com/up/pub/intel_material/14.0/tutorials/using_terminals.pdf ftp://ftp.altera.com/up/pub/altera_material/14.0/university_program_ip_cores/communications/rs232.pdf Also, can you tell how the board and host machine are connected? Best Regards, Anand Raj Shankar (This message was posted on behalf of Intel Corporation) - Altera_Forum
Honored Contributor
--- Quote Start --- Hi, Can add your code(c program)? Go through the reference design online. ftp://ftp.altera.com/up/pub/intel_material/14.0/tutorials/using_terminals.pdf ftp://ftp.altera.com/up/pub/altera_material/14.0/university_program_ip_cores/communications/rs232.pdf Also, can you tell how the board and host machine are connected? Best Regards, Anand Raj Shankar (This message was posted on behalf of Intel Corporation) --- Quote End --- C Code:
About the connection, not sure what to answer. I have a usb-serial cable. I attach some pictures with my settings https://alteraforum.com/forum/attachment.php?attachmentid=15126&stc=1 https://alteraforum.com/forum/attachment.php?attachmentid=15127&stc=1 https://alteraforum.com/forum/attachment.php?attachmentid=15128&stc=1 https://alteraforum.com/forum/attachment.php?attachmentid=15130&stc=1 Any suggestions?#include <stdio.h> int main() { printf("Hello from Nios II!\n"); char X; X = getchar(); printf("**** yeah!\n"); return 0; } - Altera_Forum
Honored Contributor
There was an issue with the "flow control", according to the guide is supposed to be set to NONE. Still anyway can't manage to make it work.
- Altera_Forum
Honored Contributor
Hi, please can you help me out with this?
- Altera_Forum
Honored Contributor
Hi, just an update, I thought my serial wasn't worsking for some reason. But I've tested with the example provided with my board (which implements in VHDL from scratch a serial port). This seems to work fine, it essentially prints back any input provided. Still I cannot manage to make it work using the settings above. I wonder if this can have anything to do with the "Quartus prime lite edition" I'm using.