pins.h 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. #ifndef PINS_H
  2. #define PINS_H
  3. #include "boards.h"
  4. #if !MB(5DPRINT)
  5. #define X_MS1_PIN -1
  6. #define X_MS2_PIN -1
  7. #define Y_MS1_PIN -1
  8. #define Y_MS2_PIN -1
  9. #define Z_MS1_PIN -1
  10. #define Z_MS2_PIN -1
  11. #define E0_MS1_PIN -1
  12. #define E0_MS2_PIN -1
  13. #define E1_MS1_PIN -1
  14. #define E1_MS2_PIN -1
  15. #define DIGIPOTSS_PIN -1
  16. #endif
  17. #define LARGE_FLASH true
  18. /*****************************************************************
  19. * Rambo Pin Assignments 1.3
  20. ******************************************************************/
  21. #if MOTHERBOARD == 302
  22. #define MINI_RAMBO
  23. #endif
  24. #if MOTHERBOARD == 301 || MOTHERBOARD == 302
  25. #define KNOWN_BOARD
  26. #ifndef __AVR_ATmega2560__
  27. #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
  28. #endif
  29. #define FR_SENS 21
  30. #define X_STEP_PIN 37
  31. #define X_DIR_PIN 48
  32. #define X_MIN_PIN 12
  33. #define X_MAX_PIN 24
  34. #define X_ENABLE_PIN 29
  35. #define X_MS1_PIN 40
  36. #define X_MS2_PIN 41
  37. #define Y_STEP_PIN 36
  38. #define Y_DIR_PIN 49
  39. #define Y_MIN_PIN 11
  40. #define Y_MAX_PIN 23
  41. #define Y_ENABLE_PIN 28
  42. #define Y_MS1_PIN 69
  43. #define Y_MS2_PIN 39
  44. #define Z_STEP_PIN 35
  45. #define Z_DIR_PIN 47
  46. #define Z_MIN_PIN 10
  47. #define Z_MAX_PIN 30
  48. #define Z_ENABLE_PIN 27
  49. #define Z_MS1_PIN 68
  50. #define Z_MS2_PIN 67
  51. #define TEMP_BED_PIN 2
  52. #define TEMP_0_PIN 0
  53. #define HEATER_1_PIN 7
  54. #define TEMP_1_PIN 1
  55. #define TEMP_2_PIN -1
  56. // The SDSS pin uses a different pin mapping from file Sd2PinMap.h
  57. #define SDSS 53
  58. #ifndef SDSUPPORT
  59. // these pins are defined in the SD library if building with SD support
  60. #define SCK_PIN 52
  61. #define MISO_PIN 50
  62. #define MOSI_PIN 51
  63. #endif
  64. #define BEEPER 84
  65. #define BTN_EN1 72
  66. #define BTN_EN2 14
  67. #define BTN_ENC 9
  68. #define SDCARDDETECT 15
  69. #define LCD_PINS_RS 82
  70. #define LCD_PINS_ENABLE 18
  71. #define LCD_PINS_D4 19
  72. #define LCD_PINS_D5 70
  73. #define LCD_PINS_D6 85
  74. #define LCD_PINS_D7 71
  75. #define E0_STEP_PIN 34
  76. #define E0_DIR_PIN 43
  77. #define E0_ENABLE_PIN 26
  78. #define E0_MS1_PIN 65
  79. #define E0_MS2_PIN 66
  80. #define LED_PIN 13
  81. #ifdef THREEMM_PRINTER
  82. #define FAN_PIN 8
  83. #else
  84. #define FAN_PIN 6
  85. #endif
  86. #define KILL_PIN -1 //80 with Smart Controller LCD
  87. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  88. #define SDPOWER -1
  89. #define HEATER_2_PIN -1
  90. #ifdef MINI_RAMBO
  91. #define ELECTRONICS "RAMBo13a"
  92. #define HEATER_0_PIN 3
  93. #define HEATER_BED_PIN 4
  94. #define FAN_1_PIN -1 //6
  95. #define PS_ON_PIN 71
  96. #define MOTOR_CURRENT_PWM_XY_PIN 46
  97. #define MOTOR_CURRENT_PWM_Z_PIN 45
  98. #define MOTOR_CURRENT_PWM_E_PIN 44
  99. #else //RAMBo
  100. #define ELECTRONICS "RAMBoBig"
  101. #define E1_STEP_PIN 33
  102. #define E1_DIR_PIN 42
  103. #define E1_ENABLE_PIN 25
  104. #define E1_MS1_PIN 63
  105. #define E1_MS2_PIN 64
  106. #define DIGIPOTSS_PIN 38
  107. #define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping
  108. #define HEATER_0_PIN 9
  109. #define HEATER_BED_PIN 3
  110. #define PS_ON_PIN 4
  111. #define SDSS 53
  112. #ifdef ULTRA_LCD
  113. #define KILL_PIN 80
  114. #ifdef NEWPANEL
  115. //arduino pin which triggers an piezzo beeper
  116. #define BEEPER 84 // Beeper on AUX-4
  117. #define LCD_PINS_RS 82
  118. #define LCD_PINS_ENABLE 18
  119. #define LCD_PINS_D4 19
  120. #define LCD_PINS_D5 70
  121. #define LCD_PINS_D6 85
  122. #define LCD_PINS_D7 71
  123. //buttons are directly attached using AUX-2
  124. #define BTN_EN1 76
  125. #define BTN_EN2 77
  126. #define BTN_ENC 78 //the click
  127. #define BLEN_C 2
  128. #define BLEN_B 1
  129. #define BLEN_A 0
  130. #define SDCARDDETECT 81 // Ramps does not use this port
  131. //encoder rotation values
  132. #define encrot0 0
  133. #define encrot1 2
  134. #define encrot2 3
  135. #define encrot3 1
  136. #else //old style panel with shift register
  137. //arduino pin witch triggers an piezzo beeper
  138. #define BEEPER 84 //No Beeper added
  139. //buttons are attached to a shift register
  140. // Not wired this yet
  141. // #define SHIFT_CLK 38
  142. // #define SHIFT_LD 42
  143. // #define SHIFT_OUT 40
  144. // #define SHIFT_EN 17
  145. #define LCD_PINS_RS 82
  146. #define LCD_PINS_ENABLE 18
  147. #define LCD_PINS_D4 19
  148. #define LCD_PINS_D5 70
  149. #define LCD_PINS_D6 85
  150. #define LCD_PINS_D7 71
  151. //encoder rotation values
  152. #define encrot0 0
  153. #define encrot1 2
  154. #define encrot2 3
  155. #define encrot3 1
  156. //bits in the shift register that carry the buttons for:
  157. // left up center down right red
  158. #define BL_LE 7
  159. #define BL_UP 6
  160. #define BL_MI 5
  161. #define BL_DW 4
  162. #define BL_RI 3
  163. #define BL_ST 2
  164. #define BLEN_B 1
  165. #define BLEN_A 0
  166. #endif
  167. #endif //ULTRA_LCD
  168. #endif //RAMBo/MiniRambo option
  169. #endif
  170. /*****************************************************************
  171. * Rambo mini Pin Assignments 1.0
  172. ******************************************************************/
  173. #if MOTHERBOARD == 102
  174. #define ELECTRONICS "RAMBo10a"
  175. #define KNOWN_BOARD
  176. #ifndef __AVR_ATmega2560__
  177. #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
  178. #endif
  179. #define FR_SENS 21
  180. #define LARGE_FLASH true
  181. #define X_STEP_PIN 37
  182. #define X_DIR_PIN 48
  183. #define X_MIN_PIN 12
  184. #define X_MAX_PIN 24
  185. #define X_ENABLE_PIN 29
  186. #define X_MS1_PIN 40
  187. #define X_MS2_PIN 41
  188. #define Y_STEP_PIN 36
  189. #define Y_DIR_PIN 49
  190. #define Y_MIN_PIN 11
  191. #define Y_MAX_PIN 23
  192. #define Y_ENABLE_PIN 28
  193. #define Y_MS1_PIN 69
  194. #define Y_MS2_PIN 39
  195. #define Z_STEP_PIN 35
  196. #define Z_DIR_PIN 47
  197. #define Z_MIN_PIN 10
  198. #define Z_MAX_PIN 30
  199. #define Z_ENABLE_PIN 27
  200. #define Z_MS1_PIN 68
  201. #define Z_MS2_PIN 67
  202. #define TEMP_BED_PIN 2
  203. #define TEMP_0_PIN 0
  204. #define HEATER_1_PIN 7
  205. #define TEMP_1_PIN 1
  206. #define TEMP_2_PIN -1
  207. // The SDSS pin uses a different pin mapping from file Sd2PinMap.h
  208. #define SDSS 53
  209. #ifndef SDSUPPORT
  210. // these pins are defined in the SD library if building with SD support
  211. #define SCK_PIN 52
  212. #define MISO_PIN 50
  213. #define MOSI_PIN 51
  214. #endif
  215. #define BEEPER 78
  216. #define BTN_EN1 80
  217. #define BTN_EN2 73
  218. #define BTN_ENC 21
  219. #define SDCARDDETECT 72
  220. #define LCD_PINS_RS 38
  221. #define LCD_PINS_ENABLE 5
  222. #define LCD_PINS_D4 14
  223. #define LCD_PINS_D5 15
  224. #define LCD_PINS_D6 32
  225. #define LCD_PINS_D7 31
  226. #define E0_STEP_PIN 34
  227. #define E0_DIR_PIN 43
  228. #define E0_ENABLE_PIN 26
  229. #define E0_MS1_PIN 65
  230. #define E0_MS2_PIN 66
  231. #define LED_PIN 13
  232. #ifdef THREEMM_PRINTER
  233. #define FAN_PIN 8
  234. #else
  235. #define FAN_PIN 6
  236. #endif
  237. #define KILL_PIN -1 //80 with Smart Controller LCD
  238. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  239. #define SDPOWER -1
  240. #define HEATER_2_PIN -1
  241. #define HEATER_0_PIN 3
  242. #define HEATER_BED_PIN 4
  243. #define FAN_1_PIN -1 //6
  244. #define PS_ON_PIN 71
  245. #define MOTOR_CURRENT_PWM_XY_PIN 46
  246. #define MOTOR_CURRENT_PWM_Z_PIN 45
  247. #define MOTOR_CURRENT_PWM_E_PIN 44
  248. #endif
  249. #ifndef KNOWN_BOARD
  250. #error Unknown MOTHERBOARD value in configuration.h
  251. #endif
  252. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  253. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,
  254. #if EXTRUDERS > 1
  255. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
  256. #else
  257. #define _E1_PINS
  258. #endif
  259. #if EXTRUDERS > 2
  260. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,
  261. #else
  262. #define _E2_PINS
  263. #endif
  264. #ifdef X_STOP_PIN
  265. #if X_HOME_DIR < 0
  266. #define X_MIN_PIN X_STOP_PIN
  267. #define X_MAX_PIN -1
  268. #else
  269. #define X_MIN_PIN -1
  270. #define X_MAX_PIN X_STOP_PIN
  271. #endif
  272. #endif
  273. #ifdef Y_STOP_PIN
  274. #if Y_HOME_DIR < 0
  275. #define Y_MIN_PIN Y_STOP_PIN
  276. #define Y_MAX_PIN -1
  277. #else
  278. #define Y_MIN_PIN -1
  279. #define Y_MAX_PIN Y_STOP_PIN
  280. #endif
  281. #endif
  282. #ifdef Z_STOP_PIN
  283. #if Z_HOME_DIR < 0
  284. #define Z_MIN_PIN Z_STOP_PIN
  285. #define Z_MAX_PIN -1
  286. #else
  287. #define Z_MIN_PIN -1
  288. #define Z_MAX_PIN Z_STOP_PIN
  289. #endif
  290. #endif
  291. #ifdef DISABLE_MAX_ENDSTOPS
  292. #define X_MAX_PIN -1
  293. #define Y_MAX_PIN -1
  294. #define Z_MAX_PIN -1
  295. #endif
  296. #ifdef DISABLE_MIN_ENDSTOPS
  297. #define X_MIN_PIN -1
  298. #define Y_MIN_PIN -1
  299. #define Z_MIN_PIN -1
  300. #endif
  301. #define SENSITIVE_PINS {0, 1, X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, PS_ON_PIN, \
  302. HEATER_BED_PIN, FAN_PIN, \
  303. _E0_PINS _E1_PINS _E2_PINS \
  304. analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
  305. #endif //__PINS_H