pins_Rambo_1_3.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*****************************************************************
  2. * Rambo mini 1.3 Pin Assignments
  3. ******************************************************************/
  4. #define ELECTRONICS "RAMBo13a"
  5. #define KNOWN_BOARD
  6. #ifndef __AVR_ATmega2560__
  7. #error Oops! Make sure you have 'Arduino Mega 2560 or Rambo' selected from the 'Tools -> Boards' menu.
  8. #endif
  9. #define PAT9125
  10. #define PINDA_THERMISTOR
  11. #define SWI2C // enable software i2c
  12. #define SWI2C_A8 // 8bit address functions
  13. #define PAT9125_SWI2C
  14. #define PAT9125_SWI2C_SDA 20 //SDA on P3
  15. #define PAT9125_SWI2C_SCL 21 //SCL on P3
  16. #define PAT9125_SWI2C_CFG 0xb1 //2us clock delay, 2048 cycles timeout
  17. //#define PAT9125_HWI2C
  18. #define X_STEP_PIN 37
  19. #define X_DIR_PIN 48
  20. #define X_MIN_PIN 12
  21. #define X_MAX_PIN -1
  22. #define X_ENABLE_PIN 29
  23. #define X_MS1_PIN 40
  24. #define X_MS2_PIN 41
  25. #define Y_STEP_PIN 36
  26. #define Y_DIR_PIN 49
  27. #define Y_MIN_PIN 11
  28. #define Y_MAX_PIN -1
  29. #define Y_ENABLE_PIN 28
  30. #define Y_MS1_PIN 69
  31. #define Y_MS2_PIN 39
  32. #define Z_STEP_PIN 35
  33. #define Z_DIR_PIN 47
  34. #define Z_MIN_PIN 10
  35. #define Z_MAX_PIN 23
  36. #define Z_ENABLE_PIN 27
  37. #define Z_MS1_PIN 68
  38. #define Z_MS2_PIN 67
  39. #define HEATER_BED_PIN 4 //PG5
  40. #define TEMP_BED_PIN 2 //A2
  41. #define HEATER_0_PIN 3 //PE5
  42. #define TEMP_0_PIN 0 //A0
  43. #define HEATER_1_PIN -1
  44. #define TEMP_1_PIN 1 //A1
  45. #define HEATER_2_PIN -1
  46. #define TEMP_2_PIN -1
  47. #define TEMP_AMBIENT_PIN 6 //A6
  48. #define TEMP_PINDA_PIN 3 //A3
  49. #define E0_STEP_PIN 34
  50. #define E0_DIR_PIN 43
  51. #define E0_ENABLE_PIN 26
  52. #define E0_MS1_PIN 65
  53. #define E0_MS2_PIN 66
  54. #define MOTOR_CURRENT_PWM_XY_PIN 46
  55. #define MOTOR_CURRENT_PWM_Z_PIN 45
  56. #define MOTOR_CURRENT_PWM_E_PIN 44
  57. #define SDPOWER -1
  58. #define SDSS 53
  59. #define LED_PIN 13
  60. #define FAN_PIN 6
  61. #define FAN_1_PIN -1
  62. #define PS_ON_PIN -1
  63. #define KILL_PIN -1 // 80 with Smart Controller LCD
  64. #define SUICIDE_PIN -1 // PIN that has to be turned on right after start, to keep power flowing.
  65. #define TACH_0 30 // noctua extruder fan
  66. #ifdef ULTRA_LCD
  67. //#define KILL_PIN 32
  68. #ifdef NEWPANEL
  69. #define BEEPER 84 // Beeper on AUX-4
  70. #define LCD_PINS_RS 82
  71. #define LCD_PINS_ENABLE 18
  72. #define LCD_PINS_D4 19
  73. #define LCD_PINS_D5 70
  74. #define LCD_PINS_D6 85
  75. #define LCD_PINS_D7 71
  76. //buttons are directly attached using AUX-2
  77. #define BTN_EN1 72
  78. #define BTN_EN2 14
  79. #define BTN_ENC 9 // the click
  80. #define SDCARDDETECT 15
  81. #endif //NEWPANEL
  82. #endif //ULTRA_LCD
  83. // Support for an 8 bit logic analyzer, for example the Saleae.
  84. // Channels 0-2 are fast, they could generate 2.667Mhz waveform with a software loop.
  85. #define LOGIC_ANALYZER_CH0 X_MIN_PIN // PB6
  86. #define LOGIC_ANALYZER_CH1 Y_MIN_PIN // PB5
  87. #define LOGIC_ANALYZER_CH2 53 // PB0 (PROC_nCS)
  88. // Channels 3-7 are slow, they could generate
  89. // 0.889Mhz waveform with a software loop and interrupt locking,
  90. // 1.333MHz waveform without interrupt locking.
  91. #define LOGIC_ANALYZER_CH3 73 // PJ3
  92. // PK0 has no Arduino digital pin assigned, so we set it directly.
  93. #define WRITE_LOGIC_ANALYZER_CH4(value) if (value) PORTK |= (1 << 0); else PORTK &= ~(1 << 0) // PK0
  94. #define LOGIC_ANALYZER_CH5 16 // PH0 (RXD2)
  95. #define LOGIC_ANALYZER_CH6 17 // PH1 (TXD2)
  96. #define LOGIC_ANALYZER_CH7 76 // PJ5
  97. #define LOGIC_ANALYZER_CH0_ENABLE SET_OUTPUT(LOGIC_ANALYZER_CH0)
  98. #define LOGIC_ANALYZER_CH1_ENABLE SET_OUTPUT(LOGIC_ANALYZER_CH1)
  99. #define LOGIC_ANALYZER_CH2_ENABLE SET_OUTPUT(LOGIC_ANALYZER_CH2)
  100. #define LOGIC_ANALYZER_CH3_ENABLE SET_OUTPUT(LOGIC_ANALYZER_CH3)
  101. #define LOGIC_ANALYZER_CH4_ENABLE do { DDRK |= 1 << 0; } while (0)
  102. #define LOGIC_ANALYZER_CH5_ENABLE do { cbi(UCSR2B, TXEN2); cbi(UCSR2B, RXEN2); cbi(UCSR2B, RXCIE2); SET_OUTPUT(LOGIC_ANALYZER_CH5); } while (0)
  103. #define LOGIC_ANALYZER_CH6_ENABLE do { cbi(UCSR2B, TXEN2); cbi(UCSR2B, RXEN2); cbi(UCSR2B, RXCIE2); SET_OUTPUT(LOGIC_ANALYZER_CH6); } while (0)
  104. #define LOGIC_ANALYZER_CH7_ENABLE SET_OUTPUT(LOGIC_ANALYZER_CH7)