How do I assign a digital pin to a port on ATMega 2560. It seems the pin assignment in pins.h is al

I am trying to set up a laser using EXP3 on a RUMBA board.  EXP3 (Expansion Port 3) has a pin which connects directly to Input/Output port PC7 (A15) .  It is physical pin 60 on the ATMega 2560.

I plan to set a high signal on the port PC7 to start/stop the laser and PC6 for a router.  I need to assign a digital pin within Repetier Firmware to do this but I am finding it impossible to determine which digital pin goes to which physical pin according to the AVR Datasheet.

For example:

Pin assignment        Repetier pin#    AVR Datasheet pin#
#define X_STEP_PIN         17        13
#define X_DIR_PIN          16        12
#define X_ENABLE_PIN       48       36

#define Y_STEP_PIN         54        97
#define Y_DIR_PIN          47        37
#define Y_ENABLE_PIN       55        96

#define Z_STEP_PIN         57        94
#define Z_DIR_PIN          56        95
#define Z_ENABLE_PIN       62        89

I cannot make heads or tails of this.  I need to enable AVR Datasheet Pin# 60 for the Laser and Pin #59 for the Spindle.
I am finding it impossible to know which digital pin# in Repetier-Firmware which will let me do this.

How do I know which Digital Pin in Repetier-Firmware enables Pins PC7 and PC6 on an ATMega 2560??

Comments

  • Pin numbers are arduino pin numbers and have nothing to do with physical pins. Google arduino pinout mega and you will find images how these map to the real pins/analog ids etc.
  • Thank you, that did it!  Easy to do when you know what to look for and impossible to do if you don't.  Thanks again!
Sign In or Register to comment.