Arduino Due/Mega

Arduino Due/Mega by Arduino

Connection Type
USB
Number of servos
48
Audio Support
No
Camera Support
No

The Arduino Mega 2560 is a very powerful EZB microcontroller. The high number of pins and hardware peripherals makes it a multitasking monster. With the high number of ports, you can use 8 ADC, 13 PWM, 21 Digital ports, and 24 Servos at the same time!

ADC Ports

ARC has the ability to select up to 8 ADC ports per EZB. The MEGA has 8 ADC capable ports mapped to the ARC ADC ports starting from ADC0 to ADC7...

(ARC Left, Arduino Right)
  ADC0 = A0,
  ADC1 = A1,
  ADC2 = A2,
  ADC3 = A3,
  ADC4 = A4,
  ADC5 = A5,
  ADC6 = A6,
  ADC7 = A7

PWM Ports

ARC has the ability to select up to 24 PWM ports per EZB. The MEGA has 13 PWM capable ports mapped to the ARC PWM ports starting from D0 to D12...

(ARC Left, Arduino Right)
  D0 = 2,
  D1 = 3,
  D2 = 4,
  D3 = 5,
  D4 = 6,
  D5 = 7,
  D6 = 8,
  D7 = 9,
  D8 = 10,
  D9 = 13,
  D10 = 44,
  D11 = 45,
  D12 = 46

Digital Ports

ARC has the ability to select up to 24 Digital ports per EZB. Digital ports also operate as bit-bang serial/uart (transmit only). The MEGA has 21 Digital capable ports mapped to the ARC Digital ports starting from D0 to D20...

(ARC Left, Arduino Right)
  D0 = 2,
  D1 = 3,
  D2 = 4,
  D3 = 5,
  D4 = 6,
  D5 = 7,
  D6 = 8,
  D7 = 9,
  D8 = 10,
  D9 = 11,
  D10 = 12,
  D11 = 13,
  D12 = 44,
  D13 = 45,
  D14 = 46,
  D15 = 62,
  D16 = 63,
  D17 = 64,
  D18 = 65,
  D19 = 66,
  D20 = 67

Servo Ports

ARC has the ability to select up to 24 Servo ports per EZB. The MEGA has 24 Servo capable ports mapped to the ARC Servo ports starting from D0 to D23...

(ARC Left, Arduino Right)
  D0 = 22,
  D1 = 23,
  D2 = 24,
  D3 = 25,
  D4 = 26,
  D5 = 27,
  D6 = 28,
  D7 = 29,
  D8 = 30,
  D9 = 31,
  D10 = 32,
  D11 = 33,
  D12 = 34,
  D13 = 35,
  D14 = 36,
  D15 = 37,
  D16 = 38,
  D17 = 39,
  D18 = 40,
  D19 = 41,
  D20 = 42,
  D21 = 43,
  D22 = 68,
  D23 = 69,

I/O Port Expansion Board

Because the Arduino is merely a bunch of pins, it is nice to have a break-out shield board that has I/O expansion. This allows easier connecting of servos and sensors to the Mega. The break-out shield we recommend is the KEYESTUDIO Mega Sensor Shield V1 for Arduino Mega R3 Board 2560.



Download Firmware Sourcecode


ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

#41  

Does this firmware support I2C?

I see the following in the code

#define CmdI2CWrite           10
#define CmdI2CRead            11

But I can't see anyplace the code below for these two commands.

PRO
Synthiam
#42  

what does it say in the debug window when you connect to it?

#43  

Thanks DJ I see it does not support I2C communications.

I guess I will have to create my own code.

PRO
Synthiam
#44  

Okay - it shouldn't be difficult to add. Can you check any of the other arduino libraries and see if they support i2c? The pin coun won't match but they should load fine. If we find one code with i2c support we can add it.

PRO
Synthiam
#46  

That looks correct. I have no experience with it, though. I2C has never really been good to me in the past haha

#47   — Edited

Quote:

Quick question, but can this firmware work on a Arduino Giga?
Here it is on Amazon.

https://a.co/d/7sbZw9J

Edit: I looked at the tech specs of the Arduino Giga R1 on Arduino's website, and it uses a Cortex ARM M7.

Idk, but I looked and found that the OpenCR uses CortexARM M7 as well, but the Arduino Giga R1 has a Arduino Mega form factor and compatible pinout. Correct me if I'm wrong, but I guess I could use the firmware for the OpenCR provided on this site but kinda frankenstein with the Arduino Mega firmware so as to get the correct pin addresses.

PRO
Synthiam
#48  

Ardunio is not a particular microcontroller. Instead it’s a software sdk for many different micros. It’s a c sdk so as long as a micro has an ardunio compiler, it’ll work.

the difference is the port mapping. Different micros have gpio mapping and for various features. For example, servos use pwm and some micros may only support a few or several gpio ports for servos.

so my answer would be yes, it’s compatible - even if it requires slight modifications for the ports.

if you go this route, starting a new thread would be easiest to focus attention on modifying the firmware for the port mapping.