0
\$\begingroup\$

Hi all,

I am trying to figure out a way to connect two fpga boards (like in the image) for a Morse code decoder/encoder. Our first plan was to make the decoding and the encoding in the same board with a mode select option, but when we sent our project proposal to our instructor, he said it was too simple for a final project and as a suggestion, he said that we can try to connect two boards and that it is a simple task, that we can find some example on Internet. However, all we could find was about boards with ethernet connection. We have our seven segment display code and a sample sequential circuit design with clock to take input and display it, but we could not figure out how to connect two boards. Any suggestion/advice would be greatly appreciated.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ How about using two wires? Ground and signal. \$\endgroup\$ – Oldfart May 10 '18 at 16:48
  • \$\begingroup\$ Could you please elaborate? Is there a way for us to send an output via a wire and take that as an input as well? Thank you for your answer. \$\endgroup\$ – TrkDgnr May 10 '18 at 16:51
  • \$\begingroup\$ Ok , confusion, I thought your plan was to split into a encoder and a decoder. With encoder and decoder at each side you need three wires. \$\endgroup\$ – Oldfart May 10 '18 at 16:54
  • \$\begingroup\$ Do you have vendor IP available? If so, you could take advantage of the Ethernet IP core and connection on your board(?) If no Vendor IP available, you could try opencores.org/projects and see if there is something suitable. \$\endgroup\$ – CapnJJ May 10 '18 at 19:00
0
\$\begingroup\$

Use PORT A. Use an I/O pin for receiving, an other I/O pin for sending and a ground. This requires three wires. You cross the cables for the I/Os to that the "send" pin connects to the "receive" pin of the other board and reverse. This allows to have two identical "code"/"schematic" on both board.

For project proposal, you can use switches and buttons to allow encoding a short message on display and then you send the message. The other board receives the message and display on the display. You could have up to 8 char or more an scroll. As you see fit. Nothing very hard to do and possibly quite fun for a small university project.

\$\endgroup\$
5
  • \$\begingroup\$ Thank you, I have two questions right now. Can we send or receive more than one bit at the same time (like a bus), or is it like one 1 or 0 for every clock cycle and then we reconstruct the vector in the destination board before displaying? And the second question : what exactly is the ground wire, is it just simply for grounding the wires (for not getting electrocuted)? Apologies for my inadequacy. \$\endgroup\$ – TrkDgnr May 10 '18 at 17:02
  • 1
    \$\begingroup\$ Presumably you would be sending morse code over the wires? That does after all seem to be kind of the point? \$\endgroup\$ – Dan Mills May 10 '18 at 17:03
  • \$\begingroup\$ Yeah, you are right but let's say I take my input from the switches (at the bottom of the board) as a 8-bit logic vector, I wanted to ask if it is possible to send a 8-bit vector directly via these ports or if it should be like you said, bit by bit. \$\endgroup\$ – TrkDgnr May 10 '18 at 17:07
  • \$\begingroup\$ If it is morse code than it wouldn't be bits at all. You would encode each character in a given format of your choice, say an integer. Then your encoder will generate a sequence from the character and finally a state machine will generate long and short pulses to match that sequence. By example, you might have a long lasting 200ms, a short lasting 50 ms an intersymbol delay of 50ms and and intercharacter delay of 500ms. When you have a delay larger than say 400ms, you known next symbol is part of a new character... \$\endgroup\$ – Mishyoshi May 10 '18 at 18:45
  • \$\begingroup\$ @TrkDgnr It works exactly the same way as the switches and the screen, you know. It's turning the power on and off (just like turning LEDs on and off) so the other FPGA can detect it (just like it detects when the switch turns the power on and off). \$\endgroup\$ – user253751 May 16 '18 at 3:31
0
\$\begingroup\$

You can use the IP core for a UART to send bytes between the two board.

You can find suitable UARTs either free with the free development software of your FPGA vendor or on a third-party site like opencores.

Instantiate a UART with send and receive, connecting the TXD of one UART to the RXD of the other in each case.

You can send simple bytes to get a single 8-bit transfer. Or you can create your own protocol, where several bytes are formed into a group with a distinct boundary. Then you can send as much data as you like.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.