Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
943 Views

de2 fpga gpio question

i have a de2 development board and it has the gpio pins. what i want to do is send a digital signal to this board and then do something with it using an application but that's not the problem. i want to use only 2 pins on the gpio as inputs and the 3.3v or 5v and gnd. i've read around but i'm still royally confused and i'm a pure newbie about this.  

 

does anyone have any points or ideas about this? anything to work on would be nice. i'm still reading through the manual (espeically the gpio part) so i hope to update this thread.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor I
45 Views

The simplest idea would be using the inputs directly to control 2 specific application functions. 

For example you can implement a counter and use one input for start/stop and the other for reset. If you have a 7segment display or LEDs you can direct here the counter output; this is the classic starter design for beginners. 

If you want something more difficult you can connect the two pins to rx and tx of a UART interface and then transfer data to and from the board. 

Your fantasy (and device resources) is the only limit.
Altera_Forum
Honored Contributor I
45 Views

edit: did more reading and figured out exactly what i want to say. 

 

i have an adc that is 12 bit. i want to interface this to the fpga using either the gpio or something else. i don't want to use additional hardware so i was wondering what's the best way to this on the de2. i'm going to use the nios ii to play around with the signal once it gets it. it's going to be like a real time system that gets the output from the adc, then the fpga does some computing and lights up some lights or turns something on.
Altera_Forum
Honored Contributor I
45 Views

ADCs usually have a serial interface, spi or i2c, so you must refer to your adc datasheet and find out what you exactly need. 

When you have gathered the information about required signals and communicaiton protocol, you have to implement it into your fpga system. 

Here you have two options, assuming you use Nios inside a sopc builder or Qsys design. 

- use a PIO and bit bang the required serial protocol; this is very simple but not very efficient if you need performance 

- add the specific serial interface component into sopc/Qsys, then use the HAL driver or write your own.
Reply