Access to PD4, PD5 & PD6 on MEGA1280?

I have a hardware platform based on a Mega1280 and am trying to port some code I have written over to it.

I have an issue that some on-board status LEDS I'd like to use are on PD4, 5 & 6 but these aren't "mapped" in arduino

Can i write to these pins some other way?

PD4, 5 & 6 but these aren’t “mapped” in arduino

I think mapped is the wrong word. They are not tracked out on the board so you can’t access them. Why are these pins important?

They are pins 47, 48 & 49 on the processor. If you fancy soldering some fine wires to those pins and arranging some sort of header for them you can access them through either direct port access or by changing the mapping file to add some extra pin numbers.

Hi Mike - I am using a NON arduino platform that has had the bootloader installed so I can "port" a design from a Mega to a "nice" finished device in a box.

This board uses ALL the i/o (and them some!) and has some built in status LEDS on those pins

I think I found what I need - a revised "Pins_arduino.h" file. Now I can use them as digital pins 83, 84 & 85 :-)

FYI - this is the board

Thanks that wasn't clear in the original post. Anyway the advice still stands for others either modify the file or use direct port addressing. Glad you hav it working.

I know this is an old question but could you please provide some advice as to modifying the Pins_Arduino.h file as I need to do the same thing.

Not sure what you mean. You load the appropriate Pins_Arduino.h file into a text editor and make the changes.


Thanks but I'm looking at the file and suppose I want to map 47 (PD4) and 48 (PD5) just as you have done but looking at the header file you pointed to I just don't really know where to start! I'm not a natural C programmer so I am having trouble parsing the file properly.