I just want to read the sensor data from the micro-controller and the data should be a priority. So what do you suggestThat’s a pretty broad question. Yes, you can use a serial interface.
What in particular are you asking? There’s plenty of information about implementing SPI, I2C, etc.
The sensors are sending their data to the Arduino and they are working just fine. I want to connect my FPGA board to the Arduino and read that data. Please note: There are many Arduinos used for this.Hi,
Each sensor has an interface, maybe all use the same interface, maybe not, we don´t know.
"..which are configured to Arduino" does not mean much to me. Usually a sensor is a sensor and is not fixed to any IDE or hardware. It has an interface and the description for the interface is in it´s datasheet.
So between FPGA and sensors you have to keep on the datasheets.
"... MCU is acting as slave and FPGA as master ...."
I´d do it the other way round. Usually the MCU is the master. But for sure it´s possible to use the FPGA as master.
..While between FPGA and sensors, then FPGA should be the master.
****
There is no general answer.
Between MCU and FPGA I already used: SPI, I2C, parallel, UART...
Each application has it´s own requirements..
****
If I had to do it: I need to read all the datasheets...
Klaus
Okay, so I want the sensor data to be the top priority. So what should I exactly be doing to achieve seamless communicationThe interface depends on the data rate you want aggregated for all sensors. So
that predicates choice between One Wire, I2C, SPI, UART...
So you build a simple protocol for the FPGA to interpret the data coming to it.
Generally a frame encapsulates a sensors data, like its address or name, its specific
piece of data and that data's name, ID, ands so on. Wrap that in a frame for start/end,
even CRC if this application has safety issues attached to it. You could even give data a priority
such that when a frame of data comes into FPGA you decide what to process first. Put
the data on a stack and high priority gets serviced first. Or data into memory so that it
can be monitored and serviced based on priority.
It would be nice if all the sensors have same buss type, for the Arduino to handle,
buts thats not a project show stopper to handle.
For sensors that have high sampling rates use interrupts to speed up the response handling.
You could run a RTOS on the Arduino to manage differing sample rate sensor servicing.
Many possibilities.
Regards, Dana.
Yes i am transmitting data continuously every 0.5 a second for 30 seconds. Apart from communication it makes sure that the data that we want in output is in proper format. Not yet thought anything about error correctionThat's still way too broad a question. How do you define "seamless communication"?
What's your data rate? How much data? Saying you have "a lot" of sensors is meaningless. Are you transmitting continuously? Once an hour? What else does the Arduino have to do besides "seamless communication"? Is there handshaking? Do you want/need error correction, e.g. ? How do you handle bad data?
Hello,I have a lot of Adafruit Sensors like Temperature Sensor, IMU, Pressure Sensors, etc. which are configured to Arduino. Now I want to connect Arduino to FPGA and the FPGA must read the sensor data and detect for abnormalities for control system. In my case the MCU is acting as slave and FPGA as master. We can use serial interface like SPI or UART. Can someone walk me through how can I make this possible
There are multiple sensors that are communicating with multiple Arduinos and all their data are sent to a single FPGA board.I agree that SPI is probably the best approach, but, again, without knowing the details of the system this is all a purely theoretical discussion.
Since the data rate is very high and continuous UART would not really be a good option.Hello,
more experienced colleagues have right that your question is too broad, but as long as my own experience is saying that UART and SPI are the easiest way for comunication between Arduino and FPGA. I2C is slow and I had some issues implementing it on FPGA. There are many projects with free code on: opencores.org website. for example:
https://opencores.org/projects?expanded=Communication controller
https://opencores.org/projects/uart
https://opencores.org/projects/miniuart2
https://opencores.org/projects/spi
https://opencores.org/projects/simple_spi
Few years ago I described project using UART and RS485 for comunication from" Arduino UNO" (one direction) to Spartan3 FPGA over long distance. It is easy to make this comunication two directions (just use also UART_RX).
Here is translation of page on Polish forum (Forbot.pl) translated by "Google Translate" (English) describing that topic:
https://forbot-pl.translate.goog/fo..._tr_tl=en&_x_tr_hl=pl&_x_tr_pto=wapp#comments
You should also tidy up your assumptions related to such transmission between Arduino nad an FPGA board.
Best Regards
You're aware that you didn't yet say a single word about data amount and planned data rate. This information is possibly in your head.Since the data rate is very high and continuous UART would not really be a good option.
I don't understand why you need high data rate for temperature and pressure sensor (they are slowly shifting signals). IMU can require a bit of faster signal, but also without exaggerationSince the data rate is very high and continuous UART would not really be a good option.
Multiple sensors, like 10000000000000? You INSIST upon not giving us any useful information. I’m done trying to help you.There are multiple sensors that are communicating with multiple Arduinos and all their data are sent to a single FPGA board.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?