diff --git a/grbl/cpu_map.h b/grbl/cpu_map.h index 872e0bf..1781795 100644 --- a/grbl/cpu_map.h +++ b/grbl/cpu_map.h @@ -18,8 +18,9 @@ along with Grbl. If not, see . */ -/* The cpu_map.h file serves as a central pin mapping settings file for different processor - types, i.e. AVR 328p or AVR Mega 2560. Grbl officially supports the Arduino Uno, but the +/* The cpu_map.h file serves as a central pin mapping selection file for different processor + types, i.e. AVR 328p or AVR Mega 2560. Each processor has its own pin mapping file. + (i.e. cpu_map_atmega328p.h) Grbl officially supports the Arduino Uno, but the other supplied pin mappings are supplied by users, so your results may vary. */ // NOTE: This is still a work in progress. We are still centralizing the configurations to @@ -33,121 +34,7 @@ #ifdef CPU_MAP_ATMEGA328P // (Arduino Uno) Officially supported by Grbl. - // Define serial port pins and interrupt vectors. - #define SERIAL_RX USART_RX_vect - #define SERIAL_UDRE USART_UDRE_vect - - // 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<. +*/ + +/* This cpu_map file serves as a central pin mapping settings file for AVR Mega 2560 */ + +#ifdef GRBL_PLATFORM +#error "cpu_map already defined: GRBL_PLATFORM=" GRBL_PLATFORM +#endif + +#define GRBL_PLATFORM "Atmega2560" + +// Serial port pins +#define SERIAL_RX USART0_RX_vect +#define SERIAL_UDRE USART0_UDRE_vect + +// Increase Buffers to make use of extra SRAM +//#define RX_BUFFER_SIZE 256 +//#define TX_BUFFER_SIZE 128 +//#define BLOCK_BUFFER_SIZE 36 +//#define LINE_BUFFER_SIZE 100 + +// Define step pulse output pins. NOTE: All step bit pins must be on the same port. +#define STEP_DDR DDRA +#define STEP_PORT PORTA +#define STEP_PIN PINA +#define X_STEP_BIT 2 // MEGA2560 Digital Pin 24 +#define Y_STEP_BIT 3 // MEGA2560 Digital Pin 25 +#define Z_STEP_BIT 4 // MEGA2560 Digital Pin 26 +#define STEP_MASK ((1<. +*/ + +/* This cpu_map file serves as a central pin mapping settings file for AVR 328p + used on the Arduino Uno */ + + +#ifdef GRBL_PLATFORM +#error "cpu_map already defined: GRBL_PLATFORM=" GRBL_PLATFORM +#endif + + +#define GRBL_PLATFORM "Atmega328p" +// Define serial port pins and interrupt vectors. +#define SERIAL_RX USART_RX_vect +#define SERIAL_UDRE USART_UDRE_vect + +// 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<