Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
cpu_map.h
00001 /* 00002 cpu_map.h - CPU and pin mapping configuration file 00003 Part of Grbl 00004 00005 Copyright (c) 2012-2016 Sungeun K. Jeon for Gnea Research LLC 00006 00007 Grbl is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation, either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 Grbl is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with Grbl. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 /* The cpu_map.h files serve as a central pin mapping selection file for different 00022 processor types or alternative pin layouts. This version of Grbl officially supports 00023 only the Arduino Mega328p. */ 00024 00025 00026 #ifndef cpu_map_h 00027 #define cpu_map_h 00028 00029 00030 #ifdef CPU_MAP_ATMEGA328P // (Arduino Uno) Officially supported by Grbl. 00031 00032 // Define serial port pins and interrupt vectors. 00033 #define SERIAL_RX USART_RX_vect 00034 #define SERIAL_UDRE USART_UDRE_vect 00035 00036 // Define step pulse output pins. NOTE: All step bit pins must be on the same port. 00037 #define STEP_DDR DDRD 00038 #define STEP_PORT PORTD 00039 #define X_STEP_BIT 2 // Uno Digital Pin 2 00040 #define Y_STEP_BIT 3 // Uno Digital Pin 3 00041 #define Z_STEP_BIT 4 // Uno Digital Pin 4 00042 #define STEP_MASK ((1<<X_STEP_BIT)|(1<<Y_STEP_BIT)|(1<<Z_STEP_BIT)) // All step bits 00043 00044 // Define step direction output pins. NOTE: All direction pins must be on the same port. 00045 #define DIRECTION_DDR DDRD 00046 #define DIRECTION_PORT PORTD 00047 #define X_DIRECTION_BIT 5 // Uno Digital Pin 5 00048 #define Y_DIRECTION_BIT 6 // Uno Digital Pin 6 00049 #define Z_DIRECTION_BIT 7 // Uno Digital Pin 7 00050 #define DIRECTION_MASK ((1<<X_DIRECTION_BIT)|(1<<Y_DIRECTION_BIT)|(1<<Z_DIRECTION_BIT)) // All direction bits 00051 00052 // Define stepper driver enable/disable output pin. 00053 #define STEPPERS_DISABLE_DDR DDRB 00054 #define STEPPERS_DISABLE_PORT PORTB 00055 #define STEPPERS_DISABLE_BIT 0 // Uno Digital Pin 8 00056 #define STEPPERS_DISABLE_MASK (1<<STEPPERS_DISABLE_BIT) 00057 #define SetStepperDisableBit() STEPPERS_DISABLE_PORT |= (1 << STEPPERS_DISABLE_BIT) 00058 #define ResetStepperDisableBit() STEPPERS_DISABLE_PORT &= ~(1<<STEPPERS_DISABLE_BIT) 00059 #define EnableStepperDisabeBit() STEPPERS_DISABLE_DDR |= 1<<STEPPERS_DISABLE_BIT 00060 00061 // Define homing/hard limit switch input pins and limit interrupt vectors. 00062 // NOTE: All limit bit pins must be on the same port, but not on a port with other input pins (CONTROL). 00063 #define LIMIT_DDR DDRB 00064 #define LIMIT_PIN PINB 00065 #define LIMIT_PORT PORTB 00066 #define X_LIMIT_BIT 1 // Uno Digital Pin 9 00067 #define Y_LIMIT_BIT 2 // Uno Digital Pin 10 00068 #ifdef VARIABLE_SPINDLE // Z Limit pin and spindle enabled swapped to access hardware PWM on Pin 11. 00069 #define Z_LIMIT_BIT 4 // Uno Digital Pin 12 00070 #else 00071 #define Z_LIMIT_BIT 3 // Uno Digital Pin 11 00072 #endif 00073 #define LIMIT_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT)|(1<<Z_LIMIT_BIT)) // All limit bits 00074 #define LIMIT_INT PCIE0 // Pin change interrupt enable pin 00075 #define LIMIT_INT_vect PCINT0_vect 00076 #define LIMIT_PCMSK PCMSK0 // Pin change interrupt register 00077 00078 // Define spindle enable and spindle direction output pins. 00079 #define SPINDLE_ENABLE_DDR DDRB 00080 #define SPINDLE_ENABLE_PORT PORTB 00081 // Z Limit pin and spindle PWM/enable pin swapped to access hardware PWM on Pin 11. 00082 #ifdef VARIABLE_SPINDLE 00083 #ifdef USE_SPINDLE_DIR_AS_ENABLE_PIN 00084 // If enabled, spindle direction pin now used as spindle enable, while PWM remains on D11. 00085 #define SPINDLE_ENABLE_BIT 5 // Uno Digital Pin 13 (NOTE: D13 can't be pulled-high input due to LED.) 00086 #else 00087 #define SPINDLE_ENABLE_BIT 3 // Uno Digital Pin 11 00088 #endif 00089 #else 00090 #define SPINDLE_ENABLE_BIT 4 // Uno Digital Pin 12 00091 #endif 00092 #ifndef USE_SPINDLE_DIR_AS_ENABLE_PIN 00093 #define SPINDLE_DIRECTION_DDR DDRB 00094 #define SPINDLE_DIRECTION_PORT PORTB 00095 #define SPINDLE_DIRECTION_BIT 5 // Uno Digital Pin 13 (NOTE: D13 can't be pulled-high input due to LED.) 00096 #endif 00097 #define SetSpindleEnablebit() SPINDLE_ENABLE_PORT |= (1<<SPINDLE_ENABLE_BIT); // Set pin to high 00098 #define ResetSpindleEnablebit() SPINDLE_ENABLE_PORT &= ~(1<<SPINDLE_ENABLE_BIT); // Set pin to low 00099 #define SetSpindleDirectionBit() SPINDLE_DIRECTION_PORT |= (1<<SPINDLE_DIRECTION_BIT); 00100 #define ResetSpindleDirectionBit() SPINDLE_DIRECTION_PORT &= ~(1<<SPINDLE_DIRECTION_BIT); 00101 00102 00103 // Define flood and mist coolant enable output pins. 00104 #define COOLANT_FLOOD_DDR DDRC 00105 #define COOLANT_FLOOD_PORT PORTC 00106 #define COOLANT_FLOOD_BIT 3 // Uno Analog Pin 3 00107 #define COOLANT_MIST_DDR DDRC 00108 #define COOLANT_MIST_PORT PORTC 00109 #define COOLANT_MIST_BIT 4 // Uno Analog Pin 4 00110 00111 // Define user-control controls (cycle start, reset, feed hold) input pins. 00112 // NOTE: All CONTROLs pins must be on the same port and not on a port with other input pins (limits). 00113 #define CONTROL_DDR DDRC 00114 #define CONTROL_PIN PINC 00115 #define CONTROL_PORT PORTC 00116 #define CONTROL_RESET_BIT 0 // Uno Analog Pin 0 00117 #define CONTROL_FEED_HOLD_BIT 1 // Uno Analog Pin 1 00118 #define CONTROL_CYCLE_START_BIT 2 // Uno Analog Pin 2 00119 #define CONTROL_SAFETY_DOOR_BIT 1 // Uno Analog Pin 1 NOTE: Safety door is shared with feed hold. Enabled by config define. 00120 #define CONTROL_INT PCIE1 // Pin change interrupt enable pin 00121 #define CONTROL_INT_vect PCINT1_vect 00122 #define CONTROL_PCMSK PCMSK1 // Pin change interrupt register 00123 #define CONTROL_MASK ((1<<CONTROL_RESET_BIT)|(1<<CONTROL_FEED_HOLD_BIT)|(1<<CONTROL_CYCLE_START_BIT)|(1<<CONTROL_SAFETY_DOOR_BIT)) 00124 #define CONTROL_INVERT_MASK CONTROL_MASK // May be re-defined to only invert certain control pins. 00125 00126 // Define probe switch input pin. 00127 #define PROBE_DDR DDRC 00128 #define PROBE_PIN PINC 00129 #define PROBE_PORT PORTC 00130 #define PROBE_BIT 5 // Uno Analog Pin 5 00131 #define PROBE_MASK (1<<PROBE_BIT) 00132 00133 // Variable spindle configuration below. Do not change unless you know what you are doing. 00134 // NOTE: Only used when variable spindle is enabled. 00135 #define SPINDLE_PWM_MAX_VALUE 255 // Don't change. 328p fast PWM mode fixes top value as 255. 00136 #ifndef SPINDLE_PWM_MIN_VALUE 00137 #define SPINDLE_PWM_MIN_VALUE 1 // Must be greater than zero. 00138 #endif 00139 #define SPINDLE_PWM_OFF_VALUE 0 00140 #define SPINDLE_PWM_RANGE (SPINDLE_PWM_MAX_VALUE-SPINDLE_PWM_MIN_VALUE) 00141 #define SPINDLE_TCCRA_REGISTER TCCR2A 00142 #define SPINDLE_TCCRB_REGISTER TCCR2B 00143 #define SPINDLE_OCR_REGISTER OCR2A 00144 #define SPINDLE_COMB_BIT COM2A1 00145 00146 // Prescaled, 8-bit Fast PWM mode. 00147 #define SPINDLE_TCCRA_INIT_MASK ((1<<WGM20) | (1<<WGM21)) // Configures fast PWM mode. 00148 // #define SPINDLE_TCCRB_INIT_MASK (1<<CS20) // Disable prescaler -> 62.5kHz 00149 // #define SPINDLE_TCCRB_INIT_MASK (1<<CS21) // 1/8 prescaler -> 7.8kHz (Used in v0.9) 00150 // #define SPINDLE_TCCRB_INIT_MASK ((1<<CS21) | (1<<CS20)) // 1/32 prescaler -> 1.96kHz 00151 #define SPINDLE_TCCRB_INIT_MASK (1<<CS22) // 1/64 prescaler -> 0.98kHz (J-tech laser) 00152 00153 // NOTE: On the 328p, these must be the same as the SPINDLE_ENABLE settings. 00154 #define SPINDLE_PWM_DDR DDRB 00155 #define SPINDLE_PWM_PORT PORTB 00156 #define SPINDLE_PWM_BIT 3 // Uno Digital Pin 11 00157 00158 #endif 00159 00160 // Define serial port pins and interrupt vectors. 00161 #ifdef CPU_MAP_WIN32 00162 // Define step pulse output pins. NOTE: All step bit pins must be on the same port. 00163 #define STEP_DDR DDRD 00164 #define STEP_PORT PORTD 00165 #define X_STEP_BIT 2 00166 #define Y_STEP_BIT 3 00167 #define Z_STEP_BIT 4 00168 #define STEP_MASK ((1<<X_STEP_BIT)|(1<<Y_STEP_BIT)|(1<<Z_STEP_BIT)) // All step bits 00169 00170 // Define step direction output pins. NOTE: All direction pins must be on the same port. 00171 #define DIRECTION_DDR DDRD 00172 #define DIRECTION_PORT PORTD 00173 #define X_DIRECTION_BIT 5 00174 #define Y_DIRECTION_BIT 6 00175 #define Z_DIRECTION_BIT 7 00176 #define DIRECTION_MASK ((1<<X_DIRECTION_BIT)|(1<<Y_DIRECTION_BIT)|(1<<Z_DIRECTION_BIT)) // All direction bits 00177 00178 // Define stepper driver enable/disable output pin. 00179 #define SetStepperDisableBit() 00180 #define ResetStepperDisableBit() 00181 00182 00183 // Define homing/hard limit switch input pins and limit interrupt vectors. 00184 // NOTE: All limit bit pins must be on the same port, but not on a port with other input pins (CONTROL). 00185 #define LIMIT_DDR DDRB 00186 #define LIMIT_PIN PINB 00187 #define LIMIT_PORT PORTB 00188 #define X_LIMIT_BIT 1 00189 #define Y_LIMIT_BIT 2 00190 #ifdef VARIABLE_SPINDLE // Z Limit pin and spindle enabled swapped to access hardware PWM on Pin 11. 00191 #define Z_LIMIT_BIT 4 00192 #else 00193 #define Z_LIMIT_BIT 3 00194 #endif 00195 #define LIMIT_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT)|(1<<Z_LIMIT_BIT)) // All limit bits 00196 #define LIMIT_INT PCIE0 // Pin change interrupt enable pin 00197 #define LIMIT_INT_vect PCINT0_vect 00198 #define LIMIT_PCMSK PCMSK0 // Pin change interrupt register 00199 00200 // Define spindle enable and spindle direction output pins. 00201 #define SPINDLE_ENABLE_DDR DDRB 00202 #define SPINDLE_ENABLE_PORT PORTB 00203 // Z Limit pin and spindle PWM/enable pin swapped to access hardware PWM on Pin 11. 00204 #ifdef VARIABLE_SPINDLE 00205 #ifdef USE_SPINDLE_DIR_AS_ENABLE_PIN 00206 // If enabled, spindle direction pin now used as spindle enable, while PWM remains on D11. 00207 #define SPINDLE_ENABLE_BIT 5 // Uno Digital Pin 13 (NOTE: D13 can't be pulled-high input due to LED.) 00208 #else 00209 #define SPINDLE_ENABLE_BIT 3 // Uno Digital Pin 11 00210 #endif 00211 #else 00212 #define SPINDLE_ENABLE_BIT 4 // Uno Digital Pin 12 00213 #endif 00214 #ifndef USE_SPINDLE_DIR_AS_ENABLE_PIN 00215 #define SPINDLE_DIRECTION_DDR DDRB 00216 #define SPINDLE_DIRECTION_PORT PORTB 00217 #define SPINDLE_DIRECTION_BIT 5 // Uno Digital Pin 13 (NOTE: D13 can't be pulled-high input due to LED.) 00218 #endif 00219 00220 // Define flood and mist coolant enable output pins. 00221 // NOTE: Uno analog pins 4 and 5 are reserved for an i2c interface, and may be installed at 00222 // a later date if flash and memory space allows. 00223 #define COOLANT_FLOOD_DDR DDRC 00224 #define COOLANT_FLOOD_PORT PORTC 00225 #define COOLANT_FLOOD_BIT 3 // Uno Analog Pin 3 00226 #ifdef ENABLE_M7 // Mist coolant disabled by default. See config.h to enable/disable. 00227 #define COOLANT_MIST_DDR DDRC 00228 #define COOLANT_MIST_PORT PORTC 00229 #define COOLANT_MIST_BIT 4 // Uno Analog Pin 4 00230 #endif 00231 00232 // Define user-control controls (cycle start, reset, feed hold) input pins. 00233 // NOTE: All CONTROLs pins must be on the same port and not on a port with other input pins (limits). 00234 #define CONTROL_DDR DDRC 00235 #define CONTROL_PIN PINC 00236 #define CONTROL_PORT PORTC 00237 #define CONTROL_RESET_BIT 0 // MEGA2560 Analog Pin 8 00238 #define CONTROL_FEED_HOLD_BIT 1 // MEGA2560 Analog Pin 9 00239 #define CONTROL_CYCLE_START_BIT 2 // MEGA2560 Analog Pin 10 00240 #define CONTROL_SAFETY_DOOR_BIT 3 // MEGA2560 Analog Pin 11 00241 #define CONTROL_INT PCIE2 // Pin change interrupt enable pin 00242 #define CONTROL_INT_vect PCINT2_vect 00243 #define CONTROL_PCMSK PCMSK2 // Pin change interrupt register 00244 #define CONTROL_MASK ((1<<CONTROL_RESET_BIT)|(1<<CONTROL_FEED_HOLD_BIT)|(1<<CONTROL_CYCLE_START_BIT)|(1<<CONTROL_SAFETY_DOOR_BIT)) 00245 00246 // Define probe switch input pin. 00247 #define PROBE_DDR DDRC 00248 #define PROBE_PIN PINC 00249 #define PROBE_PORT PORTC 00250 #define PROBE_BIT 5 // Uno Analog Pin 5 00251 #define PROBE_MASK (1<<PROBE_BIT) 00252 00253 // Start of PWM & Stepper Enabled Spindle 00254 #ifdef VARIABLE_SPINDLE 00255 // Advanced Configuration Below You should not need to touch these variables 00256 #define PWM_MAX_VALUE 255.0 00257 #define TCCRA_REGISTER TCCR2A 00258 #define TCCRB_REGISTER TCCR2B 00259 #define OCR_REGISTER OCR2A 00260 00261 #define COMB_BIT COM2A1 00262 #define WAVE0_REGISTER WGM20 00263 #define WAVE1_REGISTER WGM21 00264 #define WAVE2_REGISTER WGM22 00265 #define WAVE3_REGISTER WGM23 00266 00267 // NOTE: On the 328p, these must be the same as the SPINDLE_ENABLE settings. 00268 #define SPINDLE_PWM_DDR DDRB 00269 #define SPINDLE_PWM_PORT PORTB 00270 #define SPINDLE_PWM_BIT 3 // Uno Digital Pin 11 00271 #endif // End of VARIABLE_SPINDLE 00272 #define SPINDLE_PWM_MAX_VALUE 255 // Don't change. 328p fast PWM mode fixes top value as 255. 00273 #ifndef SPINDLE_PWM_MIN_VALUE 00274 #define SPINDLE_PWM_MIN_VALUE 1 // Must be greater than zero. 00275 #endif 00276 #define SPINDLE_PWM_OFF_VALUE 0 00277 #define SPINDLE_PWM_RANGE (SPINDLE_PWM_MAX_VALUE-SPINDLE_PWM_MIN_VALUE) 00278 00279 #define SetSpindleEnablebit() // Set pin to high 00280 #define ResetSpindleEnablebit() // Set pin to low 00281 #define SetSpindleDirectionBit() 00282 #define ResetSpindleDirectionBit() 00283 00284 #endif 00285 00286 #ifdef CPU_MAP_STM32F103 00287 00288 // Define step pulse output pins. NOTE: All step bit pins must be on the same port. 00289 #define STEP_PORT GPIOA 00290 #define RCC_STEP_PORT RCC_APB2Periph_GPIOA 00291 #define X_STEP_BIT 0 00292 #define Y_STEP_BIT 1 00293 #define Z_STEP_BIT 2 00294 #define STEP_MASK ((1<<X_STEP_BIT)|(1<<Y_STEP_BIT)|(1<<Z_STEP_BIT)) // All step bits 00295 00296 // Define step direction output pins. NOTE: All direction pins must be on the same port. 00297 #define DIRECTION_PORT GPIOA 00298 #define RCC_DIRECTION_PORT RCC_APB2Periph_GPIOA 00299 #define X_DIRECTION_BIT 3 00300 #define Y_DIRECTION_BIT 4 00301 #define Z_DIRECTION_BIT 5 00302 #define DIRECTION_MASK ((1<<X_DIRECTION_BIT)|(1<<Y_DIRECTION_BIT)|(1<<Z_DIRECTION_BIT)) // All direction bits 00303 00304 // Define stepper driver enable/disable output pin. 00305 #define STEPPERS_DISABLE_PORT GPIOA 00306 #define RCC_STEPPERS_DISABLE_PORT RCC_APB2Periph_GPIOA 00307 #define STEPPERS_DISABLE_BIT 6 00308 #define STEPPERS_DISABLE_MASK (1<<STEPPERS_DISABLE_BIT) 00309 #define SetStepperDisableBit() GPIO_SetBits(STEPPERS_DISABLE_PORT,STEPPERS_DISABLE_MASK) 00310 #define ResetStepperDisableBit() GPIO_ResetBits(STEPPERS_DISABLE_PORT,STEPPERS_DISABLE_MASK) 00311 00312 00313 // Define homing/hard limit switch input pins and limit interrupt vectors. 00314 // NOTE: All limit bit pins must be on the same port 00315 #define LIMIT_PIN GPIOB 00316 #define LIMIT_PORT GPIOB 00317 #define RCC_LIMIT_PORT RCC_APB2Periph_GPIOB 00318 #define GPIO_LIMIT_PORT GPIO_PortSourceGPIOB 00319 #define X_LIMIT_BIT 10 00320 #define Y_LIMIT_BIT 11 00321 #define Z_LIMIT_BIT 12 00322 00323 #define LIMIT_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT)|(1<<Z_LIMIT_BIT)) // All limit bits 00324 00325 // Define spindle enable and spindle direction output pins. 00326 #define SPINDLE_ENABLE_PORT GPIOB 00327 #define RCC_SPINDLE_ENABLE_PORT RCC_APB2Periph_GPIOB 00328 #define SPINDLE_ENABLE_BIT 13 // 00329 #ifndef USE_SPINDLE_DIR_AS_ENABLE_PIN 00330 #define SPINDLE_DIRECTION_DDR GPIOB 00331 #define SPINDLE_DIRECTION_PORT GPIOB 00332 #define SPINDLE_DIRECTION_BIT 14 // 00333 #endif 00334 #define SetSpindleEnablebit() GPIO_WriteBit(SPINDLE_ENABLE_PORT, 1 << SPINDLE_ENABLE_BIT, Bit_SET) 00335 #define ResetSpindleEnablebit() GPIO_WriteBit(SPINDLE_ENABLE_PORT, 1 << SPINDLE_ENABLE_BIT, Bit_RESET) 00336 #define SetSpindleDirectionBit() GPIO_WriteBit(SPINDLE_DIRECTION_PORT, 1 << SPINDLE_DIRECTION_BIT,Bit_SET) 00337 #define ResetSpindleDirectionBit() GPIO_WriteBit(SPINDLE_DIRECTION_PORT, 1 << SPINDLE_DIRECTION_BIT,Bit_RESET) 00338 00339 00340 // Define flood and mist coolant enable output pins. 00341 // a later date if flash and memory space allows. 00342 #define COOLANT_FLOOD_PORT GPIOB 00343 #define RCC_COOLANT_FLOOD_PORT RCC_APB2Periph_GPIOB 00344 #define COOLANT_FLOOD_BIT 3 00345 #define COOLANT_MIST_PORT GPIOB 00346 #define RCC_COOLANT_MIST_PORT RCC_APB2Periph_GPIOB 00347 #define COOLANT_MIST_BIT 4 00348 00349 // Define user-control controls (cycle start, reset, feed hold) input pins. 00350 // NOTE: All CONTROLs pins must be on the same port and not on a port with other input pins (limits). 00351 #define CONTROL_PIN_PORT GPIOB 00352 #define CONTROL_PORT GPIOB 00353 #define RCC_CONTROL_PORT RCC_APB2Periph_GPIOB 00354 #define GPIO_CONTROL_PORT GPIO_PortSourceGPIOB 00355 #define CONTROL_RESET_BIT 5 00356 #define CONTROL_FEED_HOLD_BIT 6 00357 #define CONTROL_CYCLE_START_BIT 7 00358 #define CONTROL_SAFETY_DOOR_BIT 8 00359 #define CONTROL_MASK ((1<<CONTROL_RESET_BIT)|(1<<CONTROL_FEED_HOLD_BIT)|(1<<CONTROL_CYCLE_START_BIT)|(1<<CONTROL_SAFETY_DOOR_BIT)) 00360 00361 // Define probe switch input pin. 00362 #define PROBE_PORT GPIOA 00363 #define RCC_PROBE_PORT RCC_APB2Periph_GPIOA 00364 #define PROBE_BIT 15 00365 #define PROBE_MASK (1<<PROBE_BIT) 00366 00367 // Start of PWM & Stepper Enabled Spindle 00368 #ifdef VARIABLE_SPINDLE 00369 00370 // NOTE: On the 328p, these must be the same as the SPINDLE_ENABLE settings. 00371 #define SPINDLE_PWM_FREQUENCY 10000 // KHz 00372 #define SPINDLE_PWM_DDR GPIOA 00373 #define SPINDLE_PWM_PORT GPIOA 00374 #define RCC_SPINDLE_PWM_PORT RCC_APB2Periph_GPIOA 00375 #define SPINDLE_PWM_BIT 8 00376 #endif // End of VARIABLE_SPINDLE 00377 #define SPINDLE_PWM_MAX_VALUE (1000000 / SPINDLE_PWM_FREQUENCY) 00378 #ifndef SPINDLE_PWM_MIN_VALUE 00379 #define SPINDLE_PWM_MIN_VALUE 1 // Must be greater than zero. 00380 #endif 00381 #define SPINDLE_PWM_OFF_VALUE 0 00382 #define SPINDLE_PWM_RANGE (SPINDLE_PWM_MAX_VALUE-SPINDLE_PWM_MIN_VALUE) 00383 00384 // Port A Port B 00385 // 0 X_STEP_BIT 00386 // 1 Y_STEP_BIT 00387 // 2 Z_STEP_BIT 00388 // 3 X_DIRECTION_BIT COOLANT_FLOOD_BIT 00389 // 4 Y_DIRECTION_BIT COOLANT_MIST_BIT 00390 // 5 Z_DIRECTION_BIT CONTROL_RESET_BIT 00391 // 6 STEPPERS_DISABLE_BIT CONTROL_FEED_HOLD_BIT 00392 // 7 CONTROL_CYCLE_START_BIT 00393 // 8 SPINDLE_PWM_BIT CONTROL_SAFETY_DOOR_BIT 00394 // 9 00395 // 10 X_LIMIT_BIT 00396 // 11 Y_LIMIT_BIT 00397 // 12 Z_LIMIT_BIT 00398 // 13 14 SWD SPINDLE_ENABLE_BIT 00399 // 14 SPINDLE_DIRECTION_BIT 00400 // 15 PROBE_BIT 00401 00402 #endif 00403 /* 00404 #ifdef CPU_MAP_CUSTOM_PROC 00405 // For a custom pin map or different processor, copy and edit one of the available cpu 00406 // map files and modify it to your needs. Make sure the defined name is also changed in 00407 // the config.h file. 00408 #endif 00409 */ 00410 00411 #endif
Generated on Tue Jul 12 2022 20:45:31 by
 1.7.2
 1.7.2