pins.h 11 KB

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