LOGI - EDU Demo - Project

From ValentFx Wiki
Jump to: navigation, search

Contents

Project Overview

See the LOGI-EDU product page for specifics about the EDU board and it's desgin objectives.  

This a demo project that shows some of the functionality of the LOGI-EDU board.  The EDU board was designed primarily to support the Pong Chu FPGA Prototyping By Verilog/VHDL Examples.   This has been my "Go To" book that has all of the essential material need to proficiently work with FPGA in either verilog of VHDL.  Secondarily the EDU board was designed to support many fun applications after you are done going through the Pong Chu books or if you just want to jump into fun applications.

The Project showcases the following functionality

  • Binary coded decimal counting on the 4x SSEG displays
  • Pong Game controlled by NES controllers or buttons or PS/2 mouse - VGA output
  • Bar display in color and grayscale
  • Audio output controlled by buttons, mouse or NES controllers
  • NES control to LEDs
  • PS/2 mouse control the LEDs
  • TODO: Servo motor control using the pushbuttons, mouse or NES controller.

How To Run The Demo

The below pictures display a full setup with the mouse, earphone or speakers, VGA display and NES controller.  Don't worry if you do not have the PS/2 mouse or NES controllers.  The Pong game can be controlled by the mouse, NES or onboard push buttons.  Additionally the audio output is triggered by mouse, NES or push buttons.

Loading the Demo

The demo resides within the logi-apps.  So the easiest way to run the demo is the download and run the demo using the instructions found on the logi-apps wiki page.  In short you can download all of the logi-apps by running "git clone -b logipi https://github.com/fpga-logi/logi-apps.git " .  You can then navigate to the edu_demo directory and run "sudo ./make_demo" to load the bit file and display basic instructions for the edu demo.  

Running the LOGI-EDU Demo - Step by Step Guide

Once the edu_demo bitstream is loaded you can experiment with some of the different option that built into the project.  

1) Plug in the EDU board into the LOGI-Pi.  Plug in earphones, PS/2 Mouse (optional), NES controller (optional) and begin the demo by running "sudo make_demo.sh".  This will load the bistream into the FPGA and kickstart the demo.

2) There is binary coded decimal counter running on the 4X SSEG displays.  This is running all the time no matter the what other functionality if running.

3) Plug in a VGA monitor cable to the EDU board and an external display.  There are 3 VGA modes that are run in the demo.  The DIP SW controls which mode the VGA ouput runs.  The DIP SW will be referred to as shown in the above picture with SW0 on the left and SW1 on the right (as labeled on the silkscreen).  The position toward the NES controller is low and the position toward the EDU board is high. 

  • SW0 = High - SW1 High :  This mode is a 3 bit VGA color bar display (Note that the EDU board is capable of 9 bit color)
  • SW0 = High - SW1 Low : This mode is 3 bit greyscale.  (Note tha the EDU board is capable of 3 bit grayscale)
  • SW0 = Low SW1 Don't care: This will output the Pong game onto the display.  We will show you how to control the pong game with the buttons, keyboard and mouse below.  Stay tuned.  Or go ahead and start push buttons, moving the mouse, or pushing up and down on the NES Controller if you want to jump start.

4) Audio output.  There are 2 PWM or deta sigma lines routed to a low pass filter and output on the 2 channel 3.5mm audio jack.  We have enable 2 PWM signals to the left and right audio channels at 2 frequencies.  You can enable the PWM outputs on each channel by pushing the pushbuttons, clicking the PS/2 mouse left/right buttons (port1), or pushing the NES controller up or down.  You will hear the discrete tone when selecting one or the other options with the above controls.  Go ahead an push away.  We will be able to create some much fancier audio algorithms to create music playback, output DSP processed data and much more. 

5) PS/2 Mouse.  The demo uses Port1 to interface with a mouse using the PS/2 protocol.  You may need to reset the mouse pushing PB1 (Push button 1 - labeled) if you plugged in the mouse after loading the bitstream.  

  • The mouse reads the x position data from the mouse and you can see the LEDs counting as the X coordinates are increasing or decreasing (bits 3 and 2 of the x counter). 
  • The left and right mouse buttons are setup to control the up and down paddle directions on the pong game.  So have fun playing some pong for a bit.  Add
  •  Additionally the left and right buttons trigger the audio output for the left and right channel respectively.  So have some fun watching the LEDs blink in harmony with the X coordinates and hear some humming goodness.  

6) NES Controller.  The FPGA is interfaced with NES port 1 and or port2.   You can plug a single or both NES controllers into the sockets.  

  • Each button on the NES controllers are multiplexed with the respective LED0/1.  You can push the buttons on the controllers and see the indication of the push shown on the LEDs.  Note that you may need to move the mouse around a bit if it outputting a high value to the LED.  
  • The up and down buttons are setup to control the up and down paddle directions on the pong game.  So have fun playing some pong for a bit.  Add
  • Additionally the up and down paddles are muxed to control the PWM audio output to rigger the audio output for the left and right channel respectively. 

7) TODO:  Servo motor control using the mouse, pushbuttons or NES controllers.  Stay tuned.  

 

Where To Go From Here

You can access all of the source code to create you own project from within our code repository here

See the LOGI-Apps project for information on this App and other Apps that you can use to quickly begin using projects and applications on the LOGI boards. 

Additionally you can have a look at other LOGI projects and LOGI components (link needed) that you can use in your own projects.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox