[[labs.beatcraft.com]]

* DE0-Nano/Synthesijer_Samples_Serials1 [#wdc2b781]

This article explains how to run a sample program, which a part of serial_echo (a set of sample programs) on DE0-Nano. Also, serial_echo is included in synthesijer _samples. In this article, this sample program is executed on the environment, which is created in the article of DE0-Nano/Synthesijer.

There are two sample programs in serial_echo. One sample program is EchoTest, which duplicates typed letters. The other is ToUpper, which displays all typed letters in capital. This article discusses ToUpper, which displays typed letters in upper case.

Since DE0-Nano does NOT have a serial port, TX and RT are allocated to GPIO PINs. To connect to the GPIO PINs, a USB-to-UART cable is used. The cable is called C232HD-DDHSP-0, produced by FTDI Ltd, and this cable is equipped with FT232H. For the details of this cable, click the URL shown below.
<URL Link>

The presence of this serial connection can be checked in Teraterm on Windows.
(This article skips the explanations for how to install Teraterm and the driver for C232HD-DDHSP-0.)

- Modify the files
The source files of serial_echo are modified. The details of how they are altered are shown below. This modification is strictly for DE0-Nano. We have not tested these modifications for other FPGA boards.

Since the targeted FPGA board is DE0-Nano,  Makefile is changed as it is shown below.
<code>

sys_clk of ToUpper.java is set to 50MHz.
<Code>

After the modifications are completed, execute make.
<code - $make>

Using DE0-Nano System Builder, create and modify the project file for ToUpper. Making the project file consist with ToUpper of synthesijer_samples, the name of project file is set for ToUpper.

Move the created project file to Ubuntu. As the project file is moved, the file of ToUpper.v, which is located inside the project file, is renamed to some other names.
clk_div.vhd, rs232c_rx.vhd, and rs232c_tx.vhd of serial_echo sample program are copied into the same directory as ToUpper.vhd 's. ToUpper.vhd is created as it is built.

To consist with ToUpper.vhd, ToUpper.qsf is edited on Ubuntu.
In this article, GPIO [32] is allocated to RX, and GPIO [33] is used for TX.
<Code>

GPIO[32] and GPIO[33] on DE0-Nano are connected to the orange lead and yellow lead of C232HD-DDHSP-0, respectively. The orange lead is TXD, and the yellow lead is RXD. The black lead, which works as GND, is attached to #12pin. #12pin is located between GPIO[07] and GPIO[09].

Caution: The USB terminal of C232HD-DDHSP-0 is managed while the cable is attached to the PC.
<Picture>

The next step is writing the image to DE0-Nano and also called programming. The process is identical to what describes in the end part of DE0-Nano/Synthesijer_QuickStart. As starting up Quartus, execute Complication, check the allocation of PINs by Pin Planner, and write the image to DE0-Nano by Programmer. 

To do operation check, start up Teraterm on the Windows PC, which is connected DE0-Nano via  C232HD-DDHSP-0. Open up the COM Port, make sure that its baudrate is set to 9600. Then, please type any letters. In Teraterm, the letters that you have typed shows in upper case.
<Picture>

This is the end of the operation check on ToUpper of serial_echo.


Front page   New List of pages Search Recent changes   RSS of recent changes