SPI latency DMA newbie question

Not a mention of DMA anywhere in the datasheet. Another reason I never pick Atmel for my real projects. Just too under powered and feature scarce for the price.

Majenko, your anti-AVR tirades/whines are starting to get tedious.
Cut it out, there's a good chap.

Groove:
Majenko, your anti-AVR tirades/whines are starting to get tedious.
Cut it out, there's a good chap.

Hey, I'm getting better... I haven't mentioned my preferred alternative :wink:

majenko:

Groove:
Majenko, your anti-AVR tirades/whines are starting to get tedious.
Cut it out, there's a good chap.

Hey, I'm getting better... I haven't mentioned my preferred alternative :wink:

Okay after being told arduino does not have dma I just spent an hour doing research and find my project is probably impossible because I also have another requirement, chip must be easy hobby solderable DIP package.

What is your prefered alternative???

I checked the MSP430 and the DIP package chips don't have dma either :frowning:

Could this be done without dma, what is the max possible speed for a SPI transaction on an arduino, how many interupts does it generate etc????

Can you flesh out your requirements please?

The arduino must take SPI packets of data (64 bytes I guess) as fast as possible

is really a bit woolly.
It may be that DMA is unnecessary, but without solid numbers, it is tough to say.
DMA often implies external devices, wide busses, large memories and high pin counts, so it probably isn't surprising through-hole devices don't feature large in the candidate list.

At the risk of getting shot down in flames...

PIC18F26J11 Datasheet:
1024-byte SPI Direct Memory Access (DMA) channel

Available in 28-pin DIP, similar price to the ATMega328P. I've said enough. If I mention the fact that it's faster I'll get slapped.

AWOL:
Can you flesh out your requirements please?

The arduino must take SPI packets of data (64 bytes I guess) as fast as possible

is really a bit woolly.
It may be that DMA is unnecessary, but without solid numbers, it is tough to say.
DMA often implies external devices, wide busses, large memories and high pin counts, so it probably isn't surprising through-hole devices don't feature large in the candidate list.

Yes, sorry for the fuzzy requirements, I really just start thinking about it myself this afternoon and not put much thought into it.

Making things a little more solid numbers wise:

I am hoping to get minimum 100kHz switching speeds on the io pins, 16 bits of io or more, for high speed control of stepper motors. I assume that means SPI interupts at 200kHz?

Does that mean we get 100 instructions to handle each byte on a 20Mhz atmega168/328?

The control computer sends out SPI under dma in 64byte packets.

I have been looking around and is seems PIC32MX chips come in SPDIP package and have SPI and DMA available.

I got confused with arduino as I have seen mention of DMA, but now realise its on due and that uses SAM arm chip.

And the Arduino is ported to that processor is it?

Consider yourself shot down in a glorious Hindenburg-like blaze.

Seriously Majenko, why bother?

coughchipkitcough

coughchipkitcough

cough link to their forum? cough

AWOL:

coughchipkitcough

cough link to their forum? cough

But that would be treasonous wouldn't it?

But that would be treasonous wouldn't it?

Not if you are helping the OP.
You are helping the OP, aren't you?

Please stop being a prat.

AWOL:

But that would be treasonous wouldn't it?

Not if you are helping the OP.
You are helping the OP, aren't you?

Why would I ever do anything but? That is why we're all here, after all.

Why would I ever do anything but? That is why we're all here, after all.

You could have mentioned that in reply #2, but it seems you decided to spin it out, in what might be (mis?)interpreted as a cynical ploy to bump your post count.

AWOL:

Why would I ever do anything but? That is why we're all here, after all.

You could have mentioned that in reply #2, but it seems you decided to spin it out, in what might be (mis?)interpreted as a cynical ploy to bump your post count.

... like I need that ...

I have found that whenever I mention a microcontroller that isn't Atmel, that certain people immediately leap down my throat. Yes, I may prefer other brands, but that's not to say that Atmel is bad as such. It's horses for courses, and I just haven't found the right course for Atmel. I don't specifically favour any one brand - I have Atmel, TI, Microchip, even 8052 microcontrollers here. But 9 times out of 10 I always come back to the same type, because they seem to have the best offerings.

But heaven forbid I should actually suggest that to someone...

If you think that Arduino is not a sensible way to solve a given problem then I think it's appropriate to say that. If you're able to suggest a different solution which is more feasible, so much the better. Just don't expect to get help for non-Arduino problems on the Arduino forum.

whenever I mention a microcontroller that isn't Atmel, that certain people immediately leap down my throat.

Really? Here, rather than over on avrfreaks (which is Atmel-sponsored)?
I haven't had that problem; and I've mentioned/discussed Chipkit, teensy 3, launchpad, and others.

Perhaps it's your delivery...

majenko:
Another reason I never pick Atmel for my real projects. Just too under powered and feature scarce for the price.

Why are you here then, out of curiosity?

It's like going onto a Ford motor car forum, and saying "I never drive a Ford, they are hopeless". What's the point?

mung:
2) How fast can arduino handle dma and interupts and what are speed considerations?, i.e. what is the shortest usleep in the main loop that can guarantee a constant step rate?

OK, what is the real problem here? This reminds me of people who want to do multi-threading or "break out of interrupts". This sort of low-level question is meaningless without a context.

What device are you planning to use? Link to datasheet please.

What's all this about? ...

  1. The arduino must take SPI packets of data (64 bytes I guess) as fast as possible
  2. store SPI data in memory
  3. constantly step through memory and switching IO pins

A disk drive? Don't you know how big the packets are? Why does it have to be as fast as possible? How fast is that anyway?

These are $5 chips. They are good at what they do, opinions of other posters to the contrary. But you aren't going to make a 3D graphics card out of one.