So, the cpu_map.h definition is: #define SPINDLE_ENABLE_DDR DDRG In the picture, D4 is finded on port G, bit 5 (PG5). To define this in cpu_map.h, there is 2 lines definitions : #define STEP_PORT_0 Fįor steppers and limit switchs, there is macros definitions wich define the DDR automaticaly.Īnother example for the definition of the "spindle enable" on Arduino port D4: This mean the CPU port number is F and the CPU port bit is 0. Searching for A0 in the Arduino Mega pinout diagram picture, you will find Arduino's A0 is the CPU port pin PF0. In the file cpu_map.h, the mapping used by the 4 to 6 axis version is defined in the #define CPU_MAP_2560_RAMPS_BOARD section.įor example, by default, the step pin of the axis number 0 (by default X axis) is defined on Arduino port A0. In this picture, you will find all you need to translate mappings between AVR ATmega2560 CPU physical pins and port pins, Arduino pin names and pins numbers, pins functions. How-to change the hardware mapping of Grbl in cpu_map.hįirst, search for Arduino Mega pinout picture on the web, perhaps you can find a picture like this (or a better one :smile:):
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |