Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21587 Discussions

newbie question - gpio

Altera_Forum
Honored Contributor II
2,330 Views

Hello everyone, 

I have an altera DE2 Board and have a question regarding the gpio. 

As I only used the onboard input debvices(switches/buttons) up to now I'm not sure how to connect something to the gpio. 

I want to connect the DE2 Board with a Flexray Node. 

My Question is, can I just connect the GPIO Pins from the Board with the Pins on the Flexray Node? 

 

And a second question: 

I want to use two Pins for a one way communication. One Pin to tranmit the Data and the other to emulate some kind of clock for the timing of the transfered bits. 

Is this possible? Or is there a better way? 

 

Thanks
0 Kudos
10 Replies
Altera_Forum
Honored Contributor II
1,517 Views

I am not familiar with the DE2 board so cannot help with your first question. 

 

Regarding your second question. Yes you can implement a 2 wire serail comm sprotocl with 2 FPGA pins. 

 

Look at already existing protocols like i2c (http://en.wikipedia.org/wiki/i2c) or even a good old RS232 UART. 

 

You may find that IP components already exist and it might not be worth reinventing something.
0 Kudos
Altera_Forum
Honored Contributor II
1,517 Views

I have worked with USER IO pins on MAX II dev. kit. and, could be able to use the pins for every purpose (data, hand shake, clock).  

 

I think you should be good to make things work. 

 

--Trinath
0 Kudos
Altera_Forum
Honored Contributor II
1,517 Views

As long as the voltage levels and so are ok, you can simply connect the node to the GPIO pins. From the Altera device, these pins will be seen normally (like the SW and the pushbuttons you already worked with).

0 Kudos
Altera_Forum
Honored Contributor II
1,517 Views

Thanks for the replies. 

The situation has changed a bit now. 

Now I have to use the spi interface on the flexnode. 

I have seen, that the sopc builder has a spi component. 

Can I map this spi component to the gpio pins?
0 Kudos
Altera_Forum
Honored Contributor II
1,517 Views

Hello Cool Cat! 

How did your project go? I am also facing the same problem like you had. I need to connect a cyclone II (DE2 Board) FPGA with FlexRay-Nodes. As far as I know, I need a transceiver in order to connect the Nodes to FPGA. Can anyone help me. One node has to communicate with my FPGA via SPI connection and the others have to communicate with FPGA via a serial bus. The FPGA has to act as Gateway between the FlexRay-Nodes in order to transmit messages from one end to the other. The SPI connection has to send FPGA some controll signals, to tell FPGA if it has to transmit messages or not. Has anyone done such like tasks? Is there maybe any IP-Core that I can use to build my project. PLEASE HELP!  

Thank you everyone for your assistance!
0 Kudos
Altera_Forum
Honored Contributor II
1,517 Views

Hello,  

no clue about what FlexRay is but.. 

The GPIO pins on a DE2 are 3.3V powered, so they can act as 3.3V LVCMOS/LVTTL pins. They can be in, out or inout pins, with optional tri-state or open-drain function. And a few other things. 

 

That is to say, those pins can implement pretty much anything that uses 3.3V LVCMOS/LVTTL levels. But if you need something else than 3.3V, you need a transceiver. 

 

There are SPI cores. Maybe there's a FlexRay core as well.
0 Kudos
Altera_Forum
Honored Contributor II
1,517 Views

 

--- Quote Start ---  

Hello,  

no clue about what FlexRay is but.. 

The GPIO pins on a DE2 are 3.3V powered, so they can act as 3.3V LVCMOS/LVTTL pins. They can be in, out or inout pins, with optional tri-state or open-drain function. And a few other things. 

 

That is to say, those pins can implement pretty much anything that uses 3.3V LVCMOS/LVTTL levels. But if you need something else than 3.3V, you need a transceiver. 

 

There are SPI cores. Maybe there's a FlexRay core as well. 

--- Quote End ---  

 

 

Hello rbugalho, 

 

thank you very much for your reply. 

I need to implement GPIO pins with 5V. I think, as you said, I need a transceiver. Do you know how the transceiver has to look like. I have no idea how to start this. 

 

Thanks a lot! 

0 Kudos
Altera_Forum
Honored Contributor II
1,517 Views

Well, there are many kinds of "transceivers". 

 

In this case, it's a device that can act as bridge 3.3V LVCMOS/LVTTL and what you need. 

 

*IF* what you need is 5V CMOS/TTL levels, you need a level tranlating buffer. Something from the 74LVC or 74AVC families. 

Ie, 74AVCH1T45 but there are tons of options.
0 Kudos
Altera_Forum
Honored Contributor II
1,517 Views

Hi rbugalho, 

 

thanks again for your quick reply! 

That is really a big help for me. Now I kind of have some ideas of where to start from. 

Thanks alot!
0 Kudos
Altera_Forum
Honored Contributor II
1,517 Views

hi 

can you show me how to make use of the gpio 40 pins how can i make it as an input and as an output after using sopc builder. thanks
0 Kudos
Reply