what peripherals are used by arduino

Hi
Successfully used the ATmega2560 have now moved on to the DUE

I need to know what peripherals the Arduino 'system' uses apart from the obvious serial port for programming and the USB function.
Can't seem to find the info anywhere.
Particularly I need to know if all the Counter/Timers are free or is Arduino using one as per the ATmega.
Thanks in advance.

If you mean free for software use IFAIK they are all free in a simple sketch, unlike previous Arduinos you don't lose one for the millis() function.

You will lose timers if you start using PWM though and there may be other libraries that use them.

If you mean available to the outside world for your hardware, not all of the pins are broken out.


Rob

Thanks.

Don't want to use the Arduino PWM functions as I need to use the timers for specific synchronised waveform generation with capture inputs.

Driving a CCD array and reading in analogue output values via ADC converter.

Can just about manage with only 3 timers but would have been stuck if millis() had pinched one!

with capture inputs.

Have you checked that the capture inputs are broken out? It looks to me that the following TC IO pins are available

TIOA0
TIOB0
TIOA6
TIOB6
TIOA7
TIOB7
TIOA8
TIOB8

So that's 4 TCs with 8 potential capture inputs as I understand the hardware. But if you are generating waveforms as well you may lose some of them depending on how you are doing it. TCs are pretty complicated, I haven't really got my head around them yet.

Can just about manage with only 3 timers but would have been stuck if millis() had pinched one!

The SAM has 9 32-bit TCs in total, you could normally afford to lose 1 or 2 for the system, but as I said I don't think you will.


Rob

Ha yes just realised that although the block diagram shows only 3 timer blocks (TCA , TCB and TCC) each consists of three channels.

There should be enough breakouts if not I can always lose the PWM I/O's as I won't be using them and port the timers to those pins.
May have to do that after setup() has run though.

Also have the option of using the Digilent MAX32 board which has a lot more outputs available.

Thanks for your help