timing and bandwith questions

hello,

i would like to know how often can i poll the arduino for data (times per second)?
i guess it also depends on the interface (serial over USB, serial over bluetooth) and maybe even the platform/operating system (timer resolution, scheduler). so which one proofed to be the best combination?

and can the amount of data transferred become a problem?

and is there a difference between the the newest arduino model and the max model with more I/O pins?

i guess it also depends on the interface (serial over USB, serial over bluetooth)

Yes sometimes the serial speed limits the amount of data you can send if the gathering of it is quick.

and is there a difference between the the newest arduino model and the max model with more I/O pins?

No they both work at the same speed.

You best bet is to decide what you need and then look to see how to achieve it.

thanks for your informative reply and your patience :slight_smile:

do you have any information about the max polling rate (limit of arduino's UARTs i guess) and the max bandwith?
or did you ever run into problems in practice?

what about the different operating systems and their serial comm implementations? i remember experiencing once problems with data polling on windows, but not on mac or on linux...

thanks for your info on the arduino max

Well the top standard speed is 115200 baud with 10 bits making up one characters that means you can get 11520 characters per second or 11K5 bytes per second. You will struggle to capture a continuous stream of data with a PC at that speed although it will manage short bursts.
In essence you can drive the Arduinos UART at a clock rate of:-
Of one eighth of the system clock of 16MHz so that's 2M baud. Of course you might struggle to feed it with real data at that speed, but it is not beyond the bounds to go round a loop in 200 uS.
According to the data sheet the processor will run at 20 MIPS at 20MHz, but the Arduino only runs at 16MHz so the top speed will be 16 MIPS.

However, all this timing stuff is fairly academic because it is not what limits you in a real application. The real limit is very application dependent and unless you specify something you can talk bandwidth and speed until the cows come home and it won't have any practical baring because something else will always be a limiting factor.

Most likely with the Arduino is that you will run out of memory. It is not suited to very fast things like video generation, you can just about do some rudimentary audio signal processing but not at much of a data rate. The thing that limits you there is the sample time of the A/D.

what about the different operating systems and their serial comm implementations?

Windows is notoriously bad for letting you have access to the serial port, or any other bit of hardware, The Mac & Linux is much better in this respect.
But again it all comes down to what you want to do. :slight_smile:

ok, i see your point. i guess i just have to try it.

regarding

You will struggle to capture a continuous stream of data with a PC at that speed although it will manage short bursts.

just out of curiousity - why will i struggle? it can't be the USB bandwith. and the hardware and operating system should be able to handle it if this connection speed is available. and those UART chips are in the motherboards for ages ...

ok, this time i will start directly with linux or mac to save me this PITA.

why will i struggle

Because while you will fill the serial input buffer at the required speed when it comes to emptying it then Windows is slow and the buffer will overflow and it will drop bytes. Some applications are better than others at this. For example a continuous stream of data at the slow speed of 4800 baud will drop bytes in Hyper Terminal.