pins.h 9.0 KB

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