My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

pins.h 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. #ifndef PINS_H
  2. #define PINS_H
  3. /****************************************************************************************
  4. * Arduino pin assignment
  5. *
  6. * ATMega168
  7. * +-\/-+
  8. * PC6 1| |28 PC5 (AI 5 / D19)
  9. * (D 0) PD0 2| |27 PC4 (AI 4 / D18)
  10. * (D 1) PD1 3| |26 PC3 (AI 3 / D17)
  11. * (D 2) PD2 4| |25 PC2 (AI 2 / D16)
  12. * PWM+ (D 3) PD3 5| |24 PC1 (AI 1 / D15)
  13. * (D 4) PD4 6| |23 PC0 (AI 0 / D14)
  14. * VCC 7| |22 GND
  15. * GND 8| |21 AREF
  16. * PB6 9| |20 AVCC
  17. * PB7 10| |19 PB5 (D 13)
  18. * PWM+ (D 5) PD5 11| |18 PB4 (D 12)
  19. * PWM+ (D 6) PD6 12| |17 PB3 (D 11) PWM
  20. * (D 7) PD7 13| |16 PB2 (D 10) PWM
  21. * (D 8) PB0 14| |15 PB1 (D 9) PWM
  22. * +----+
  23. ****************************************************************************************/
  24. #if MOTHERBOARD == 0
  25. #define KNOWN_BOARD 1
  26. #ifndef __AVR_ATmega168__
  27. #error Oops! Make sure you have 'Arduino Diecimila' selected from the boards menu.
  28. #endif
  29. #define X_STEP_PIN 2
  30. #define X_DIR_PIN 3
  31. #define X_ENABLE_PIN -1
  32. #define X_MIN_PIN 4
  33. #define X_MAX_PIN 9
  34. #define Y_STEP_PIN 10
  35. #define Y_DIR_PIN 7
  36. #define Y_ENABLE_PIN -1
  37. #define Y_MIN_PIN 8
  38. #define Y_MAX_PIN 13
  39. #define Z_STEP_PIN 19
  40. #define Z_DIR_PIN 18
  41. #define Z_ENABLE_PIN 5
  42. #define Z_MIN_PIN 17
  43. #define Z_MAX_PIN 16
  44. #define E0_STEP_PIN 11
  45. #define E0_DIR_PIN 12
  46. #define E0_ENABLE_PIN -1
  47. #define SDPOWER -1
  48. #define SDSS -1
  49. #define LED_PIN -1
  50. #define FAN_PIN -1
  51. #define PS_ON_PIN 15
  52. #define KILL_PIN -1
  53. #define HEATER_0_PIN 6
  54. #define HEATER_1_PIN -1
  55. #define HEATER_2_PIN -1
  56. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  57. #define TEMP_1_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  58. #define TEMP_2_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  59. #define HEATER_BED_PIN -1
  60. #define TEMP_BED_PIN -1
  61. #endif
  62. /****************************************************************************************
  63. * Sanguino/RepRap Motherboard with direct-drive extruders
  64. *
  65. * ATMega644P
  66. *
  67. * +---\/---+
  68. * (D 0) PB0 1| |40 PA0 (AI 0 / D31)
  69. * (D 1) PB1 2| |39 PA1 (AI 1 / D30)
  70. * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
  71. * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
  72. * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
  73. * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
  74. * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
  75. * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
  76. * RST 9| |32 AREF
  77. * VCC 10| |31 GND
  78. * GND 11| |30 AVCC
  79. * XTAL2 12| |29 PC7 (D 23)
  80. * XTAL1 13| |28 PC6 (D 22)
  81. * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
  82. * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
  83. * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
  84. * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
  85. * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
  86. * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
  87. * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
  88. * +--------+
  89. *
  90. ****************************************************************************************/
  91. #if MOTHERBOARD == 1
  92. #define KNOWN_BOARD 1
  93. #ifndef __AVR_ATmega644P__
  94. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  95. #endif
  96. #define X_STEP_PIN 15
  97. #define X_DIR_PIN 18
  98. #define X_ENABLE_PIN 19
  99. #define X_MIN_PIN 20
  100. #define X_MAX_PIN 21
  101. #define Y_STEP_PIN 23
  102. #define Y_DIR_PIN 22
  103. #define Y_ENABLE_PIN 19
  104. #define Y_MIN_PIN 25
  105. #define Y_MAX_PIN 26
  106. #define Z_STEP_PIN 29
  107. #define Z_DIR_PIN 30
  108. #define Z_ENABLE_PIN 31
  109. #define Z_MIN_PIN 2
  110. #define Z_MAX_PIN 1
  111. #define E0_STEP_PIN 12
  112. #define E0_DIR_PIN 16
  113. #define E0_ENABLE_PIN 3
  114. #define SDPOWER -1
  115. #define SDSS -1
  116. #define LED_PIN 0
  117. #define FAN_PIN -1
  118. #define PS_ON_PIN -1
  119. #define KILL_PIN -1
  120. #define HEATER_0_PIN 14
  121. #define HEATER_1_PIN -1
  122. #define HEATER_2_PIN -1
  123. #define TEMP_0_PIN 4 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  124. #define TEMP_1_PIN -1
  125. #define TEMP_2_PIN -1
  126. #define HEATER_BED_PIN -1
  127. #define TEMP_BED_PIN -1
  128. /* Unused (1) (2) (3) 4 5 6 7 8 9 10 11 12 13 (14) (15) (16) 17 (18) (19) (20) (21) (22) (23) 24 (25) (26) (27) 28 (29) (30) (31) */
  129. #endif
  130. /****************************************************************************************
  131. * RepRap Motherboard ****---NOOOOOO RS485/EXTRUDER CONTROLLER!!!!!!!!!!!!!!!!!---*******
  132. *
  133. ****************************************************************************************/
  134. #if MOTHERBOARD == 2
  135. #define KNOWN_BOARD 1
  136. #ifndef __AVR_ATmega644P__
  137. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  138. #endif
  139. #define X_STEP_PIN 15
  140. #define X_DIR_PIN 18
  141. #define X_ENABLE_PIN 19
  142. #define X_MIN_PIN 20
  143. #define X_MAX_PIN 21
  144. #define Y_STEP_PIN 23
  145. #define Y_DIR_PIN 22
  146. #define Y_ENABLE_PIN 24
  147. #define Y_MIN_PIN 25
  148. #define Y_MAX_PIN 26
  149. #define Z_STEP_PINN 27
  150. #define Z_DIR_PINN 28
  151. #define Z_ENABLE_PIN 29
  152. #define Z_MIN_PIN 30
  153. #define Z_MAX_PIN 31
  154. #define E0_STEP_PIN 17
  155. #define E0_DIR_PIN 16
  156. #define E0_ENABLE_PIN -1
  157. #define SDPOWER -1
  158. #define SDSS 4
  159. #define LED_PIN 0
  160. #define SD_CARD_WRITE 2
  161. #define SD_CARD_DETECT 3
  162. #define SD_CARD_SELECT 4
  163. //our RS485 pins
  164. #define TX_ENABLE_PIN 12
  165. #define RX_ENABLE_PIN 13
  166. //pin for controlling the PSU.
  167. #define PS_ON_PIN 14
  168. #define FAN_PIN -1
  169. #define KILL_PIN -1
  170. #define HEATER_0_PIN -1
  171. #define HEATER_1_PIN -1
  172. #define HEATER_2_PIN -1
  173. #define TEMP_0_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  174. #define TEMP_1_PIN -1
  175. #define TEMP_2_PIN -1
  176. #define HEATER_BED_PIN -1
  177. #define TEMP_BED_PIN -1
  178. #endif
  179. /****************************************************************************************
  180. * Arduino Mega pin assignment
  181. *
  182. ****************************************************************************************/
  183. #if MOTHERBOARD == 33
  184. #define MOTHERBOARD 3
  185. #define RAMPS_V_1_3
  186. #endif
  187. #if MOTHERBOARD == 3
  188. #define KNOWN_BOARD 1
  189. //////////////////FIX THIS//////////////
  190. #ifndef __AVR_ATmega1280__
  191. #ifndef __AVR_ATmega2560__
  192. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  193. #endif
  194. #endif
  195. // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
  196. // #define RAMPS_V_1_3
  197. // #define RAMPS_V_1_0
  198. #ifdef RAMPS_V_1_3
  199. #define X_STEP_PIN 54
  200. #define X_DIR_PIN 55
  201. #define X_ENABLE_PIN 38
  202. #define X_MIN_PIN 3
  203. #define X_MAX_PIN 2 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  204. #define Y_STEP_PIN 60
  205. #define Y_DIR_PIN 61
  206. #define Y_ENABLE_PIN 56
  207. #define Y_MIN_PIN 14
  208. #define Y_MAX_PIN 15 //15
  209. #define Z_STEP_PIN 46
  210. #define Z_DIR_PIN 48
  211. #define Z_ENABLE_PIN 62
  212. #define Z_MIN_PIN 18
  213. #define Z_MAX_PIN 19 //19
  214. #define E0_STEP_PIN 26
  215. #define E0_DIR_PIN 28
  216. #define E0_ENABLE_PIN 24
  217. #define E1_STEP_PIN 36
  218. #define E1_DIR_PIN 34
  219. #define E1_ENABLE_PIN 30
  220. #define SDPOWER -1
  221. #define SDSS 53
  222. #define LED_PIN 13
  223. #define FAN_PIN 4
  224. #define PS_ON_PIN 12
  225. #define KILL_PIN -1
  226. #define HEATER_0_PIN 10 // EXTRUDER 1
  227. #define HEATER_1_PIN 9 // EXTRUDER 2
  228. #define HEATER_2_PIN -1 // EXTRUDER 2
  229. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  230. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  231. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  232. #define HEATER_BED_PIN 8 // BED
  233. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  234. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default
  235. #define X_STEP_PIN 26
  236. #define X_DIR_PIN 28
  237. #define X_ENABLE_PIN 24
  238. #define X_MIN_PIN 3
  239. #define X_MAX_PIN -1 //2
  240. #define Y_STEP_PIN 38
  241. #define Y_DIR_PIN 40
  242. #define Y_ENABLE_PIN 36
  243. #define Y_MIN_PIN 16
  244. #define Y_MAX_PIN -1 //17
  245. #define Z_STEP_PIN 44
  246. #define Z_DIR_PIN 46
  247. #define Z_ENABLE_PIN 42
  248. #define Z_MIN_PIN 18
  249. #define Z_MAX_PIN -1 //19
  250. #define E0_STEP_PIN 32
  251. #define E0_DIR_PIN 34
  252. #define E0_ENABLE_PIN 30
  253. #define SDPOWER 48
  254. #define SDSS 53
  255. #define LED_PIN 13
  256. #define PS_ON_PIN -1
  257. #define KILL_PIN -1
  258. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  259. #define HEATER_0_PIN 12 // RAMPS 1.0
  260. #define HEATER_BED_PIN -1 // RAMPS 1.0
  261. #define FAN_PIN 11 // RAMPS 1.0
  262. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  263. #define HEATER_0_PIN 10 // RAMPS 1.1
  264. #define HEATER_BED_PIN 8 // RAMPS 1.1
  265. #define FAN_PIN 9 // RAMPS 1.1
  266. #endif
  267. #define HEATER_1_PIN -1
  268. #define HEATER_2_PIN -1
  269. #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  270. #define TEMP_1_PIN -1
  271. #define TEMP_2_PIN -1
  272. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  273. #endif
  274. // SPI for Max6675 Thermocouple
  275. #ifndef SDSUPPORT
  276. // these pins are defined in the SD library if building with SD support #define SCK_PIN 52
  277. #define MISO_PIN 50
  278. #define MOSI_PIN 51
  279. #define MAX6675_SS 53
  280. #else
  281. #define MAX6675_SS 49
  282. #endif
  283. #endif
  284. /****************************************************************************************
  285. * Duemilanove w/ ATMega328P pin assignment
  286. *
  287. ****************************************************************************************/
  288. #if MOTHERBOARD == 4
  289. #define KNOWN_BOARD 1
  290. #ifndef __AVR_ATmega328P__
  291. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  292. #endif
  293. #define X_STEP_PIN 19
  294. #define X_DIR_PIN 18
  295. #define X_ENABLE_PIN -1
  296. #define X_MIN_PIN 17
  297. #define X_MAX_PIN -1
  298. #define Y_STEP_PIN 10
  299. #define Y_DIR_PIN 7
  300. #define Y_ENABLE_PIN -1
  301. #define Y_MIN_PIN 8
  302. #define Y_MAX_PIN -1
  303. #define Z_STEP_PIN 13
  304. #define Z_DIR_PIN 3
  305. #define Z_ENABLE_PIN 2
  306. #define Z_MIN_PIN 4
  307. #define Z_MAX_PIN -1
  308. #define E0_STEP_PIN 11
  309. #define E0_DIR_PIN 12
  310. #define E0_ENABLE_PIN -1
  311. #define SDPOWER -1
  312. #define SDSS -1
  313. #define LED_PIN -1
  314. #define FAN_PIN 5
  315. #define PS_ON_PIN -1
  316. #define KILL_PIN -1
  317. #define HEATER_0_PIN 6
  318. #define HEATER_1_PIN -1
  319. #define HEATER_2_PIN -1
  320. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  321. #define TEMP_1_PIN -1
  322. #define TEMP_2_PIN -1
  323. #define HEATER_BED_PIN -1
  324. #define TEMP_BED_PIN -1
  325. #endif
  326. /****************************************************************************************
  327. * Gen6 pin assignment
  328. *
  329. ****************************************************************************************/
  330. #if MOTHERBOARD == 5
  331. #define KNOWN_BOARD 1
  332. #ifndef __AVR_ATmega644P__
  333. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  334. #endif
  335. //x axis pins
  336. #define X_STEP_PIN 15
  337. #define X_DIR_PIN 18
  338. #define X_ENABLE_PIN 19
  339. #define X_MIN_PIN 20
  340. #define X_MAX_PIN -1
  341. //y axis pins
  342. #define Y_STEP_PIN 23
  343. #define Y_DIR_PIN 22
  344. #define Y_ENABLE_PIN 24
  345. #define Y_MIN_PIN 25
  346. #define Y_MAX_PIN -1
  347. //z axis pins
  348. #define Z_STEP_PIN 27
  349. #define Z_DIR_PIN 28
  350. #define Z_ENABLE_PIN 29
  351. #define Z_MIN_PIN 30
  352. #define Z_MAX_PIN -1
  353. //extruder pins
  354. #define E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  355. #define E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  356. #define E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  357. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  358. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  359. #define TEMP_2_PIN -1 //changed @ rkoeppl 20110410
  360. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  361. #define HEATER_1_PIN -1
  362. #define HEATER_2_PIN -1
  363. #define HEATER_BED_PIN -1 //changed @ rkoeppl 20110410
  364. #define TEMP_BED_PIN -1 //changed @ rkoeppl 20110410
  365. #define SDPOWER -1
  366. #define SDSS 17
  367. #define LED_PIN -1 //changed @ rkoeppl 20110410
  368. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  369. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  370. //our pin for debugging.
  371. #define DEBUG_PIN 0
  372. //our RS485 pins
  373. #define TX_ENABLE_PIN 12
  374. #define RX_ENABLE_PIN 13
  375. #endif
  376. /****************************************************************************************
  377. * Sanguinololu pin assignment
  378. *
  379. ****************************************************************************************/
  380. #if MOTHERBOARD == 62
  381. #define MOTHERBOARD 6
  382. #define SANGUINOLOLU_V_1_2
  383. #endif
  384. #if MOTHERBOARD == 6
  385. #define KNOWN_BOARD 1
  386. #ifndef __AVR_ATmega644P__
  387. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  388. #endif
  389. #define X_STEP_PIN 15
  390. #define X_DIR_PIN 21
  391. #define X_MIN_PIN 18
  392. #define X_MAX_PIN -2
  393. #define Y_STEP_PIN 22
  394. #define Y_DIR_PIN 23
  395. #define Y_MIN_PIN 19
  396. #define Y_MAX_PIN -1
  397. #define Z_STEP_PIN 3
  398. #define Z_DIR_PIN 2
  399. #define Z_MIN_PIN 20
  400. #define Z_MAX_PIN -1
  401. #define E0_STEP_PIN 1
  402. #define E0_DIR_PIN 0
  403. #define LED_PIN -1
  404. #define FAN_PIN -1
  405. #define PS_ON_PIN -1
  406. #define KILL_PIN -1
  407. #define HEATER_0_PIN 13 // (extruder)
  408. #define HEATER_1_PIN -1
  409. #define HEATER_2_PIN -1
  410. #ifdef SANGUINOLOLU_V_1_2
  411. #define HEATER_BED_PIN 12 // (bed)
  412. #define X_ENABLE_PIN 14
  413. #define Y_ENABLE_PIN 14
  414. #define Z_ENABLE_PIN 26
  415. #define E0_ENABLE_PIN 14
  416. #else
  417. #define HEATER_BED_PIN 14 // (bed)
  418. #define X_ENABLE_PIN -1
  419. #define Y_ENABLE_PIN -1
  420. #define Z_ENABLE_PIN -1
  421. #define E0_ENABLE_PIN -1
  422. #endif
  423. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  424. #define TEMP_1_PIN -1
  425. #define TEMP_2_PIN -1
  426. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  427. #define SDPOWER -1
  428. #define SDSS 31
  429. #endif
  430. /*******************************************************************************
  431. *********
  432. * Gen7 Alfons3 pin assignment
  433. *
  434. ********************************************************************************
  435. ********/
  436. /* These Pins are assigned for the modified GEN7 Board from Alfons3 Please review the pins and adjust it for your needs*/
  437. #if MOTHERBOARD == 77
  438. #define KNOWN_BOARD
  439. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  440. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  441. #endif
  442. //x axis pins
  443. #define X_STEP_PIN 21 //different from stanard GEN7
  444. #define X_DIR_PIN 20 //different from stanard GEN7
  445. #define X_ENABLE_PIN 24
  446. #define X_MIN_PIN 0
  447. #define X_MAX_PIN -1
  448. //y axis pins
  449. #define Y_STEP_PIN 23
  450. #define Y_DIR_PIN 22
  451. #define Y_ENABLE_PIN 24
  452. #define Y_MIN_PIN 1
  453. #define Y_MAX_PIN -1
  454. //z axis pins
  455. #define Z_STEP_PIN 26
  456. #define Z_DIR_PIN 25
  457. #define Z_ENABLE_PIN 24
  458. #define Z_MIN_PIN 2
  459. #define Z_MAX_PIN -1
  460. //extruder pins
  461. #define E0_STEP_PIN 28
  462. #define E0_DIR_PIN 27
  463. #define E0_ENABLE_PIN 24
  464. #define TEMP_0_PIN 2
  465. #define TEMP_1_PIN -1
  466. #define TEMP_2_PIN -1
  467. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  468. #define HEATER_0_PIN 4
  469. #define HEATER_1_PIN -1
  470. #define HEATER_2_PIN -1
  471. #define HEATER_BED_PIN 3 // (bed)
  472. #define SDPOWER -1
  473. #define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support
  474. #define LED_PIN -1
  475. #define FAN_PIN -1
  476. #define PS_ON_PIN 19
  477. //our pin for debugging.
  478. #define DEBUG_PIN -1
  479. //our RS485 pins
  480. //#define TX_ENABLE_PIN 12
  481. //#define RX_ENABLE_PIN 13
  482. #define BEEPER -1
  483. #define SDCARDDETECT -1
  484. #define SUICIDE_PIN -1 //has to be defined; otherwise Power_off doesn't work
  485. //Pins for 4bit LCD Support
  486. #define LCD_PINS_RS 18
  487. #define LCD_PINS_ENABLE 17
  488. #define LCD_PINS_D4 16
  489. #define LCD_PINS_D5 15
  490. #define LCD_PINS_D6 13
  491. #define LCD_PINS_D7 14
  492. //buttons are directly attached
  493. #define BTN_EN1 11
  494. #define BTN_EN2 10
  495. #define BTN_ENC 12 //the click
  496. #define BLEN_C 2
  497. #define BLEN_B 1
  498. #define BLEN_A 0
  499. #define encrot0 0
  500. #define encrot1 2
  501. #define encrot2 3
  502. #define encrot3 1
  503. #endif
  504. #if MOTHERBOARD == 7
  505. #define KNOWN_BOARD
  506. /*****************************************************************
  507. * Ultimaker pin assignment
  508. ******************************************************************/
  509. #ifndef __AVR_ATmega1280__
  510. #ifndef __AVR_ATmega2560__
  511. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  512. #endif
  513. #endif
  514. #define X_STEP_PIN 25
  515. #define X_DIR_PIN 23
  516. #define X_MIN_PIN 22
  517. #define X_MAX_PIN 24
  518. #define X_ENABLE_PIN 27
  519. #define Y_STEP_PIN 31
  520. #define Y_DIR_PIN 33
  521. #define Y_MIN_PIN 26
  522. #define Y_MAX_PIN 28
  523. #define Y_ENABLE_PIN 29
  524. #define Z_STEP_PIN 37
  525. #define Z_DIR_PIN 39
  526. #define Z_MIN_PIN 30
  527. #define Z_MAX_PIN 32
  528. #define Z_ENABLE_PIN 35
  529. #define HEATER_BED_PIN 4
  530. #define TEMP_BED_PIN 10
  531. #define HEATER_0_PIN 2
  532. #define TEMP_0_PIN 8
  533. #define EXTRUDER_1_HEATER_PIN 3
  534. #define EXTRUDER_1_TEMPERATURE_PIN 10
  535. #define HEATER_1_PIN 51
  536. #define TEMP_1_PIN 3
  537. #define HEATER_2_PIN -1
  538. #define TEMP_2_PIN -1
  539. #define E0_STEP_PIN 43
  540. #define E0_DIR_PIN 45
  541. #define E0_ENABLE_PIN 41
  542. #define E1_STEP_PIN 49
  543. #define E1_DIR_PIN 47
  544. #define E1_ENABLE_PIN 51
  545. #define SDPOWER -1
  546. #define SDSS 53
  547. #define LED_PIN 13
  548. #define FAN_PIN 7
  549. #define PS_ON_PIN 12
  550. #define KILL_PIN -1
  551. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  552. #ifdef ULTRA_LCD
  553. #ifdef NEWPANEL
  554. //arduino pin witch triggers an piezzo beeper
  555. #define BEEPER 18
  556. #define LCD_PINS_RS 20
  557. #define LCD_PINS_ENABLE 17
  558. #define LCD_PINS_D4 16
  559. #define LCD_PINS_D5 21
  560. #define LCD_PINS_D6 5
  561. #define LCD_PINS_D7 6
  562. //buttons are directly attached
  563. #define BTN_EN1 40
  564. #define BTN_EN2 42
  565. #define BTN_ENC 19 //the click
  566. #define BLEN_C 2
  567. #define BLEN_B 1
  568. #define BLEN_A 0
  569. #define SDCARDDETECT 38
  570. //encoder rotation values
  571. #define encrot0 0
  572. #define encrot1 2
  573. #define encrot2 3
  574. #define encrot3 1
  575. #else //old style panel with shift register
  576. //arduino pin witch triggers an piezzo beeper
  577. #define BEEPER 18
  578. //buttons are attached to a shift register
  579. #define SHIFT_CLK 38
  580. #define SHIFT_LD 42
  581. #define SHIFT_OUT 40
  582. #define SHIFT_EN 17
  583. #define LCD_PINS_RS 16
  584. #define LCD_PINS_ENABLE 5
  585. #define LCD_PINS_D4 6
  586. #define LCD_PINS_D5 21
  587. #define LCD_PINS_D6 20
  588. #define LCD_PINS_D7 19
  589. //encoder rotation values
  590. #define encrot0 0
  591. #define encrot1 2
  592. #define encrot2 3
  593. #define encrot3 1
  594. //bits in the shift register that carry the buttons for:
  595. // left up center down right red
  596. #define BL_LE 7
  597. #define BL_UP 6
  598. #define BL_MI 5
  599. #define BL_DW 4
  600. #define BL_RI 3
  601. #define BL_ST 2
  602. #define BLEN_B 1
  603. #define BLEN_A 0
  604. #endif
  605. #endif //ULTRA_LCD
  606. #endif
  607. /****************************************************************************************
  608. * Teensylu 0.7 pin assingments (ATMEGA90USB)
  609. * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
  610. ****************************************************************************************/
  611. #if MOTHERBOARD == 8
  612. #define MOTHERBOARD 8
  613. #define KNOWN_BOARD 1
  614. #define X_STEP_PIN 0
  615. #define X_DIR_PIN 1
  616. #define X_ENABLE_PIN 39
  617. #define X_MIN_PIN 13
  618. #define X_MAX_PIN -1
  619. #define Y_STEP_PIN 2
  620. #define Y_DIR_PIN 3
  621. #define Y_ENABLE_PIN 38
  622. #define Y_MIN_PIN 14
  623. #define Y_MAX_PIN -1
  624. #define Z_STEP_PIN 4
  625. #define Z_DIR_PIN 5
  626. #define Z_ENABLE_PIN 23
  627. #define Z_MIN_PIN 15
  628. #define Z_MAX_PIN -1
  629. #define E0_STEP_PIN 6
  630. #define E0_DIR_PIN 7
  631. #define E0_ENABLE_PIN 19
  632. #define HEATER_0_PIN 21 // Extruder
  633. #define HEATER_1_PIN -1
  634. #define HEATER_2_PIN -1
  635. #define HEATER_BED_PIN 20 // Bed
  636. #define FAN_PIN 22 // Fan
  637. #define TEMP_0_PIN 7 // Extruder
  638. #define TEMP_1_PIN -1
  639. #define TEMP_2_PIN -1
  640. #define TEMP_BED_PIN 6 // Bed
  641. #define SDPOWER -1
  642. #define SDSS 8
  643. #define LED_PIN -1
  644. #define PS_ON_PIN -1
  645. #define KILL_PIN -1
  646. #define ALARM_PIN -1
  647. #ifndef SDSUPPORT
  648. // these pins are defined in the SD library if building with SD support
  649. #define SCK_PIN 9
  650. #define MISO_PIN 11
  651. #define MOSI_PIN 10
  652. #endif
  653. #endif
  654. #ifndef KNOWN_BOARD
  655. #error Unknown MOTHERBOARD value in configuration.h
  656. #endif
  657. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  658. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN
  659. #if EXTRUDERS == 3
  660. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN
  661. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN
  662. #elif EXTRUDERS == 2
  663. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN
  664. #define _E2_PINS -1
  665. #elif EXTRUDERS == 1
  666. #define _E1_PINS -1
  667. #define _E2_PINS -1
  668. #else
  669. #error Unsupported number of extruders
  670. #endif
  671. #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, LED_PIN, PS_ON_PIN, \
  672. HEATER_0_PIN, HEATER_1_PIN, HEATER_2_PIN, \
  673. HEATER_BED_PIN, FAN_PIN, \
  674. _E0_PINS, _E1_PINS, _E2_PINS, \
  675. TEMP_0_PIN, TEMP_1_PIN, TEMP_2_PIN, TEMP_BED_PIN }
  676. #endif