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

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