LowPowerLab Forum

Hardware support => Moteino M0 => Topic started by: gregcope on November 01, 2019, 12:41:24 PM

Title: Analog -> Digital pin outs? Same as Mega?
Post by: gregcope on November 01, 2019, 12:41:24 PM
Hi,

I need a few more digital pins!

Does the M0 follow the Mega pin out map for example

A0 -> D24
A3 -> D27
A4 -> D28

etc..?
Title: Re: Analog -> Digital pin outs? Same as Mega?
Post by: Felix on November 01, 2019, 01:01:34 PM
If you look in variants.h in the moteino samd\_version_\variants\moteino_zero you will find the following mapping:

/*
* Analog pins
*/
#define PIN_A0               (14ul)
#define PIN_A1               (15ul)
#define PIN_A2               (16ul)
#define PIN_A3               (17ul)
#define PIN_A4               (18ul)
#define PIN_A5               (19ul)
#define PIN_DAC0             (14ul)

Where the numbers are actual digital pin numbers. So 14ul is D14 or A0.
Title: Re: Analog -> Digital pin outs? Same as Mega?
Post by: gregcope on November 01, 2019, 01:15:09 PM
Thanks!