PINS_ARDUINO.H in variants for ATMEGA 128

I am trying to make pins_arduino.h file for atmega varient atmega 128, but failing to do so. My purpose of doing it is so that i can use Arduino as programmer.

I have searched web for exact files but no one seems to have made it. With out that file programming Atmega 128 is seeming not possible.

I am too much frustrated as there is no guidance I can find to create such files.

Please help me.

Thank you in Advance.

Why a 128?
You can do a lot with a '328P. For example, I made this standalone programmer card to load files from an SD card into another. Nick Gammon wrote the code, then changed it to support one of 16 files selected by button push, or one of 256 files selected by rotary encoder, and show programming status on the display. No PC needed, just a 3xAA battery pack for example.
http://www.crossroadsfencing.com/BobuinoRev17/


I have an updated board for programming 3.3V devices, haven't assembled one yet tho.

Really? Nobody's written a core for that yet? Check other ones in that series (atmel typically makes a few chips in a series that are pin compatible, but have different amounts of memory)

Pins_arduino.h is the file with all (well, most of) the chip-specific stuff - it's where you define which pin number goes to which port, which timer is on which port, etcetera.

AFAIK there's no documentation for it. I've always taken an existing one and modified it, and judging by code I've seen around, that's what everyone else does.

I would give some thought to the 1284 - it has fewer pins, which might sink it for your purposes, but it's otherwise a much more attractive chip, and lots of people on here do stuff with it. Unlike the atmega128.

Firstly I want to THANK YOU to for both of your replies.

The problem I am facing is that I don't have enough IO Pins with ATMEGA 328, because when i am using 2.4 inch ADAFRUIT LCD it consumes all of the pins.

Also the pin configuration is really important other wise I can not use the Arduino As ISP, worried that I will fry my CHIP.

I can not find ATMEGA 2560 / 1284 MCU separately as chip, even if I try I can not ship it out from US, I have to get it in bulk.

The 64 pin TQFP ATMEGA 128 L is the max pinned Atmel MCU I can get my hands on.

I have a Original Arduino Uno and a chep clone of Arduino Mega 2560.

I want to make the working codes in them to wrok with Atmega 128. Even though I have Attiny 85, Atmega 8A, Atmega 16. I have worked with all of them, coz the pin configurations were available, either from MIT or Form professional persons.

If some1 can teach me how to write a pins_arduino file, I will be really obliged. If some1 can help me make Atmega 128 pin_arduino.h file I will be happy.

Cross Road - I am impressed by your designs, but the thing is that I am not like any of the regular Arduino or Atmel guy. I am just a baby in this field. LOL.

Want to learn how to write PIN_ARDUINO.H file..... so that I can use or help other people.....

Look at the file for a 2560 then - take out the ports that the 128 does not have. Ask more questions.

I am doing a comparison.... I am hoping to get this right. I will upload it here. If I make mistakes please correct the coding.

Please check the code, please help me rectify if there are problems. Thank you.

pins_arduino.h (8.41 KB)