My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

pins.h 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781
  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 16
  9. #define X_MAX_PIN -1
  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 #define SCK_PIN 52
  312. #define MISO_PIN 50
  313. #define MOSI_PIN 51
  314. #define MAX6675_SS 53
  315. #else
  316. #define MAX6675_SS 49
  317. #endif
  318. #endif
  319. /****************************************************************************************
  320. * Duemilanove w/ ATMega328P pin assignment
  321. *
  322. ****************************************************************************************/
  323. #if MOTHERBOARD == 4
  324. #define KNOWN_BOARD 1
  325. #ifndef __AVR_ATmega328P__
  326. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  327. #endif
  328. #define X_STEP_PIN 19
  329. #define X_DIR_PIN 18
  330. #define X_ENABLE_PIN -1
  331. #define X_MIN_PIN 17
  332. #define X_MAX_PIN -1
  333. #define Y_STEP_PIN 10
  334. #define Y_DIR_PIN 7
  335. #define Y_ENABLE_PIN -1
  336. #define Y_MIN_PIN 8
  337. #define Y_MAX_PIN -1
  338. #define Z_STEP_PIN 13
  339. #define Z_DIR_PIN 3
  340. #define Z_ENABLE_PIN 2
  341. #define Z_MIN_PIN 4
  342. #define Z_MAX_PIN -1
  343. #define E0_STEP_PIN 11
  344. #define E0_DIR_PIN 12
  345. #define E0_ENABLE_PIN -1
  346. #define SDPOWER -1
  347. #define SDSS -1
  348. #define LED_PIN -1
  349. #define FAN_PIN 5
  350. #define PS_ON_PIN -1
  351. #define KILL_PIN -1
  352. #define HEATER_0_PIN 6
  353. #define HEATER_1_PIN -1
  354. #define HEATER_2_PIN -1
  355. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  356. #define TEMP_1_PIN -1
  357. #define TEMP_2_PIN -1
  358. #define HEATER_BED_PIN -1
  359. #define TEMP_BED_PIN -1
  360. #endif
  361. /****************************************************************************************
  362. * Gen6 pin assignment
  363. *
  364. ****************************************************************************************/
  365. #if MOTHERBOARD == 5
  366. #define KNOWN_BOARD 1
  367. #ifndef __AVR_ATmega644P__
  368. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  369. #endif
  370. //x axis pins
  371. #define X_STEP_PIN 15
  372. #define X_DIR_PIN 18
  373. #define X_ENABLE_PIN 19
  374. #define X_MIN_PIN 20
  375. #define X_MAX_PIN -1
  376. //y axis pins
  377. #define Y_STEP_PIN 23
  378. #define Y_DIR_PIN 22
  379. #define Y_ENABLE_PIN 24
  380. #define Y_MIN_PIN 25
  381. #define Y_MAX_PIN -1
  382. //z axis pins
  383. #define Z_STEP_PIN 27
  384. #define Z_DIR_PIN 28
  385. #define Z_ENABLE_PIN 29
  386. #define Z_MIN_PIN 30
  387. #define Z_MAX_PIN -1
  388. //extruder pins
  389. #define E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  390. #define E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  391. #define E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  392. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  393. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  394. #define TEMP_2_PIN -1 //changed @ rkoeppl 20110410
  395. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  396. #define HEATER_1_PIN -1
  397. #define HEATER_2_PIN -1
  398. #define HEATER_BED_PIN -1 //changed @ rkoeppl 20110410
  399. #define TEMP_BED_PIN -1 //changed @ rkoeppl 20110410
  400. #define SDPOWER -1
  401. #define SDSS 17
  402. #define LED_PIN -1 //changed @ rkoeppl 20110410
  403. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  404. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  405. //our pin for debugging.
  406. #define DEBUG_PIN 0
  407. //our RS485 pins
  408. #define TX_ENABLE_PIN 12
  409. #define RX_ENABLE_PIN 13
  410. #endif
  411. /****************************************************************************************
  412. * Sanguinololu pin assignment
  413. *
  414. ****************************************************************************************/
  415. #if MOTHERBOARD == 62
  416. #define MOTHERBOARD 6
  417. #define SANGUINOLOLU_V_1_2
  418. #endif
  419. #if MOTHERBOARD == 6
  420. #define KNOWN_BOARD 1
  421. #ifndef __AVR_ATmega644P__
  422. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  423. #endif
  424. #define X_STEP_PIN 15
  425. #define X_DIR_PIN 21
  426. #define X_MIN_PIN 18
  427. #define X_MAX_PIN -2
  428. #define Y_STEP_PIN 22
  429. #define Y_DIR_PIN 23
  430. #define Y_MIN_PIN 19
  431. #define Y_MAX_PIN -1
  432. #define Z_STEP_PIN 3
  433. #define Z_DIR_PIN 2
  434. #define Z_MIN_PIN 20
  435. #define Z_MAX_PIN -1
  436. #define E0_STEP_PIN 1
  437. #define E0_DIR_PIN 0
  438. #define LED_PIN -1
  439. #define FAN_PIN -1
  440. #define PS_ON_PIN -1
  441. #define KILL_PIN -1
  442. #define HEATER_0_PIN 13 // (extruder)
  443. #define HEATER_1_PIN -1
  444. #define HEATER_2_PIN -1
  445. #ifdef SANGUINOLOLU_V_1_2
  446. #define HEATER_BED_PIN 12 // (bed)
  447. #define X_ENABLE_PIN 14
  448. #define Y_ENABLE_PIN 14
  449. #define Z_ENABLE_PIN 26
  450. #define E0_ENABLE_PIN 14
  451. #else
  452. #define HEATER_BED_PIN 14 // (bed)
  453. #define X_ENABLE_PIN -1
  454. #define Y_ENABLE_PIN -1
  455. #define Z_ENABLE_PIN -1
  456. #define E0_ENABLE_PIN -1
  457. #endif
  458. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  459. #define TEMP_1_PIN -1
  460. #define TEMP_2_PIN -1
  461. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  462. #define SDPOWER -1
  463. #define SDSS 31
  464. #endif
  465. #if MOTHERBOARD == 7
  466. #define KNOWN_BOARD
  467. /*****************************************************************
  468. * Ultimaker pin assignment
  469. ******************************************************************/
  470. #ifndef __AVR_ATmega1280__
  471. #ifndef __AVR_ATmega2560__
  472. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  473. #endif
  474. #endif
  475. #define X_STEP_PIN 25
  476. #define X_DIR_PIN 23
  477. #define X_MIN_PIN 22
  478. #define X_MAX_PIN 24
  479. #define X_ENABLE_PIN 27
  480. #define Y_STEP_PIN 31
  481. #define Y_DIR_PIN 33
  482. #define Y_MIN_PIN 26
  483. #define Y_MAX_PIN 28
  484. #define Y_ENABLE_PIN 29
  485. #define Z_STEP_PIN 37
  486. #define Z_DIR_PIN 39
  487. #define Z_MIN_PIN 30
  488. #define Z_MAX_PIN 32
  489. #define Z_ENABLE_PIN 35
  490. #define HEATER_BED_PIN 4
  491. #define TEMP_BED_PIN 10
  492. #define HEATER_0_PIN 2
  493. #define TEMP_0_PIN 8
  494. #define EXTRUDER_1_HEATER_PIN 3
  495. #define EXTRUDER_1_TEMPERATURE_PIN 10
  496. #define HEATER_1_PIN 51
  497. #define TEMP_1_PIN 3
  498. #define HEATER_2_PIN -1
  499. #define TEMP_2_PIN -1
  500. #define E0_STEP_PIN 43
  501. #define E0_DIR_PIN 45
  502. #define E0_ENABLE_PIN 41
  503. #define E1_STEP_PIN 49
  504. #define E1_DIR_PIN 47
  505. #define E1_ENABLE_PIN 51
  506. #define SDPOWER -1
  507. #define SDSS 53
  508. #define LED_PIN 13
  509. #define FAN_PIN 7
  510. #define PS_ON_PIN 12
  511. #define KILL_PIN -1
  512. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  513. #ifdef ULTRA_LCD
  514. #ifdef NEWPANEL
  515. //arduino pin witch triggers an piezzo beeper
  516. #define BEEPER 18
  517. #define LCD_PINS_RS 20
  518. #define LCD_PINS_ENABLE 17
  519. #define LCD_PINS_D4 16
  520. #define LCD_PINS_D5 21
  521. #define LCD_PINS_D6 5
  522. #define LCD_PINS_D7 6
  523. //buttons are directly attached
  524. #define BTN_EN1 40
  525. #define BTN_EN2 42
  526. #define BTN_ENC 19 //the click
  527. #define BLEN_C 2
  528. #define BLEN_B 1
  529. #define BLEN_A 0
  530. #define SDCARDDETECT 38
  531. //encoder rotation values
  532. #define encrot0 0
  533. #define encrot1 2
  534. #define encrot2 3
  535. #define encrot3 1
  536. #else //old style panel with shift register
  537. //arduino pin witch triggers an piezzo beeper
  538. #define BEEPER 18
  539. //buttons are attached to a shift register
  540. #define SHIFT_CLK 38
  541. #define SHIFT_LD 42
  542. #define SHIFT_OUT 40
  543. #define SHIFT_EN 17
  544. #define LCD_PINS_RS 16
  545. #define LCD_PINS_ENABLE 5
  546. #define LCD_PINS_D4 6
  547. #define LCD_PINS_D5 21
  548. #define LCD_PINS_D6 20
  549. #define LCD_PINS_D7 19
  550. //encoder rotation values
  551. #define encrot0 0
  552. #define encrot1 2
  553. #define encrot2 3
  554. #define encrot3 1
  555. //bits in the shift register that carry the buttons for:
  556. // left up center down right red
  557. #define BL_LE 7
  558. #define BL_UP 6
  559. #define BL_MI 5
  560. #define BL_DW 4
  561. #define BL_RI 3
  562. #define BL_ST 2
  563. #define BLEN_B 1
  564. #define BLEN_A 0
  565. #endif
  566. #endif //ULTRA_LCD
  567. #endif
  568. /****************************************************************************************
  569. * Teensylu 0.7 pin assingments (ATMEGA90USB)
  570. * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
  571. ****************************************************************************************/
  572. #if MOTHERBOARD == 8
  573. #define MOTHERBOARD 8
  574. #define KNOWN_BOARD 1
  575. #define X_STEP_PIN 0
  576. #define X_DIR_PIN 1
  577. #define X_ENABLE_PIN 39
  578. #define X_MIN_PIN 13
  579. #define X_MAX_PIN -1
  580. #define Y_STEP_PIN 2
  581. #define Y_DIR_PIN 3
  582. #define Y_ENABLE_PIN 38
  583. #define Y_MIN_PIN 14
  584. #define Y_MAX_PIN -1
  585. #define Z_STEP_PIN 4
  586. #define Z_DIR_PIN 5
  587. #define Z_ENABLE_PIN 23
  588. #define Z_MIN_PIN 15
  589. #define Z_MAX_PIN -1
  590. #define E0_STEP_PIN 6
  591. #define E0_DIR_PIN 7
  592. #define E0_ENABLE_PIN 19
  593. #define HEATER_0_PIN 21 // Extruder
  594. #define HEATER_1_PIN -1
  595. #define HEATER_2_PIN -1
  596. #define HEATER_BED_PIN 20 // Bed
  597. #define FAN_PIN 22 // Fan
  598. #define TEMP_0_PIN 7 // Extruder
  599. #define TEMP_1_PIN -1
  600. #define TEMP_2_PIN -1
  601. #define TEMP_BED_PIN 6 // Bed
  602. #define SDPOWER -1
  603. #define SDSS 8
  604. #define LED_PIN -1
  605. #define PS_ON_PIN -1
  606. #define KILL_PIN -1
  607. #define ALARM_PIN -1
  608. #ifndef SDSUPPORT
  609. // these pins are defined in the SD library if building with SD support
  610. #define SCK_PIN 9
  611. #define MISO_PIN 11
  612. #define MOSI_PIN 10
  613. #endif
  614. #endif
  615. #ifndef KNOWN_BOARD
  616. #error Unknown MOTHERBOARD value in configuration.h
  617. #endif
  618. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  619. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN
  620. #if EXTRUDERS == 3
  621. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN
  622. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN
  623. #elif EXTRUDERS == 2
  624. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN
  625. #define _E2_PINS -1
  626. #elif EXTRUDERS == 1
  627. #define _E1_PINS -1
  628. #define _E2_PINS -1
  629. #else
  630. #error Unsupported number of extruders
  631. #endif
  632. #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, \
  633. HEATER_0_PIN, HEATER_1_PIN, HEATER_2_PIN, \
  634. HEATER_BED_PIN, FAN_PIN, \
  635. _E0_PINS, _E1_PINS, _E2_PINS, \
  636. TEMP_0_PIN, TEMP_1_PIN, TEMP_2_PIN, TEMP_BED_PIN }
  637. #endif