Template: Altera-Test-All

From Waveshare Wiki
Jump to: navigation, search

Quick Start

All the following demo require power supply. Verilog, VHDL and NIOS are used in the following demos, please download the corresponding one.
An OpenEP4CE10-C development board is used for demonstration, other Altera boards are similar to it. If there are differences on any example, they will be special explained.

Light Up LEDs


Language

Verilog

VHDL

Nios II C

Sample Program Name

LED

LED_hello_world

Steps

  1. Connect the "SDRAM Board" to the SDRAM interface (required only for Nios II)
  2. Download the program

Phenomena

  • Onboard 4 LEDs flow from the left to the right.
  • LED keeps blinking;
  • The NOIS II project Console tab shows "hello_world"


JOYSTICK Demo


Language

Verilog

VHDL

Nios II C

Sample Program Name

JOYSTICK

Steps

  1. Set the jumper JOYSTICK JMP to on.
  2. Connect the “SDRAM Board” to the SDRAM interface (required only for Nios II)
  3. Download the program

Phenomena

  • LED status keeps changing according to the joystick pressed.


8 Push Buttons Demo


Language

Verilog

VHDL

Nios II C

Sample Program Name

8 Push Buttons

 ——

Steps

  1. Connect the "8 Push Buttons" to 8I/Os_1
  2. Download the program
 

Phenomena

  • LED turns on/off according to the pressed button

 


8 SEG LED Board Demo


Language

Verilog

VHDL

Nios II C

Sample Program Name

8 SEG LED Board

——

Steps

  1. Connect the "8 Push Buttons" to 16I/Os_2.
  2. Download the program
 

Phenomena

  • Display 0~E on the "8 SEG LED board"
 


4x4 Keypad Demo


Language

Verilog VHDL Nios II C

Sample Program Name

 4x4 Keypad

Steps

  1. Connect the "4x4 Keypad" to 8I/Os_1
  2. Download the program
 
  1. Connect the "4x4 Keypad" to 8I/Os_1
  2. Connect the "8 SEG LED board" to 16I/Os_2
  3. Download the program
 
  1. Connect the "4x4 Keypad" to 8I/Os_1
  2. Connect the “SDRAM Board” to the SDRAM interface
  3. Download the program

Phenomena

  • LED turns on/off according to the pressed button
  •  Display something on the "8 SEG LED board"
  • LED turns on/off according to the pressed button

DS18B20 Temperature Sensor Demo


Language

Verilog VHDL Nios II C

Sample Program Name

 DS18B20

Steps

  1. Connect the DS18B20+ to the ONE-WIRE socket
  2. Set the jumper 1-WIREJMP to on
  3. Connect the “8 SEG LED Board” to the 16I/Os_2
  4. Download the program
 
  1. Connect the DS18B20+ to the ONE-WIRE socket
  2. Set the jumper 1-WIREJMP to on
  3. Connect the LCD1602 to the LCD1602 interface, The LCD1602 pin 1 should correspond to the PCB printed mark "1" beside the onboard LCD connector
  4. Download the program
  1. Connect the DS18B20+ to the ONE-WIRE socket
  2. Set the jumper 1-WIREJMP to on
  3. Connect the “SDRAM Board” to the SDRAM interface
  4. Reboot the board

Phenomena

  • LCD1602 displays temperature
  • "8 SEG LED board" displays temperature
  • The Nios II Console tab displays temperature

Altera-DS18B20-Verilog.jpg Altera-DS18B20-VHDL.jpg

Buzzer Demo


Language

Verilog

VHDL

Nios II C

Sample Program Name

Buzzer/PWM

——

Steps

  1. Set the jumper Buzzer JMP to on
  2. Download the program
 

Phenomena

  • Buzzer will buzz.
 

PS/2 Keyboard Demo


Language

Verilog VHDL Nios II C

Sample Program Name

PS2

Steps

  1. Connect the "VGA PS2 Board" to 16I/Os_2, and connect a keyboard
  2. Connect the LCD1602 to the LCD1602 interface, The LCD1602 pin 1 should correspond to the PCB printed mark "1" beside the onboard LCD connector
  3. Download the program
  1. Connect the "VGA PS2 Board" to 16I/Os_2, and connect a keyboard
  2. Connect the “SDRAM Board” to the SDRAM interface
  3. Download the program
  4. Reboot the board

Phenomena

  • Characters inputted from keyboard are displayed on LCD1602
  • The corresponding ASCII inputted from keyboard are displayed on Console tab of Nios II software


VGA monitor Demo


Language

Verilog VHDL Nios II C

Sample Program Name

 VGA_color VGA  —— 

Steps

  1. Connect the "VGA PS2 Board" to 16I/Os_2, and connect a VGA monitor
  2. Download the program
 

Phenomena

  • Display something on the VGA monitor
 

LCD1602 Demo


Language

Verilog

VHDL

Nios II C

Sample Program Name

LCD1602

——

Steps

  1. Connect the LCD1602 to the LCD1602 interface, The LCD1602 pin 1 should correspond to the PCB printed mark "1" beside the onboard LCD connector
  2. Download the program
 

Phenomena

  • Display something on the "LCD1602"
 

LCD12864 Demo


Language

Verilog VHDL Nios II C

Sample Program Name

LCD12864   —— —— 

Steps

  1. Connect the LCD12864 to the LCD12864 interface
  2. Download the program
   

Phenomena

  • Display something on the "LCD12864"
   

Altera-LCD12864-Verilog.jpg

LCD32 touch screen Demo


