Advertisement
Guest User

Horus_fw changes for cnc shield

a guest
Apr 26th, 2017
1,356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.92 KB | None | 0 0
  1. #ifdef CPU_MAP_ATMEGA328P_HORUS // Arduino Uno for Horus Project
  2.  
  3.   // Serial port pins
  4.   #define SERIAL_RX USART_RX_vect
  5.   #define SERIAL_UDRE USART_UDRE_vect
  6.  
  7.   // Define laser pulse output pins. NOTE: All laser pins must be on the same port.
  8.   #define LASER_DDR       DDRB
  9.   #define LASER_PORT      PORTB
  10.   #define LASER1_BIT      1  // Uno Digital Pin 9
  11.   #define LASER2_BIT      2  // Uno Digital Pin 10
  12.   #define LASER3_BIT      3  // Uno Digital Pin 11
  13.   #define LASER4_BIT      4  // Uno Digital Pin 12
  14.   #define LASER_MASK      ((1<<LASER1_BIT)|(1<<LASER2_BIT)|(1<<LASER3_BIT)|(1<<LASER4_BIT)) // All step bits
  15.  
  16.   // Define step pulse output pins. NOTE: All step bit pins must be on the same port.
  17.   #define STEP_DDR        DDRD
  18.   #define STEP_PORT       PORTD
  19.   #define X_STEP_BIT      2  // Uno Digital Pin 2
  20.   #define Y_STEP_BIT      3  // Uno Digital Pin 3
  21.   #define Z_STEP_BIT      4  // Uno Digital Pin 4
  22.   #define STEP_MASK       ((1<<X_STEP_BIT)|(1<<Y_STEP_BIT)|(1<<Z_STEP_BIT)) // All step bits
  23.  
  24.   // Define step direction output pins. NOTE: All direction pins must be on the same port.
  25.  #define DIRECTION_DDR     DDRD
  26.   #define DIRECTION_PORT    PORTD
  27.   #define X_DIRECTION_BIT   5  // Uno Digital Pin 5
  28.   #define Y_DIRECTION_BIT   6  // Uno Digital Pin 6
  29.   #define Z_DIRECTION_BIT   7  // Uno Digital Pin 7
  30.   #define DIRECTION_MASK    ((1<<X_DIRECTION_BIT)|(1<<Y_DIRECTION_BIT)|(1<<Z_DIRECTION_BIT)) // All direction bits
  31.  
  32.   // Define stepper driver enable/disable output pin.
  33.   #define STEPPERS_DISABLE_DDR    DDRB
  34.   #define STEPPERS_DISABLE_PORT   PORTB
  35.   #define STEPPERS_DISABLE_BIT    0  // Uno Digital Pin 8
  36.   #define STEPPERS_DISABLE_MASK   (1<<STEPPERS_DISABLE_BIT)
  37.  
  38.   // Define probe switch input pin.
  39.   #define PROBE_DDR       DDRC
  40.   #define PROBE_PIN       PINC
  41.   #define PROBE_PORT      PORTC
  42.   #define PROBE_BIT       5  // Uno Analog Pin 5
  43.   #define PROBE_MASK      (1<<PROBE_BIT)
  44.  
  45. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement