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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128
  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. * Gen7 v1.1, v1.2, v1.3, v1.4 pin assignment
  40. *
  41. ****************************************************************************************/
  42. #if MOTHERBOARD == 13
  43. #define MOTHERBOARD 11
  44. #define GEN7_VERSION 14 // v1.4
  45. #endif
  46. #if MOTHERBOARD == 12
  47. #define MOTHERBOARD 11
  48. #define GEN7_VERSION 13 // v1.3
  49. #endif
  50. #if MOTHERBOARD == 11
  51. #define KNOWN_BOARD
  52. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  53. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  54. #endif
  55. #ifndef GEN7_VERSION
  56. #define GEN7_VERSION 12 // v1.x
  57. #endif
  58. //x axis pins
  59. #define X_STEP_PIN 19
  60. #define X_DIR_PIN 18
  61. #define X_ENABLE_PIN 24
  62. #define X_MIN_PIN 7
  63. #define X_MAX_PIN -1
  64. //y axis pins
  65. #define Y_STEP_PIN 23
  66. #define Y_DIR_PIN 22
  67. #define Y_ENABLE_PIN 24
  68. #define Y_MIN_PIN 5
  69. #define Y_MAX_PIN -1
  70. //z axis pins
  71. #define Z_STEP_PIN 26
  72. #define Z_DIR_PIN 25
  73. #define Z_ENABLE_PIN 24
  74. #define Z_MIN_PIN 1
  75. #define Z_MAX_PIN 0
  76. //extruder pins
  77. #define E0_STEP_PIN 28
  78. #define E0_DIR_PIN 27
  79. #define E0_ENABLE_PIN 24
  80. #define TEMP_0_PIN 1
  81. #define TEMP_1_PIN -1
  82. #define TEMP_2_PIN -1
  83. #define TEMP_BED_PIN 2
  84. #define HEATER_0_PIN 4
  85. #define HEATER_1_PIN -1
  86. #define HEATER_2_PIN -1
  87. #define HEATER_BED_PIN 3
  88. #define SDPOWER -1
  89. #define SDSS -1 // SCL pin of I2C header
  90. #define LED_PIN -1
  91. #if (GEN7_VERSION >= 13)
  92. // Gen7 v1.3 removed the fan pin
  93. #define FAN_PIN -1
  94. #else
  95. #define FAN_PIN 31
  96. #endif
  97. #define PS_ON_PIN 15
  98. #if (GEN7_VERSION < 14)
  99. // Gen 1.3 and earlier supplied thermistor power via PS_ON
  100. // Need to ignore the bad thermistor readings on those units
  101. #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  102. #endif
  103. //our pin for debugging.
  104. #define DEBUG_PIN 0
  105. //our RS485 pins
  106. #define TX_ENABLE_PIN 12
  107. #define RX_ENABLE_PIN 13
  108. #endif
  109. /*******************************************************************************
  110. *********
  111. * Gen7 Alfons3 pin assignment
  112. *
  113. ********************************************************************************
  114. ********/
  115. /* These Pins are assigned for the modified GEN7 Board from Alfons3 Please review the pins and adjust it for your needs*/
  116. #if MOTHERBOARD == 10
  117. #define KNOWN_BOARD
  118. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  119. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  120. #endif
  121. //x axis pins
  122. #define X_STEP_PIN 21 //different from stanard GEN7
  123. #define X_DIR_PIN 20 //different from stanard GEN7
  124. #define X_ENABLE_PIN 24
  125. #define X_MIN_PIN 0
  126. #define X_MAX_PIN -1
  127. //y axis pins
  128. #define Y_STEP_PIN 23
  129. #define Y_DIR_PIN 22
  130. #define Y_ENABLE_PIN 24
  131. #define Y_MIN_PIN 1
  132. #define Y_MAX_PIN -1
  133. //z axis pins
  134. #define Z_STEP_PIN 26
  135. #define Z_DIR_PIN 25
  136. #define Z_ENABLE_PIN 24
  137. #define Z_MIN_PIN 2
  138. #define Z_MAX_PIN -1
  139. //extruder pins
  140. #define E0_STEP_PIN 28
  141. #define E0_DIR_PIN 27
  142. #define E0_ENABLE_PIN 24
  143. #define TEMP_0_PIN 2
  144. #define TEMP_1_PIN -1
  145. #define TEMP_2_PIN -1
  146. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  147. #define HEATER_0_PIN 4
  148. #define HEATER_1_PIN -1
  149. #define HEATER_2_PIN -1
  150. #define HEATER_BED_PIN 3 // (bed)
  151. #define SDPOWER -1
  152. #define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support
  153. #define LED_PIN -1
  154. #define FAN_PIN -1
  155. #define PS_ON_PIN 19
  156. //our pin for debugging.
  157. #define DEBUG_PIN -1
  158. //our RS485 pins
  159. //#define TX_ENABLE_PIN 12
  160. //#define RX_ENABLE_PIN 13
  161. #define BEEPER -1
  162. #define SDCARDDETECT -1
  163. #define SUICIDE_PIN -1 //has to be defined; otherwise Power_off doesn't work
  164. //Pins for 4bit LCD Support
  165. #define LCD_PINS_RS 18
  166. #define LCD_PINS_ENABLE 17
  167. #define LCD_PINS_D4 16
  168. #define LCD_PINS_D5 15
  169. #define LCD_PINS_D6 13
  170. #define LCD_PINS_D7 14
  171. //buttons are directly attached
  172. #define BTN_EN1 11
  173. #define BTN_EN2 10
  174. #define BTN_ENC 12 //the click
  175. #define BLEN_C 2
  176. #define BLEN_B 1
  177. #define BLEN_A 0
  178. #define encrot0 0
  179. #define encrot1 2
  180. #define encrot2 3
  181. #define encrot3 1
  182. #endif
  183. /****************************************************************************************
  184. * Arduino Mega pin assignment
  185. *
  186. ****************************************************************************************/
  187. #if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34
  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. #if MOTHERBOARD == 33 || MOTHERBOARD == 34
  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
  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. #if MOTHERBOARD == 33
  224. #define FAN_PIN 9 // (Sprinter config)
  225. #else
  226. #define FAN_PIN 4 // IO pin. Buffer needed
  227. #endif
  228. #define PS_ON_PIN 12
  229. #define KILL_PIN -1
  230. #define HEATER_0_PIN 10 // EXTRUDER 1
  231. #if MOTHERBOARD == 33
  232. #define HEATER_1_PIN -1
  233. #else
  234. #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
  235. #endif
  236. #define HEATER_2_PIN -1
  237. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  238. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  239. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  240. #define HEATER_BED_PIN 8 // BED
  241. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  242. #ifdef ULTRA_LCD
  243. #ifdef NEWPANEL
  244. //arduino pin which triggers an piezzo beeper
  245. #define BEEPER 33 // Beeper on AUX-4
  246. #define LCD_PINS_RS 16
  247. #define LCD_PINS_ENABLE 17
  248. #define LCD_PINS_D4 23
  249. #define LCD_PINS_D5 25
  250. #define LCD_PINS_D6 27
  251. #define LCD_PINS_D7 29
  252. //buttons are directly attached using AUX-2
  253. #define BTN_EN1 37
  254. #define BTN_EN2 35
  255. #define BTN_ENC 31 //the click
  256. #define BLEN_C 2
  257. #define BLEN_B 1
  258. #define BLEN_A 0
  259. #define SDCARDDETECT -1 // Ramps does not use this port
  260. //encoder rotation values
  261. #define encrot0 0
  262. #define encrot1 2
  263. #define encrot2 3
  264. #define encrot3 1
  265. #else //old style panel with shift register
  266. //arduino pin witch triggers an piezzo beeper
  267. #define BEEPER 33 No Beeper added
  268. //buttons are attached to a shift register
  269. // Not wired this yet
  270. //#define SHIFT_CLK 38
  271. //#define SHIFT_LD 42
  272. //#define SHIFT_OUT 40
  273. //#define SHIFT_EN 17
  274. #define LCD_PINS_RS 16
  275. #define LCD_PINS_ENABLE 17
  276. #define LCD_PINS_D4 23
  277. #define LCD_PINS_D5 25
  278. #define LCD_PINS_D6 27
  279. #define LCD_PINS_D7 29
  280. //encoder rotation values
  281. #define encrot0 0
  282. #define encrot1 2
  283. #define encrot2 3
  284. #define encrot3 1
  285. //bits in the shift register that carry the buttons for:
  286. // left up center down right red
  287. #define BL_LE 7
  288. #define BL_UP 6
  289. #define BL_MI 5
  290. #define BL_DW 4
  291. #define BL_RI 3
  292. #define BL_ST 2
  293. #define BLEN_B 1
  294. #define BLEN_A 0
  295. #endif
  296. #endif //ULTRA_LCD
  297. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default
  298. #define X_STEP_PIN 26
  299. #define X_DIR_PIN 28
  300. #define X_ENABLE_PIN 24
  301. #define X_MIN_PIN 3
  302. #define X_MAX_PIN -1 //2
  303. #define Y_STEP_PIN 38
  304. #define Y_DIR_PIN 40
  305. #define Y_ENABLE_PIN 36
  306. #define Y_MIN_PIN 16
  307. #define Y_MAX_PIN -1 //17
  308. #define Z_STEP_PIN 44
  309. #define Z_DIR_PIN 46
  310. #define Z_ENABLE_PIN 42
  311. #define Z_MIN_PIN 18
  312. #define Z_MAX_PIN -1 //19
  313. #define E0_STEP_PIN 32
  314. #define E0_DIR_PIN 34
  315. #define E0_ENABLE_PIN 30
  316. #define SDPOWER 48
  317. #define SDSS 53
  318. #define LED_PIN 13
  319. #define PS_ON_PIN -1
  320. #define KILL_PIN -1
  321. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  322. #define HEATER_0_PIN 12 // RAMPS 1.0
  323. #define HEATER_BED_PIN -1 // RAMPS 1.0
  324. #define FAN_PIN 11 // RAMPS 1.0
  325. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  326. #define HEATER_0_PIN 10 // RAMPS 1.1
  327. #define HEATER_BED_PIN 8 // RAMPS 1.1
  328. #define FAN_PIN 9 // RAMPS 1.1
  329. #endif
  330. #define HEATER_1_PIN -1
  331. #define HEATER_2_PIN -1
  332. #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  333. #define TEMP_1_PIN -1
  334. #define TEMP_2_PIN -1
  335. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  336. #endif
  337. // SPI for Max6675 Thermocouple
  338. #ifndef SDSUPPORT
  339. // these pins are defined in the SD library if building with SD support
  340. #define MAX_SCK_PIN 52
  341. #define MAX_MISO_PIN 50
  342. #define MAX_MOSI_PIN 51
  343. #define MAX6675_SS 53
  344. #else
  345. #define MAX6675_SS 49
  346. #endif
  347. #endif
  348. /****************************************************************************************
  349. * Duemilanove w/ ATMega328P pin assignment
  350. *
  351. ****************************************************************************************/
  352. #if MOTHERBOARD == 4
  353. #define KNOWN_BOARD 1
  354. #ifndef __AVR_ATmega328P__
  355. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  356. #endif
  357. #define X_STEP_PIN 19
  358. #define X_DIR_PIN 18
  359. #define X_ENABLE_PIN -1
  360. #define X_MIN_PIN 17
  361. #define X_MAX_PIN -1
  362. #define Y_STEP_PIN 10
  363. #define Y_DIR_PIN 7
  364. #define Y_ENABLE_PIN -1
  365. #define Y_MIN_PIN 8
  366. #define Y_MAX_PIN -1
  367. #define Z_STEP_PIN 13
  368. #define Z_DIR_PIN 3
  369. #define Z_ENABLE_PIN 2
  370. #define Z_MIN_PIN 4
  371. #define Z_MAX_PIN -1
  372. #define E0_STEP_PIN 11
  373. #define E0_DIR_PIN 12
  374. #define E0_ENABLE_PIN -1
  375. #define SDPOWER -1
  376. #define SDSS -1
  377. #define LED_PIN -1
  378. #define FAN_PIN 5
  379. #define PS_ON_PIN -1
  380. #define KILL_PIN -1
  381. #define HEATER_0_PIN 6
  382. #define HEATER_1_PIN -1
  383. #define HEATER_2_PIN -1
  384. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  385. #define TEMP_1_PIN -1
  386. #define TEMP_2_PIN -1
  387. #define HEATER_BED_PIN -1
  388. #define TEMP_BED_PIN -1
  389. #endif
  390. /****************************************************************************************
  391. * Gen6 pin assignment
  392. *
  393. ****************************************************************************************/
  394. #if MOTHERBOARD == 5 || MOTHERBOARD == 51
  395. #define KNOWN_BOARD 1
  396. #ifndef __AVR_ATmega644P__
  397. #ifndef __AVR_ATmega1284P__
  398. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  399. #endif
  400. #endif
  401. //x axis pins
  402. #define X_STEP_PIN 15
  403. #define X_DIR_PIN 18
  404. #define X_ENABLE_PIN 19
  405. #define X_MIN_PIN 20
  406. #define X_MAX_PIN -1
  407. //y axis pins
  408. #define Y_STEP_PIN 23
  409. #define Y_DIR_PIN 22
  410. #define Y_ENABLE_PIN 24
  411. #define Y_MIN_PIN 25
  412. #define Y_MAX_PIN -1
  413. //z axis pins
  414. #define Z_STEP_PIN 27
  415. #define Z_DIR_PIN 28
  416. #define Z_ENABLE_PIN 29
  417. #define Z_MIN_PIN 30
  418. #define Z_MAX_PIN -1
  419. //extruder pins
  420. #define E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  421. #define E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  422. #define E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  423. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  424. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  425. #define TEMP_2_PIN -1 //changed @ rkoeppl 20110410
  426. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  427. #define HEATER_1_PIN -1
  428. #define HEATER_2_PIN -1
  429. #if MOTHERBOARD == 5
  430. #define HEATER_BED_PIN -1 //changed @ rkoeppl 20110410
  431. #define TEMP_BED_PIN -1 //changed @ rkoeppl 20110410
  432. #else
  433. #define HEATER_BED_PIN 1 //changed @ rkoeppl 20110410
  434. #define TEMP_BED_PIN 0 //changed @ rkoeppl 20110410
  435. #endif
  436. #define SDPOWER -1
  437. #define SDSS 17
  438. #define LED_PIN -1 //changed @ rkoeppl 20110410
  439. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  440. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  441. //our pin for debugging.
  442. #define DEBUG_PIN 0
  443. //our RS485 pins
  444. #define TX_ENABLE_PIN 12
  445. #define RX_ENABLE_PIN 13
  446. #endif
  447. /****************************************************************************************
  448. * Sanguinololu pin assignment
  449. *
  450. ****************************************************************************************/
  451. #if MOTHERBOARD == 62
  452. #undef MOTHERBOARD
  453. #define MOTHERBOARD 6
  454. #define SANGUINOLOLU_V_1_2
  455. #endif
  456. #if MOTHERBOARD == 6
  457. #define KNOWN_BOARD 1
  458. #ifndef __AVR_ATmega644P__
  459. #ifndef __AVR_ATmega1284P__
  460. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  461. #endif
  462. #endif
  463. #define X_STEP_PIN 15
  464. #define X_DIR_PIN 21
  465. #define X_MIN_PIN 18
  466. #define X_MAX_PIN -1
  467. #define Y_STEP_PIN 22
  468. #define Y_DIR_PIN 23
  469. #define Y_MIN_PIN 19
  470. #define Y_MAX_PIN -1
  471. #define Z_STEP_PIN 3
  472. #define Z_DIR_PIN 2
  473. #define Z_MIN_PIN 20
  474. #define Z_MAX_PIN -1
  475. #define E0_STEP_PIN 1
  476. #define E0_DIR_PIN 0
  477. #define LED_PIN -1
  478. #define FAN_PIN -1
  479. #define PS_ON_PIN -1
  480. #define KILL_PIN -1
  481. #define HEATER_0_PIN 13 // (extruder)
  482. #define HEATER_1_PIN -1
  483. #define HEATER_2_PIN -1
  484. #ifdef SANGUINOLOLU_V_1_2
  485. #define HEATER_BED_PIN 12 // (bed)
  486. #define X_ENABLE_PIN 14
  487. #define Y_ENABLE_PIN 14
  488. #define Z_ENABLE_PIN 26
  489. #define E0_ENABLE_PIN 14
  490. #else
  491. #define HEATER_BED_PIN 14 // (bed)
  492. #define X_ENABLE_PIN -1
  493. #define Y_ENABLE_PIN -1
  494. #define Z_ENABLE_PIN -1
  495. #define E0_ENABLE_PIN -1
  496. #endif
  497. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  498. #define TEMP_1_PIN -1
  499. #define TEMP_2_PIN -1
  500. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  501. #define SDPOWER -1
  502. #define SDSS 31
  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 HEATER_1_PIN 3
  534. #define TEMP_1_PIN 9
  535. #define HEATER_2_PIN -1
  536. #define TEMP_2_PIN -1
  537. #define E0_STEP_PIN 43
  538. #define E0_DIR_PIN 45
  539. #define E0_ENABLE_PIN 41
  540. #define E1_STEP_PIN 49
  541. #define E1_DIR_PIN 47
  542. #define E1_ENABLE_PIN 51
  543. #define SDPOWER -1
  544. #define SDSS 53
  545. #define LED_PIN 13
  546. #define FAN_PIN 7
  547. #define PS_ON_PIN 12
  548. #define KILL_PIN -1
  549. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  550. #ifdef ULTRA_LCD
  551. #ifdef NEWPANEL
  552. //arduino pin witch triggers an piezzo beeper
  553. #define BEEPER 18
  554. #define LCD_PINS_RS 20
  555. #define LCD_PINS_ENABLE 17
  556. #define LCD_PINS_D4 16
  557. #define LCD_PINS_D5 21
  558. #define LCD_PINS_D6 5
  559. #define LCD_PINS_D7 6
  560. //buttons are directly attached
  561. #define BTN_EN1 40
  562. #define BTN_EN2 42
  563. #define BTN_ENC 19 //the click
  564. #define BLEN_C 2
  565. #define BLEN_B 1
  566. #define BLEN_A 0
  567. #define SDCARDDETECT 38
  568. //encoder rotation values
  569. #define encrot0 0
  570. #define encrot1 2
  571. #define encrot2 3
  572. #define encrot3 1
  573. #else //old style panel with shift register
  574. //arduino pin witch triggers an piezzo beeper
  575. #define BEEPER 18
  576. //buttons are attached to a shift register
  577. #define SHIFT_CLK 38
  578. #define SHIFT_LD 42
  579. #define SHIFT_OUT 40
  580. #define SHIFT_EN 17
  581. #define LCD_PINS_RS 16
  582. #define LCD_PINS_ENABLE 5
  583. #define LCD_PINS_D4 6
  584. #define LCD_PINS_D5 21
  585. #define LCD_PINS_D6 20
  586. #define LCD_PINS_D7 19
  587. //encoder rotation values
  588. #ifndef ULTIMAKERCONTROLLER
  589. #define encrot0 0
  590. #define encrot1 2
  591. #define encrot2 3
  592. #define encrot3 1
  593. #else
  594. #define encrot0 0
  595. #define encrot1 1
  596. #define encrot2 3
  597. #define encrot3 2
  598. #endif
  599. #define SDCARDDETECT -1
  600. //bits in the shift register that carry the buttons for:
  601. // left up center down right red
  602. #define BL_LE 7
  603. #define BL_UP 6
  604. #define BL_MI 5
  605. #define BL_DW 4
  606. #define BL_RI 3
  607. #define BL_ST 2
  608. #define BLEN_B 1
  609. #define BLEN_A 0
  610. #endif
  611. #endif //ULTRA_LCD
  612. #endif
  613. #if MOTHERBOARD == 71
  614. #define KNOWN_BOARD
  615. /*****************************************************************
  616. * Ultimaker pin assignment (Old electronics)
  617. ******************************************************************/
  618. #ifndef __AVR_ATmega1280__
  619. #ifndef __AVR_ATmega2560__
  620. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  621. #endif
  622. #endif
  623. #define X_STEP_PIN 25
  624. #define X_DIR_PIN 23
  625. #define X_MIN_PIN 15
  626. #define X_MAX_PIN 14
  627. #define X_ENABLE_PIN 27
  628. #define Y_STEP_PIN 31
  629. #define Y_DIR_PIN 33
  630. #define Y_MIN_PIN 17
  631. #define Y_MAX_PIN 16
  632. #define Y_ENABLE_PIN 29
  633. #define Z_STEP_PIN 37
  634. #define Z_DIR_PIN 39
  635. #define Z_MIN_PIN 19
  636. #define Z_MAX_PIN 18
  637. #define Z_ENABLE_PIN 35
  638. #define HEATER_BED_PIN -1
  639. #define TEMP_BED_PIN -1
  640. #define HEATER_0_PIN 2
  641. #define TEMP_0_PIN 8
  642. #define HEATER_1_PIN 1
  643. #define TEMP_1_PIN 1
  644. #define HEATER_2_PIN -1
  645. #define TEMP_2_PIN -1
  646. #define E0_STEP_PIN 43
  647. #define E0_DIR_PIN 45
  648. #define E0_ENABLE_PIN 41
  649. #define E1_STEP_PIN -1
  650. #define E1_DIR_PIN -1
  651. #define E1_ENABLE_PIN -1
  652. #define SDPOWER -1
  653. #define SDSS -1
  654. #define LED_PIN -1
  655. #define FAN_PIN -1
  656. #define PS_ON_PIN -1
  657. #define KILL_PIN -1
  658. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  659. #define LCD_PINS_RS 24
  660. #define LCD_PINS_ENABLE 22
  661. #define LCD_PINS_D4 36
  662. #define LCD_PINS_D5 34
  663. #define LCD_PINS_D6 32
  664. #define LCD_PINS_D7 30
  665. #endif
  666. /****************************************************************************************
  667. * Teensylu 0.7 pin assingments (ATMEGA90USB)
  668. * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
  669. ****************************************************************************************/
  670. #if MOTHERBOARD == 8
  671. #define MOTHERBOARD 8
  672. #define KNOWN_BOARD 1
  673. #define X_STEP_PIN 0
  674. #define X_DIR_PIN 1
  675. #define X_ENABLE_PIN 39
  676. #define X_MIN_PIN 13
  677. #define X_MAX_PIN -1
  678. #define Y_STEP_PIN 2
  679. #define Y_DIR_PIN 3
  680. #define Y_ENABLE_PIN 38
  681. #define Y_MIN_PIN 14
  682. #define Y_MAX_PIN -1
  683. #define Z_STEP_PIN 4
  684. #define Z_DIR_PIN 5
  685. #define Z_ENABLE_PIN 23
  686. #define Z_MIN_PIN 15
  687. #define Z_MAX_PIN -1
  688. #define E0_STEP_PIN 6
  689. #define E0_DIR_PIN 7
  690. #define E0_ENABLE_PIN 19
  691. #define HEATER_0_PIN 21 // Extruder
  692. #define HEATER_1_PIN -1
  693. #define HEATER_2_PIN -1
  694. #define HEATER_BED_PIN 20 // Bed
  695. #define FAN_PIN 22 // Fan
  696. #define TEMP_0_PIN 7 // Extruder
  697. #define TEMP_1_PIN -1
  698. #define TEMP_2_PIN -1
  699. #define TEMP_BED_PIN 6 // Bed
  700. #define SDPOWER -1
  701. #define SDSS 8
  702. #define LED_PIN -1
  703. #define PS_ON_PIN -1
  704. #define KILL_PIN -1
  705. #define ALARM_PIN -1
  706. #ifndef SDSUPPORT
  707. // these pins are defined in the SD library if building with SD support
  708. #define SCK_PIN 9
  709. #define MISO_PIN 11
  710. #define MOSI_PIN 10
  711. #endif
  712. #endif
  713. /****************************************************************************************
  714. * Gen3+ pin assignment
  715. *
  716. ****************************************************************************************/
  717. #if MOTHERBOARD == 9
  718. #define MOTHERBOARD 6
  719. #define KNOWN_BOARD 1
  720. #ifndef __AVR_ATmega644P__
  721. #ifndef __AVR_ATmega1284P__
  722. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  723. #endif
  724. #endif
  725. #define X_STEP_PIN 15
  726. #define X_DIR_PIN 18
  727. #define X_MIN_PIN 20
  728. #define X_MAX_PIN -1
  729. #define Y_STEP_PIN 23
  730. #define Y_DIR_PIN 22
  731. #define Y_MIN_PIN 25
  732. #define Y_MAX_PIN -1
  733. #define Z_STEP_PIN 27
  734. #define Z_DIR_PIN 28
  735. #define Z_MIN_PIN 30
  736. #define Z_MAX_PIN -1
  737. #define E_STEP_PIN 17
  738. #define E_DIR_PIN 21
  739. #define LED_PIN -1
  740. #define FAN_PIN -1
  741. #define PS_ON_PIN 14
  742. #define KILL_PIN -1
  743. #define HEATER_0_PIN 12 // (extruder)
  744. #define HEATER_1_PIN 16 // (bed)
  745. #define X_ENABLE_PIN 19
  746. #define Y_ENABLE_PIN 24
  747. #define Z_ENABLE_PIN 29
  748. #define E_ENABLE_PIN 13
  749. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  750. #define TEMP_1_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  751. #define TEMP_2_PIN -1
  752. #define SDPOWER -1
  753. #define SDSS 4
  754. #define HEATER_2_PIN -1
  755. #endif
  756. /****************************************************************************************
  757. * Open Motion controller with enable based extruders
  758. *
  759. * ATMega644
  760. *
  761. * +---\/---+
  762. * (D 0) PB0 1| |40 PA0 (AI 0 / D31)
  763. * (D 1) PB1 2| |39 PA1 (AI 1 / D30)
  764. * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
  765. * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
  766. * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
  767. * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
  768. * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
  769. * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
  770. * RST 9| |32 AREF
  771. * VCC 10| |31 GND
  772. * GND 11| |30 AVCC
  773. * XTAL2 12| |29 PC7 (D 23)
  774. * XTAL1 13| |28 PC6 (D 22)
  775. * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
  776. * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
  777. * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
  778. * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
  779. * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
  780. * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
  781. * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
  782. * +--------+
  783. *
  784. ****************************************************************************************/
  785. #if MOTHERBOARD == 90 //Alpha OMCA board
  786. #define KNOWN_BOARD 1
  787. #ifndef __AVR_ATmega644__
  788. #error Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu.
  789. #endif
  790. #define X_STEP_PIN 21
  791. #define X_DIR_PIN 20
  792. #define X_ENABLE_PIN 24
  793. #define X_MIN_PIN 0
  794. #define X_MAX_PIN -1
  795. #define Y_STEP_PIN 23
  796. #define Y_DIR_PIN 22
  797. #define Y_ENABLE_PIN 24
  798. #define Y_MIN_PIN 1
  799. #define Y_MAX_PIN -1
  800. #define Z_STEP_PIN 26
  801. #define Z_DIR_PIN 25
  802. #define Z_ENABLE_PIN 24
  803. #define Z_MIN_PIN 2
  804. #define Z_MAX_PIN -1
  805. #define E0_STEP_PIN 28
  806. #define E0_DIR_PIN 27
  807. #define E0_ENABLE_PIN 24
  808. #define E1_STEP_PIN -1 // 19
  809. #define E1_DIR_PIN -1 // 18
  810. #define E1_ENABLE_PIN 24
  811. #define E2_STEP_PIN -1 // 17
  812. #define E2_DIR_PIN -1 // 16
  813. #define E2_ENABLE_PIN 24
  814. #define SDPOWER -1
  815. #define SDSS 11
  816. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  817. #define LED_PIN -1
  818. #define FAN_PIN 3
  819. #define PS_ON_PIN -1
  820. #define KILL_PIN -1
  821. #define HEATER_0_PIN 4
  822. #define HEATER_1_PIN -1 // 12
  823. #define HEATER_2_PIN -1 // 13
  824. #define TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  825. #define TEMP_1_PIN -1 // 1
  826. #define TEMP_2_PIN -1 // 2
  827. #define HEATER_BED_PIN -1 // 14/15
  828. #define TEMP_BED_PIN -1 // 1,2 or I2C
  829. /* 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) */
  830. #endif
  831. #if MOTHERBOARD == 91 // Final OMCA board -- REF http://sanguino.cc/hardware
  832. #define KNOWN_BOARD 1
  833. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
  834. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)
  835. #endif
  836. #define X_STEP_PIN 26
  837. #define X_DIR_PIN 25
  838. #define X_ENABLE_PIN 10
  839. #define X_MIN_PIN 0
  840. #define X_MAX_PIN -1
  841. #define Y_STEP_PIN 28
  842. #define Y_DIR_PIN 27
  843. #define Y_ENABLE_PIN 10
  844. #define Y_MIN_PIN 1
  845. #define Y_MAX_PIN -1
  846. #define Z_STEP_PIN 23
  847. #define Z_DIR_PIN 22
  848. #define Z_ENABLE_PIN 10
  849. #define Z_MIN_PIN 2
  850. #define Z_MAX_PIN -1
  851. #define E0_STEP_PIN 24
  852. #define E0_DIR_PIN 21
  853. #define E0_ENABLE_PIN 10
  854. /* future proofing */
  855. #define __FS 20
  856. #define __FD 19
  857. #define __GS 18
  858. #define __GD 13
  859. #define UNUSED_PWM 14 /* PWM on LEFT connector */
  860. #define E1_STEP_PIN -1 // 21
  861. #define E1_DIR_PIN -1 // 20
  862. #define E1_ENABLE_PIN -1 // 19
  863. #define E2_STEP_PIN -1 // 21
  864. #define E2_DIR_PIN -1 // 20
  865. #define E2_ENABLE_PIN -1 // 18
  866. #define SDPOWER -1
  867. #define SDSS 11
  868. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  869. #define LED_PIN -1
  870. #define FAN_PIN 14 /* PWM on MIDDLE connector */
  871. #define PS_ON_PIN -1
  872. #define KILL_PIN -1
  873. #define HEATER_0_PIN 3 /*DONE PWM on RIGHT connector */
  874. #define HEATER_1_PIN -1
  875. #define HEATER_2_PIN -1
  876. #define HEATER_1_PIN -1
  877. #define HEATER_2_PIN -1
  878. #define TEMP_0_PIN 0 // ANALOG INPUT NUMBERING
  879. #define TEMP_1_PIN 1 // ANALOG
  880. #define TEMP_2_PIN -1 // 2
  881. #define HEATER_BED_PIN 4
  882. #define TEMP_BED_PIN 2 // 1,2 or I2C
  883. #define I2C_SCL 16
  884. #define I2C_SDA 17
  885. #endif
  886. #ifndef KNOWN_BOARD
  887. #error Unknown MOTHERBOARD value in configuration.h
  888. #endif
  889. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  890. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,
  891. #if EXTRUDERS > 1
  892. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
  893. #else
  894. #define _E1_PINS
  895. #endif
  896. #if EXTRUDERS > 2
  897. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,
  898. #else
  899. #define _E2_PINS
  900. #endif
  901. #ifdef DISABLE_MAX_ENDSTOPS
  902. #define X_MAX_PIN -1
  903. #define Y_MAX_PIN -1
  904. #define Z_MAX_PIN -1
  905. #endif
  906. #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, \
  907. HEATER_BED_PIN, FAN_PIN, \
  908. _E0_PINS _E1_PINS _E2_PINS \
  909. TEMP_0_PIN, TEMP_1_PIN, TEMP_2_PIN, TEMP_BED_PIN }
  910. #endif