Go Down

Topic: How to create my own IDE pin definitions for a custom board with AT2560 (Read 298 times) previous topic - next topic

zvipesh

I have a custom board with ATmega1284P and ATmega2560AU devices .

I am using almost all of the ATmega2560P pins -- with many of them  not defined in the standard Arduino
libraries.

I am using the ATmega2560 most of the functions .. 4x-UARTS, I2C, SPI and I/O.

one of the issues  for example:

I am using Port -D   (XCK1) PD5  { physical IC  pin-48 } as an OUTPUT.
This pin is not in the IDE definitions.

How can I modify or Add to the existing Arduino library the " additional" pins used in my custom design.

any help on how to create the custom IDE data applying to my design will be greatly appreciated.

is there a 'Header file " with all the pin definitions that can be modified?



The general idea is to use the arduino IDE to cerate the program for the custom board , since we are having serious problems using Atmel Studio-7 and ATATmel-ICE to program the board ...  ( still waiting for an answers from Atmel ... ) .

See schematics of the uP  attached to this document

zvipesh@gmail.com

 

kowalski

A full custom board definition is actually some work but to get started you could modify the standard Arduino mega board pin definitions; https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/variants/mega/pins_arduino.h
Modify your local copy and add the necessary pin definitions.
Cheers!

pert

This might be of interest:
https://github.com/MCUdude/MegaCore/tree/avr-100-pin
This is a development branch of the MegaCore hardware package that has support for ATmega2560 added. The ATmega2560 "AVR pinout" (Tools > Pinout > AVR pinout) does have all pins defined:
https://github.com/MCUdude/MegaCore/blob/avr-100-pin/avr/variants/mega_avr_pinout/pins_arduino.h
The author has requested people to test it out and let him know if any problems are found:
https://github.com/MCUdude/MegaCore/issues/34#issuecomment-292676233
So there's a possibility there are still some bugs to iron out but at worst most of the work is already done for you and MCUdude does good work. If nothing else it's a good reference.

I hope you would take the time to give back by reporting any errors or improvements you find and respect the license of MegaCore:
https://github.com/MCUdude/MegaCore/blob/avr-100-pin/LICENSE
as well as any other software you use for your product.

Go Up