My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pins.h 24KB

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