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

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