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 25KB

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