Author Topic: Custom GRBL pinout for custom Arduino Uno GRBL board  (Read 784 times)

0 Members and 1 Guest are viewing this topic.

Offline SebastianEspendeTopic starter

  • Newbie
  • Posts: 4
  • Country: ar
Custom GRBL pinout for custom Arduino Uno GRBL board
« on: December 09, 2024, 01:45:52 am »
Hi, im a student from Argentina. Im looking to modify grbl to suit my needs for making my own GRBL Board for Arduino Uno.
Im having a problem with changing the pins on the cpu_map.
Basically i've already made my own board which pins are not setup the way grbl boards are setup normally, this isnt a thing i've done on purpose its just i didnt know enough when making the board.

GRBL Pinout works by using Port groups, which you can see when checking the arduino uno pinout, the problem is my board does not do this. How can i modify the code to make it so that i can set any pin i want?

Before anyone tells me to just buy a standard GRBL Board, i cant, this is part of my final project for my secondary school, which requires me to make my own, and im a bit short on time to make a new one with the correct pin arrangement. Also

Here is what i would like the pinout to be

X_STEP_BIT to be pin 12
Y_STEP_BIT to be pin 11
Z_STEP_BIT to be pin 3

X_DIR_BIT to be pin 13
Y_DIR_BIT to be pin 10
Z_DIR_BIT to be pin 2

Here is how its currently setup by default on the cpu_map:
Code: [Select]
  // Define step pulse output pins. NOTE: All step bit pins must be on the same port.
  #define STEP_DDR        DDRD
  #define STEP_PORT       PORTD
  #define X_STEP_BIT      2  // Uno Digital Pin 2
  #define Y_STEP_BIT      3  // Uno Digital Pin 3
  #define Z_STEP_BIT      4  // Uno Digital Pin 4
  #define STEP_MASK       ((1<<X_STEP_BIT)|(1<<Y_STEP_BIT)|(1<<Z_STEP_BIT)) // All step bits

  // Define step direction output pins. NOTE: All direction pins must be on the same port.
  #define DIRECTION_DDR     DDRD
  #define DIRECTION_PORT    PORTD
  #define X_DIRECTION_BIT   5  // Uno Digital Pin 5
  #define Y_DIRECTION_BIT   6  // Uno Digital Pin 6
  #define Z_DIRECTION_BIT   7  // Uno Digital Pin 7
  #define DIRECTION_MASK    ((1<<X_DIRECTION_BIT)|(1<<Y_DIRECTION_BIT)|(1<<Z_DIRECTION_BIT)) // All direction bits

I have moved this question from the projects forum to this one, thought it was more fitting.
Any help is apreciated, thanks.
« Last Edit: December 09, 2024, 01:48:56 am by SebastianEspende »
 

Offline Halcyon

  • Global Moderator
  • *****
  • Posts: 6168
  • Country: au
Re: Custom GRBL pinout for custom Arduino Uno GRBL board
« Reply #1 on: December 09, 2024, 03:01:08 am »
Duplicate thread of: https://www.eevblog.com/forum/projects/custom-grbl-pinout-for-custom-grbl-board/

If you want a topic moved, please ask.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf