Assistance in calculating the maximum rate that could read from a digital pin

Hello all,

My case is that i have two ADCs. Each ADC outputs 8 bits in parallel. I have intentions of connecting the outputs of the ADCs straight to the digital input output pins (utilizing about 16 of the pins) and then sending the data 'serially' back to a computer and save it hopefully like something like a csv file. I would be designing my circuit bandwidth based on the maximum rate that the Arduino could read the digital i/o pins but i wish to get as much bandwidth as possible. I am hoping to achieve something like 10MHz

For example, if the arduino could read all parallel 8 bits (from one ADC) and to the computer in 1ns (arbitrary value). This would mean that the maximum rate that the ADC could output would be about, 1GHz.

The internal ADC (or analog input) on the Arduino would not work because it would drastically reduce the bandwidth i can achieve.

I have an arduino due and an arduino MEGA2560. Could you guide me according to these limitations? I am up for additional ideas or other ways of doing this, if you have.

arduino MEGA2560

Never going to do it.

This would mean that the maximum rate that the ADC could output would be about, 1GHz.

I'd love to see your arithmetic.

arduino due

I believe the Due processor is capable of high-speed analog-to-digital conversion. Have you researched that possibility?

Serial on pins RX0 and TX0 provides Serial-to-USB communication for programming the board through the ATmega16U2 microcontroller.

Serial communications is out.

The Native USB port is connected to the SAM3X. ... The Atmel® | SMART SAM3X ARM® Cortex® M3-based Flash-based microcontroller (MCU) brings more connectivity to the SAM3 family by adding ... and high-speed USB (HS USB) MiniHost ...

You will be learning about the "Native USB port" on your Due. That is the only option capable of transferring at your target rate.

AWOL: I'd love to see your arithmetic.

And know why Mr. Nyquist is being ignored.

Hello all,

Thanks for the responses.

Coding badly, i checked the specs and it stated that the arduino due can sample at 1MSPS (12bits). This means that the max frequency that i can use in my circuit is about 500KHz maximum (Mr. Nyquist).

This is the lowest bandwidth i would have to go. I am honestly trying to achieve the highest bandwidth possible. This is why i tried to look into other methods of achieving the higher bandwidth in my circuit. Hence i tried using an external ADC.

[quote author=Coding Badly date=1455654893 link=msg=2618192]

Serial communications is out.

You will be learning about the "Native USB port" on your Due. That is the only option capable of transferring at your target rate.

[/quote]

I dont understand these points too well though. Could you elaborate a bit? (i would be reading up on native USB in the meantime)

The output of the ADC is 8 bits in parallel. If the time it takes for the 8 bits to be sent to the arduino digital pins, be read and sent to the computer is about 1ns, this should mean that each byte should come at a rate of 1ns. Hence i arrived at the 1GHz. If the arduino due operates at this 1ns and bytes were coming in at 0.5ns then surely bad things should happen. My reasoning is probably wrong (i'm still new to all of this and still learning). If it is wrong, please correct me and explain how to conduct calculations please.

Thanks.

The communication with the pc will be the slow point, not reading the pins. You can read the pins a lot faster than you can send the data. So look for the fastest way to send the data to the pc instead.

Better yet, look for an ADC module that can connect directly to a PC. 10 MSPS modules are readily available. For example: http://www.ti.com/lsds/ti/data-converters/high-speed-adc-greater-10msps-overview.page

Thanks, both of you.

jremington: Better yet, look for an ADC module that can connect directly to a PC. 10 MSPS modules are readily available. For example: http://www.ti.com/lsds/ti/data-converters/high-speed-adc-greater-10msps-overview.page

i was not aware of this. I am going to look into this now. I am not too sure how it 'connects straight to the computer' though. What is the spec to look for to determine if it could connect straight to a computer?

In addition to that, the information does not have to be sent immediately. It could be temporarily stored and then sent.

If the time it takes for the 8 bits to be sent to the arduino digital pins, be read and sent to the computer is about 1ns

That's a mighty big "if", when you recall that each clock cycle of the Due lasts 12ns.