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

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