Language

Verilog VHDL Nios II C

Sample Program Name

——  —— LCD32 

Steps

 
  1. Connect the "3.2inch 320x240 Touch LCD" to 32I/Os_2 interface via 3.2 inch LCD Adapter(B)
  2. Connect the “SDRAM Board” to the SDRAM interface
  3. Download the program
  4. After program downloaded, reboot the board.

Phenomena

 
  • Display something on the ""3.2inch 320x240 Touch LCD"", interact with it by touching (power

should be reset before downloading the demo code each time)

USB Communication Demo


Language

Verilog VHDL Nios II C

Sample Program Name

—— USB —— 

Steps

  1. Connect the "CY7C68013A USB Board" to 32I/Os_1, then connect it to PC
  2. Download the program
 

Phenomena


  • Control the onboard LED via USB_LED.exe
 

Remark


  • Before using CY7C68013A USB Board, please install driver EZ-USB.exe
 


SD-Card Demo


Language

Verilog VHDL Nios II C

Sample Program Name

—— —— SD-Card

Steps

  1. Connect the "Micro SD Storage Board" to 8I/Os_1
  2. Connect the “SDRAM Board” to the SDRAM interface
  3. Download the program
  4. Reboot the board

Phenomena


  • Place the MESSAGE.TXT file into SD card first, run the demo code, a new file hello.txt will be created.
  • The contents in MESSAGE.TXT will be displayed on the Console tab.


Ethernet Control Demo


Language

Verilog VHDL Nios II C

Sample Program Name

——  —— ENC28J60

Steps

 
  1. Connect the ""ENC28J60 Ethernet Board"" to 16I/Os_2, then connect it to the PC through an ethernet cable
  2. Download the program

Phenomena

 
  • The Internet Explorer shows information, follow the wizard on Internet Explorer
  • Numbers will be displayed on the Nios II Console tab


UART Demo


Language

Verilog VHDL Nios II C

Sample Program Name

UART

Steps

 
  1. Connect the "RS232 Board" to 8I/Os_1, then connect it to PC
  2. Download the program
  1. Connect the "RS232 Board" to 8I/Os_1, then connect it to PC
  2. Connect the "8 SEG LED Board" to 16I/Os_2
  3. Download the program
 
  1. Connect the "RS232 Board" to 8I/Os_1, then connect it to PC
  2. Connect the “SDRAM Board” to the SDRAM interface
  3. Download the program

Phenomena

  • Launch Serial Port Monitor, select a proper COM port, config the speed as 9600
  • Send any character/number via "Serial Port Monitor", and it should be sent back and displayed on "Serial Port Monitor" again.
  • Launch Serial Port Monitor, select a proper COM port, config the speed as 9600
  • Send any number via "Serial Port Monitor", and it should be displayed on the "8 SEG LED Board"
  • Switch to the Nios II Console tab, send any character, then send "t", the "t" will be detected.
  • Send "v" to close serial port debugging.


I2C EEPROM Demo


Language

Verilog VHDL Nios II C

Sample Program Name

 AT24CXX

Steps

  1. Connect the “AT24CXX EEPROM Board” to the 8I/Os_1 interface
  2. Connect the “8 SEG LED Board” to the 16I/Os_2 interface
  3. Download the program
 
  1. Connect the “AT24CXX EEPROM Board” to the 8I/Os_1 interface
  2. Connect the “8 SEG LED Board” to the 16I/Os_2 interface
  3. Connect the “SDRAM Board” to the SDRAM interface
  4. Download the program

Phenomena

  • Use the "8 SEG LED board" to display the data sent from SDRAM_L pins 3, 5, 7, 9 to "AT24CXX", and the data "AT24CXX" received, using one 8-segment digit for each data.
  • Short the SDRAM_R pin 5 and pin 6, then open them again, lastly short the SDRAM_R pin 3 and pin 4,data will be written into AT24CXX and then read from it to display on the "8 SEG LED board".
  • The LEDs as a binary number will be increased by 1 each time.

Remark

  • In the demo code, initially the SDRAM_L 3, 5, 7, 9 is set as pull-up input high-level, the SDRAM_L 4, 6, 8, 10 is set as output low-level. It is possible to config the written data by shorting the pins 3-4, 5-6, 7-8,9-10 respectively using jumper caps.

 


AT45DB Demo


Language

Verilog VHDL Nios II C

Sample Program Name

——  —— AT45DBXX

Steps

 
  1. Connect the "AT45DBXX DataFlash Board"to the 8I/Os_1 interface
  2. Connect the “SDRAM Board” to the SDRAM interface

Phenomena

 
  • The LEDs as a binary number will be increased by 1 each time.
  • Explanation: The program writes data(0~255) to AT45DB, then read from it. The data is displayed as binary form.

PCF8563 Demo


Language

Verilog VHDL Nios II C

Sample Program Name

——  —— PCF8563

Steps

 
  1. Connect the "PCF8563 RTC Board" to 8I/Os_1
  2. Connect the “SDRAM Board” to the SDRAM interface

Phenomena

 
  • The Nios II Console tab displays time

FT245 Demo


Language

Verilog VHDL Nios II C

Sample Program Name

——  —— FT245

Steps

 
  1. Connect the "FT245 USB FIFO Board" to 16I/Os_2, then connect it to PC
  2. Connect the “SDRAM Board” to the SDRAM interface
  3. Download the program

Phenomena

 
  • Send any character/number via "Serial Port Monitor", and it should be sent back and displayed on "Serial Port Monitor" again.