Skip to content

Update cpu_map.h#120

Open
manikandan00 wants to merge 1 commit into
gnea:edgefrom
manikandan00:patch-1
Open

Update cpu_map.h#120
manikandan00 wants to merge 1 commit into
gnea:edgefrom
manikandan00:patch-1

Conversation

@manikandan00

Copy link
Copy Markdown

No description provided.

@drf5n

drf5n commented Apr 10, 2022

Copy link
Copy Markdown

This won't work right:

  #define STEP_DDR      DDRA
  #define STEP_PORT     PORTA
  #define STEP_PIN      PINA
  #define X_STEP_BIT    54 // MEGA2560 Digital Pin 24
  #define Y_STEP_BIT    60// MEGA2560 Digital Pin 25
  #define Z_STEP_BIT    4 // MEGA2560 Digital Pin 26

The bits should be within the range 0-7 of the port, not the pin numbers.

For instance, on the mega digital pin 24 is PA2 per https://www.electronicshub.org/arduino-mega-pinout/ so it's port A, bit 2, and won't work as PORTA bit 54

@fra589

fra589 commented Apr 10, 2022

Copy link
Copy Markdown

I confirm that it will not work.
Moreover, you should not make a pull request for a modification that only interests you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants