Processing Time

Hello,
I am developing an application, where processing time is critical.
Currently I am using the Arduino DUE, because it is the fastest microcontroller in the Arduino family.
My questions are very specific and I fear I won’t get specific answers… but I’ll try.

  1. How much processing time does the DUE need to read the logic level of a pin?

  2. How much processing time does the DUE need to send one character over the serial interface using a baud rate of 57600?

  3. How much processing time does the DUE need to read on character from an SD card?

  4. From Question 1,2,3 what do you think does take the most processing time?

Kind Regards, and thx
Andreas

  1. Answer = 3.

yes that was also my guess...

These questions are misconceived.

For example, the time is takes to read one character from an SD card, is the same time that it takes to read 100 characters. In the face of that fact, making calculations based on "characters per second" or "seconds per character" are fatally flawed, because the time taken is not linear.

For your question 2, if the "baud rate" is 56700, then the time taken for ANY processor to send one character, will basically be exactly the same.

Hello,

@michinyon: Yes you are right.

I have done some measurements with an oscilloskope now, and I found some interesting things...

The SD-Card is loading data in 512 Byte intervalles...

I am using the data on the SD-Card to drive stepping engines - I was wandering about a continuous clicking noise the steppers made each second or so...

After some research and calculation I found out, that the click appeared approximately at each 512th character, that was extracted from the SD card...

A measurement with the oscilloskope showed a gap of about 1mS - where the steppers stopped. I guess or lets say I am pretty sure, that this happens, because the SD-Card is loading new data (in 512 Byte blocks)...

Well, this 1mS will not have a big impact on the performance of the steppers (CnC application) - even tough it is not a beautiful solution...

Has anyone an idea for an workaround?

Saveing the coordinates in an Array is not an solution, because the SRAM of the arduino DUE (96KByte) is not big enough for bigger projects...

Yes it is trickie - it does take 1mS after each 512th Byte...

And 1mS is a lot or a < 80MHZ microcontroller...