Pages: [1]   Go Down
Author Topic: what peripherals are used by arduino  (Read 653 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8458
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8458
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.

Quote
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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: