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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604
  1. #ifndef PINS_H
  2. #define PINS_H
  3. #define X_MS1_PIN -1
  4. #define X_MS2_PIN -1
  5. #define Y_MS1_PIN -1
  6. #define Y_MS2_PIN -1
  7. #define Z_MS1_PIN -1
  8. #define Z_MS2_PIN -1
  9. #define E0_MS1_PIN -1
  10. #define E0_MS2_PIN -1
  11. #define E1_MS1_PIN -1
  12. #define E1_MS2_PIN -1
  13. #define DIGIPOTSS_PIN -1
  14. #if MOTHERBOARD == 99
  15. #define KNOWN_BOARD 1
  16. #define X_STEP_PIN 2
  17. #define X_DIR_PIN 3
  18. #define X_ENABLE_PIN -1
  19. #define X_STOP_PIN 16
  20. #define Y_STEP_PIN 5
  21. #define Y_DIR_PIN 6
  22. #define Y_ENABLE_PIN -1
  23. #define Y_STOP_PIN 67
  24. #define Z_STEP_PIN 62
  25. #define Z_DIR_PIN 63
  26. #define Z_ENABLE_PIN -1
  27. #define Z_STOP_PIN 59
  28. #define E0_STEP_PIN 65
  29. #define E0_DIR_PIN 66
  30. #define E0_ENABLE_PIN -1
  31. #define SDPOWER -1
  32. #define SDSS 53
  33. #define LED_PIN -1
  34. #define FAN_PIN -1
  35. #define PS_ON_PIN 9
  36. #define KILL_PIN -1
  37. #define HEATER_0_PIN 13
  38. #define HEATER_1_PIN -1
  39. #define HEATER_2_PIN -1
  40. #define TEMP_0_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  41. #define TEMP_1_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  42. #define TEMP_2_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  43. #define HEATER_BED_PIN 4
  44. #define TEMP_BED_PIN 10
  45. #endif /* 99 */
  46. /****************************************************************************************
  47. * Gen7 v1.1, v1.2, v1.3 pin assignment
  48. *
  49. ****************************************************************************************/
  50. #if MOTHERBOARD == 12
  51. #define MOTHERBOARD 11
  52. #define GEN7_VERSION 13 // v1.3
  53. #endif
  54. #if MOTHERBOARD == 11
  55. #define KNOWN_BOARD
  56. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  57. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  58. #endif
  59. #ifndef GEN7_VERSION
  60. #define GEN7_VERSION 12 // v1.x
  61. #endif
  62. //x axis pins
  63. #define X_STEP_PIN 19
  64. #define X_DIR_PIN 18
  65. #define X_ENABLE_PIN 24
  66. #define X_STOP_PIN 7
  67. //y axis pins
  68. #define Y_STEP_PIN 23
  69. #define Y_DIR_PIN 22
  70. #define Y_ENABLE_PIN 24
  71. #define Y_STOP_PIN 5
  72. //z axis pins
  73. #define Z_STEP_PIN 26
  74. #define Z_DIR_PIN 25
  75. #define Z_ENABLE_PIN 24
  76. #define Z_MIN_PIN 1
  77. #define Z_MAX_PIN 0
  78. //extruder pins
  79. #define E0_STEP_PIN 28
  80. #define E0_DIR_PIN 27
  81. #define E0_ENABLE_PIN 24
  82. #define TEMP_0_PIN 1
  83. #define TEMP_1_PIN -1
  84. #define TEMP_2_PIN -1
  85. #define TEMP_BED_PIN 2
  86. #define HEATER_0_PIN 4
  87. #define HEATER_1_PIN -1
  88. #define HEATER_2_PIN -1
  89. #define HEATER_BED_PIN 3
  90. #define KILL_PIN -1
  91. #define SDPOWER -1
  92. #define SDSS -1 // SCL pin of I2C header
  93. #define LED_PIN -1
  94. #if (GEN7_VERSION >= 13)
  95. // Gen7 v1.3 removed the fan pin
  96. #define FAN_PIN -1
  97. #else
  98. #define FAN_PIN 31
  99. #endif
  100. #define PS_ON_PIN 15
  101. //All these generations of Gen7 supply thermistor power
  102. //via PS_ON, so ignore bad thermistor readings
  103. #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  104. //our pin for debugging.
  105. #define DEBUG_PIN 0
  106. //our RS485 pins
  107. #define TX_ENABLE_PIN 12
  108. #define RX_ENABLE_PIN 13
  109. #endif
  110. /****************************************************************************************
  111. * Gen7 v1.4 pin assignment
  112. *
  113. ****************************************************************************************/
  114. #if MOTHERBOARD == 13
  115. #define GEN7_VERSION 14 // v1.4
  116. #endif
  117. #if MOTHERBOARD == 13
  118. #define KNOWN_BOARD
  119. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  120. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  121. #endif
  122. #ifndef GEN7_VERSION
  123. #define GEN7_VERSION 14 // v1.x
  124. #endif
  125. //x axis pins
  126. #define X_STEP_PIN 29
  127. #define X_DIR_PIN 28
  128. #define X_ENABLE_PIN 25
  129. #define X_STOP_PIN 0
  130. //y axis pins
  131. #define Y_STEP_PIN 27
  132. #define Y_DIR_PIN 26
  133. #define Y_ENABLE_PIN 25
  134. #define Y_STOP_PIN 1
  135. //z axis pins
  136. #define Z_STEP_PIN 23
  137. #define Z_DIR_PIN 22
  138. #define Z_ENABLE_PIN 25
  139. #define Z_STOP_PIN 2
  140. //extruder pins
  141. #define E0_STEP_PIN 19
  142. #define E0_DIR_PIN 18
  143. #define E0_ENABLE_PIN 25
  144. #define TEMP_0_PIN 1
  145. #define TEMP_1_PIN -1
  146. #define TEMP_2_PIN -1
  147. #define TEMP_BED_PIN 0
  148. #define HEATER_0_PIN 4
  149. #define HEATER_1_PIN -1
  150. #define HEATER_2_PIN -1
  151. #define HEATER_BED_PIN 3
  152. #define KILL_PIN -1
  153. #define SDPOWER -1
  154. #define SDSS -1 // SCL pin of I2C header
  155. #define LED_PIN -1
  156. #define FAN_PIN -1
  157. #define PS_ON_PIN 15
  158. //our pin for debugging.
  159. #define DEBUG_PIN 0
  160. //our RS485 pins
  161. #define TX_ENABLE_PIN 12
  162. #define RX_ENABLE_PIN 13
  163. #endif
  164. /*******************************************************************************
  165. *********
  166. * Gen7 Alfons3 pin assignment
  167. *
  168. ********************************************************************************
  169. ********/
  170. /* These Pins are assigned for the modified GEN7 Board from Alfons3 Please review the pins and adjust it for your needs*/
  171. #if MOTHERBOARD == 10
  172. #define KNOWN_BOARD
  173. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  174. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  175. #endif
  176. //x axis pins
  177. #define X_STEP_PIN 21 //different from stanard GEN7
  178. #define X_DIR_PIN 20 //different from stanard GEN7
  179. #define X_ENABLE_PIN 24
  180. #define X_STOP_PIN 0
  181. //y axis pins
  182. #define Y_STEP_PIN 23
  183. #define Y_DIR_PIN 22
  184. #define Y_ENABLE_PIN 24
  185. #define Y_STOP_PIN 1
  186. //z axis pins
  187. #define Z_STEP_PIN 26
  188. #define Z_DIR_PIN 25
  189. #define Z_ENABLE_PIN 24
  190. #define Z_STOP_PIN 2
  191. //extruder pins
  192. #define E0_STEP_PIN 28
  193. #define E0_DIR_PIN 27
  194. #define E0_ENABLE_PIN 24
  195. #define TEMP_0_PIN 2
  196. #define TEMP_1_PIN -1
  197. #define TEMP_2_PIN -1
  198. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  199. #define HEATER_0_PIN 4
  200. #define HEATER_1_PIN -1
  201. #define HEATER_2_PIN -1
  202. #define HEATER_BED_PIN 3 // (bed)
  203. #define SDPOWER -1
  204. #define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support
  205. #define LED_PIN -1
  206. #define FAN_PIN -1
  207. #define PS_ON_PIN 19
  208. //our pin for debugging.
  209. #define DEBUG_PIN -1
  210. //our RS485 pins
  211. //#define TX_ENABLE_PIN 12
  212. //#define RX_ENABLE_PIN 13
  213. #define BEEPER -1
  214. #define SDCARDDETECT -1
  215. #define SUICIDE_PIN -1 //has to be defined; otherwise Power_off doesn't work
  216. #define KILL_PIN -1
  217. //Pins for 4bit LCD Support
  218. #define LCD_PINS_RS 18
  219. #define LCD_PINS_ENABLE 17
  220. #define LCD_PINS_D4 16
  221. #define LCD_PINS_D5 15
  222. #define LCD_PINS_D6 13
  223. #define LCD_PINS_D7 14
  224. //buttons are directly attached
  225. #define BTN_EN1 11
  226. #define BTN_EN2 10
  227. #define BTN_ENC 12 //the click
  228. #endif
  229. /****************************************************************************************
  230. * Arduino Mega pin assignment
  231. *
  232. ****************************************************************************************/
  233. #if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34
  234. #define KNOWN_BOARD 1
  235. //////////////////FIX THIS//////////////
  236. #ifndef __AVR_ATmega1280__
  237. #ifndef __AVR_ATmega2560__
  238. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  239. #endif
  240. #endif
  241. // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
  242. // #define RAMPS_V_1_3
  243. // #define RAMPS_V_1_0
  244. #if MOTHERBOARD == 33 || MOTHERBOARD == 34
  245. #define LARGE_FLASH true
  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
  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
  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. #if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
  280. #define KILL_PIN 41
  281. #else
  282. #define KILL_PIN -1
  283. #endif
  284. #define HEATER_0_PIN 10 // EXTRUDER 1
  285. #if MOTHERBOARD == 33
  286. #define HEATER_1_PIN -1
  287. #else
  288. #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
  289. #endif
  290. #define HEATER_2_PIN -1
  291. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  292. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  293. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  294. #define HEATER_BED_PIN 8 // BED
  295. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  296. #define SERVO0_PIN 11
  297. #define SERVO1_PIN 6
  298. #define SERVO2_PIN 5
  299. #define SERVO3_PIN 4
  300. #ifdef ULTRA_LCD
  301. #ifdef NEWPANEL
  302. #define LCD_PINS_RS 16
  303. #define LCD_PINS_ENABLE 17
  304. #define LCD_PINS_D4 23
  305. #define LCD_PINS_D5 25
  306. #define LCD_PINS_D6 27
  307. #define LCD_PINS_D7 29
  308. #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
  309. #define BEEPER 37
  310. #define BTN_EN1 31
  311. #define BTN_EN2 33
  312. #define BTN_ENC 35
  313. #define SDCARDDETECT 49
  314. #else
  315. //arduino pin which triggers an piezzo beeper
  316. #define BEEPER 33 // Beeper on AUX-4
  317. //buttons are directly attached using AUX-2
  318. #ifdef REPRAPWORLD_KEYPAD
  319. #define BTN_EN1 64 // encoder
  320. #define BTN_EN2 59 // encoder
  321. #define BTN_ENC 63 // enter button
  322. #define SHIFT_OUT 40 // shift register
  323. #define SHIFT_CLK 44 // shift register
  324. #define SHIFT_LD 42 // shift register
  325. #else
  326. #define BTN_EN1 37
  327. #define BTN_EN2 35
  328. #define BTN_ENC 31 //the click
  329. #endif
  330. #ifdef G3D_PANEL
  331. #define SDCARDDETECT 49
  332. #else
  333. #define SDCARDDETECT -1 // Ramps does not use this port
  334. #endif
  335. #endif
  336. #else //old style panel with shift register
  337. //arduino pin witch triggers an piezzo beeper
  338. #define BEEPER 33 // No Beeper added
  339. //buttons are attached to a shift register
  340. // Not wired this yet
  341. //#define SHIFT_CLK 38
  342. //#define SHIFT_LD 42
  343. //#define SHIFT_OUT 40
  344. //#define SHIFT_EN 17
  345. #define LCD_PINS_RS 16
  346. #define LCD_PINS_ENABLE 17
  347. #define LCD_PINS_D4 23
  348. #define LCD_PINS_D5 25
  349. #define LCD_PINS_D6 27
  350. #define LCD_PINS_D7 29
  351. #endif
  352. #endif //ULTRA_LCD
  353. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default (MOTHERBOARD == 3)
  354. #define X_STEP_PIN 26
  355. #define X_DIR_PIN 28
  356. #define X_ENABLE_PIN 24
  357. #define X_MIN_PIN 3
  358. #define X_MAX_PIN -1 //2
  359. #define Y_STEP_PIN 38
  360. #define Y_DIR_PIN 40
  361. #define Y_ENABLE_PIN 36
  362. #define Y_MIN_PIN 16
  363. #define Y_MAX_PIN -1 //17
  364. #define Z_STEP_PIN 44
  365. #define Z_DIR_PIN 46
  366. #define Z_ENABLE_PIN 42
  367. #define Z_MIN_PIN 18
  368. #define Z_MAX_PIN -1 //19
  369. #define E0_STEP_PIN 32
  370. #define E0_DIR_PIN 34
  371. #define E0_ENABLE_PIN 30
  372. #define SDPOWER 48
  373. #define SDSS 53
  374. #define LED_PIN 13
  375. #define PS_ON_PIN -1
  376. #define KILL_PIN -1
  377. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  378. #define HEATER_0_PIN 12 // RAMPS 1.0
  379. #define HEATER_BED_PIN -1 // RAMPS 1.0
  380. #define FAN_PIN 11 // RAMPS 1.0
  381. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  382. #define HEATER_0_PIN 10 // RAMPS 1.1
  383. #define HEATER_BED_PIN 8 // RAMPS 1.1
  384. #define FAN_PIN 9 // RAMPS 1.1
  385. #endif
  386. #define HEATER_1_PIN -1
  387. #define HEATER_2_PIN -1
  388. #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  389. #define TEMP_1_PIN -1
  390. #define TEMP_2_PIN -1
  391. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  392. #endif// MOTHERBOARD == 33 || MOTHERBOARD == 34
  393. // SPI for Max6675 Thermocouple
  394. #ifndef SDSUPPORT
  395. // these pins are defined in the SD library if building with SD support
  396. #define MAX_SCK_PIN 52
  397. #define MAX_MISO_PIN 50
  398. #define MAX_MOSI_PIN 51
  399. #define MAX6675_SS 53
  400. #else
  401. #define MAX6675_SS 49
  402. #endif
  403. #endif//MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34
  404. /****************************************************************************************
  405. * Duemilanove w/ ATMega328P pin assignment
  406. *
  407. ****************************************************************************************/
  408. #if MOTHERBOARD == 4
  409. #define KNOWN_BOARD 1
  410. #ifndef __AVR_ATmega328P__
  411. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  412. #endif
  413. #define X_STEP_PIN 19
  414. #define X_DIR_PIN 18
  415. #define X_ENABLE_PIN -1
  416. #define X_STOP_PIN 17
  417. #define Y_STEP_PIN 10
  418. #define Y_DIR_PIN 7
  419. #define Y_ENABLE_PIN -1
  420. #define Y_STOP_PIN 8
  421. #define Z_STEP_PIN 13
  422. #define Z_DIR_PIN 3
  423. #define Z_ENABLE_PIN 2
  424. #define Z_STOP_PIN 4
  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_STOP_PIN 20
  459. //y axis pins
  460. #define Y_STEP_PIN 23
  461. #define Y_DIR_PIN 22
  462. #define Y_ENABLE_PIN 24
  463. #define Y_STOP_PIN 25
  464. //z axis pins
  465. #define Z_STEP_PIN 27
  466. #define Z_DIR_PIN 28
  467. #define Z_ENABLE_PIN 29
  468. #define Z_STOP_PIN 30
  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. #define KILL_PIN -1 //changed @ drakelive 20120830
  492. //our pin for debugging.
  493. #define DEBUG_PIN 0
  494. //our RS485 pins
  495. #define TX_ENABLE_PIN 12
  496. #define RX_ENABLE_PIN 13
  497. #endif
  498. /****************************************************************************************
  499. * Sanguinololu pin assignment
  500. *
  501. ****************************************************************************************/
  502. #if MOTHERBOARD == 64
  503. #define STB
  504. #endif
  505. #if MOTHERBOARD == 63
  506. #define MELZI
  507. #endif
  508. #if MOTHERBOARD == 62 || MOTHERBOARD == 63 || MOTHERBOARD == 64
  509. #undef MOTHERBOARD
  510. #define MOTHERBOARD 6
  511. #define SANGUINOLOLU_V_1_2
  512. #endif
  513. #if MOTHERBOARD == 6
  514. #define KNOWN_BOARD 1
  515. #ifndef __AVR_ATmega644P__
  516. #ifndef __AVR_ATmega1284P__
  517. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  518. #endif
  519. #endif
  520. #define X_STEP_PIN 15
  521. #define X_DIR_PIN 21
  522. #define X_STOP_PIN 18
  523. #define Y_STEP_PIN 22
  524. #define Y_DIR_PIN 23
  525. #define Y_STOP_PIN 19
  526. #define Z_STEP_PIN 3
  527. #define Z_DIR_PIN 2
  528. #define Z_STOP_PIN 20
  529. #define E0_STEP_PIN 1
  530. #define E0_DIR_PIN 0
  531. #define LED_PIN -1
  532. #define FAN_PIN -1
  533. #if FAN_PIN == 12 || FAN_PIN ==13
  534. #define FAN_SOFT_PWM
  535. #endif
  536. #ifdef MELZI
  537. #define LED_PIN 27 /* On some broken versions of the Sanguino libraries the pin definitions are wrong, which then needs LED_PIN as pin 28. But you better upgrade your Sanguino libraries! See #368. */
  538. #define FAN_PIN 4
  539. #endif
  540. #ifdef STB
  541. #define FAN_PIN 4
  542. #endif
  543. #define PS_ON_PIN -1
  544. #define KILL_PIN -1
  545. #define HEATER_0_PIN 13 // (extruder)
  546. #define HEATER_1_PIN -1
  547. #define HEATER_2_PIN -1
  548. #ifdef SANGUINOLOLU_V_1_2
  549. #define HEATER_BED_PIN 12 // (bed)
  550. #define X_ENABLE_PIN 14
  551. #define Y_ENABLE_PIN 14
  552. #define Z_ENABLE_PIN 26
  553. #define E0_ENABLE_PIN 14
  554. #else
  555. #define HEATER_BED_PIN 14 // (bed)
  556. #define X_ENABLE_PIN -1
  557. #define Y_ENABLE_PIN -1
  558. #define Z_ENABLE_PIN -1
  559. #define E0_ENABLE_PIN -1
  560. #endif
  561. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  562. #define TEMP_1_PIN -1
  563. #define TEMP_2_PIN -1
  564. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  565. #define SDPOWER -1
  566. #define SDSS 31
  567. /* On some broken versions of the Sanguino libraries the pin definitions are wrong, which then needs SDSS as pin 24. But you better upgrade your Sanguino libraries! See #368. */
  568. //#define SDSS 24
  569. #ifdef ULTRA_LCD
  570. #ifdef NEWPANEL
  571. //we have no buzzer installed
  572. #define BEEPER -1
  573. //LCD Pins
  574. #ifdef DOGLCD
  575. // Pins for DOGM SPI LCD Support
  576. #define DOGLCD_A0 30
  577. #define DOGLCD_CS 29
  578. // GLCD features
  579. #define LCD_CONTRAST 1
  580. // Uncomment screen orientation
  581. // #define LCD_SCREEN_ROT_0
  582. // #define LCD_SCREEN_ROT_90
  583. #define LCD_SCREEN_ROT_180
  584. // #define LCD_SCREEN_ROT_270
  585. #else // standard Hitachi LCD controller
  586. #define LCD_PINS_RS 4
  587. #define LCD_PINS_ENABLE 17
  588. #define LCD_PINS_D4 30
  589. #define LCD_PINS_D5 29
  590. #define LCD_PINS_D6 28
  591. #define LCD_PINS_D7 27
  592. #endif
  593. //The encoder and click button
  594. #define BTN_EN1 11
  595. #define BTN_EN2 10
  596. #define BTN_ENC 16 //the switch
  597. //not connected to a pin
  598. #define SDCARDDETECT -1
  599. #endif //Newpanel
  600. #endif //Ultipanel
  601. #endif
  602. #if MOTHERBOARD == 7
  603. #define KNOWN_BOARD
  604. /*****************************************************************
  605. * Ultimaker pin assignment
  606. ******************************************************************/
  607. #ifndef __AVR_ATmega1280__
  608. #ifndef __AVR_ATmega2560__
  609. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  610. #endif
  611. #endif
  612. #define LARGE_FLASH true
  613. #define X_STEP_PIN 25
  614. #define X_DIR_PIN 23
  615. #define X_MIN_PIN 22
  616. #define X_MAX_PIN 24
  617. #define X_ENABLE_PIN 27
  618. #define Y_STEP_PIN 31
  619. #define Y_DIR_PIN 33
  620. #define Y_MIN_PIN 26
  621. #define Y_MAX_PIN 28
  622. #define Y_ENABLE_PIN 29
  623. #define Z_STEP_PIN 37
  624. #define Z_DIR_PIN 39
  625. #define Z_MIN_PIN 30
  626. #define Z_MAX_PIN 32
  627. #define Z_ENABLE_PIN 35
  628. #define HEATER_BED_PIN 4
  629. #define TEMP_BED_PIN 10
  630. #define HEATER_0_PIN 2
  631. #define TEMP_0_PIN 8
  632. #define HEATER_1_PIN 3
  633. #define TEMP_1_PIN 9
  634. #define HEATER_2_PIN -1
  635. #define TEMP_2_PIN -1
  636. #define E0_STEP_PIN 43
  637. #define E0_DIR_PIN 45
  638. #define E0_ENABLE_PIN 41
  639. #define E1_STEP_PIN 49
  640. #define E1_DIR_PIN 47
  641. #define E1_ENABLE_PIN 48
  642. #define SDPOWER -1
  643. #define SDSS 53
  644. #define LED_PIN 13
  645. #define FAN_PIN 7
  646. #define PS_ON_PIN 12
  647. #define KILL_PIN -1
  648. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  649. #ifdef ULTRA_LCD
  650. #ifdef NEWPANEL
  651. //arduino pin witch triggers an piezzo beeper
  652. #define BEEPER 18
  653. #define LCD_PINS_RS 20
  654. #define LCD_PINS_ENABLE 17
  655. #define LCD_PINS_D4 16
  656. #define LCD_PINS_D5 21
  657. #define LCD_PINS_D6 5
  658. #define LCD_PINS_D7 6
  659. //buttons are directly attached
  660. #define BTN_EN1 40
  661. #define BTN_EN2 42
  662. #define BTN_ENC 19 //the click
  663. #define SDCARDDETECT 38
  664. #else //old style panel with shift register
  665. //arduino pin witch triggers an piezzo beeper
  666. #define BEEPER 18
  667. //buttons are attached to a shift register
  668. #define SHIFT_CLK 38
  669. #define SHIFT_LD 42
  670. #define SHIFT_OUT 40
  671. #define SHIFT_EN 17
  672. #define LCD_PINS_RS 16
  673. #define LCD_PINS_ENABLE 5
  674. #define LCD_PINS_D4 6
  675. #define LCD_PINS_D5 21
  676. #define LCD_PINS_D6 20
  677. #define LCD_PINS_D7 19
  678. #define SDCARDDETECT -1
  679. #endif
  680. #endif //ULTRA_LCD
  681. #endif
  682. #if MOTHERBOARD == 71
  683. #define KNOWN_BOARD
  684. /*****************************************************************
  685. * Ultimaker pin assignment (Old electronics)
  686. ******************************************************************/
  687. #ifndef __AVR_ATmega1280__
  688. #ifndef __AVR_ATmega2560__
  689. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  690. #endif
  691. #endif
  692. #define LARGE_FLASH true
  693. #define X_STEP_PIN 25
  694. #define X_DIR_PIN 23
  695. #define X_MIN_PIN 15
  696. #define X_MAX_PIN 14
  697. #define X_ENABLE_PIN 27
  698. #define Y_STEP_PIN 31
  699. #define Y_DIR_PIN 33
  700. #define Y_MIN_PIN 17
  701. #define Y_MAX_PIN 16
  702. #define Y_ENABLE_PIN 29
  703. #define Z_STEP_PIN 37
  704. #define Z_DIR_PIN 39
  705. #define Z_MIN_PIN 19
  706. #define Z_MAX_PIN 18
  707. #define Z_ENABLE_PIN 35
  708. #define HEATER_BED_PIN -1
  709. #define TEMP_BED_PIN -1
  710. #define HEATER_0_PIN 2
  711. #define TEMP_0_PIN 8
  712. #define HEATER_1_PIN 1
  713. #define TEMP_1_PIN 1
  714. #define HEATER_2_PIN -1
  715. #define TEMP_2_PIN -1
  716. #define E0_STEP_PIN 43
  717. #define E0_DIR_PIN 45
  718. #define E0_ENABLE_PIN 41
  719. #define E1_STEP_PIN -1
  720. #define E1_DIR_PIN -1
  721. #define E1_ENABLE_PIN -1
  722. #define SDPOWER -1
  723. #define SDSS -1
  724. #define LED_PIN -1
  725. #define FAN_PIN -1
  726. #define PS_ON_PIN -1
  727. #define KILL_PIN -1
  728. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  729. #define LCD_PINS_RS 24
  730. #define LCD_PINS_ENABLE 22
  731. #define LCD_PINS_D4 36
  732. #define LCD_PINS_D5 34
  733. #define LCD_PINS_D6 32
  734. #define LCD_PINS_D7 30
  735. #endif
  736. /****************************************************************************************
  737. * RUMBA pin assignment
  738. *
  739. ****************************************************************************************/
  740. #if MOTHERBOARD == 80
  741. #define KNOWN_BOARD 1
  742. #ifndef __AVR_ATmega2560__
  743. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  744. #endif
  745. #define X_STEP_PIN 17
  746. #define X_DIR_PIN 16
  747. #define X_ENABLE_PIN 48
  748. #define X_MIN_PIN 37
  749. #define X_MAX_PIN 36
  750. #define Y_STEP_PIN 54
  751. #define Y_DIR_PIN 47
  752. #define Y_ENABLE_PIN 55
  753. #define Y_MIN_PIN 35
  754. #define Y_MAX_PIN 34
  755. #define Z_STEP_PIN 57
  756. #define Z_DIR_PIN 56
  757. #define Z_ENABLE_PIN 62
  758. #define Z_MIN_PIN 33
  759. #define Z_MAX_PIN 32
  760. #define E0_STEP_PIN 23
  761. #define E0_DIR_PIN 22
  762. #define E0_ENABLE_PIN 24
  763. #define E1_STEP_PIN 26
  764. #define E1_DIR_PIN 25
  765. #define E1_ENABLE_PIN 27
  766. #define E2_STEP_PIN 29
  767. #define E2_DIR_PIN 28
  768. #define E2_ENABLE_PIN 39
  769. #define LED_PIN 13
  770. #define FAN_PIN 7
  771. //additional FAN1 PIN (e.g. useful for electronics fan or light on/off) on PIN 8
  772. #define PS_ON_PIN 45
  773. #define KILL_PIN 46
  774. #if (TEMP_SENSOR_0==0)
  775. #define TEMP_0_PIN -1
  776. #define HEATER_0_PIN -1
  777. #else
  778. #define HEATER_0_PIN 2 // EXTRUDER 1
  779. #if (TEMP_SENSOR_0==-1)
  780. #define TEMP_0_PIN 6 // ANALOG NUMBERING - connector *K1* on RUMBA thermocouple ADD ON is used
  781. #else
  782. #define TEMP_0_PIN 15 // ANALOG NUMBERING - default connector for thermistor *T0* on rumba board is used
  783. #endif
  784. #endif
  785. #if (TEMP_SENSOR_1==0)
  786. #define TEMP_1_PIN -1
  787. #define HEATER_1_PIN -1
  788. #else
  789. #define HEATER_1_PIN 3 // EXTRUDER 2
  790. #if (TEMP_SENSOR_1==-1)
  791. #define TEMP_1_PIN 5 // ANALOG NUMBERING - connector *K2* on RUMBA thermocouple ADD ON is used
  792. #else
  793. #define TEMP_1_PIN 14 // ANALOG NUMBERING - default connector for thermistor *T1* on rumba board is used
  794. #endif
  795. #endif
  796. #if (TEMP_SENSOR_2==0)
  797. #define TEMP_2_PIN -1
  798. #define HEATER_2_PIN -1
  799. #else
  800. #define HEATER_2_PIN 6 // EXTRUDER 3
  801. #if (TEMP_SENSOR_2==-1)
  802. #define TEMP_2_PIN 7 // ANALOG NUMBERING - connector *K3* on RUMBA thermocouple ADD ON is used <-- this can not be used when TEMP_SENSOR_BED is defined as thermocouple
  803. #else
  804. #define TEMP_2_PIN 13 // ANALOG NUMBERING - default connector for thermistor *T2* on rumba board is used
  805. #endif
  806. #endif
  807. //optional for extruder 4 or chamber: #define TEMP_X_PIN 12 // ANALOG NUMBERING - default connector for thermistor *T3* on rumba board is used
  808. //optional FAN1 can be used as 4th heater output: #define HEATER_3_PIN 8 // EXTRUDER 4
  809. #if (TEMP_SENSOR_BED==0)
  810. #define TEMP_BED_PIN -1
  811. #define HEATER_BED_PIN -1
  812. #else
  813. #define HEATER_BED_PIN 9 // BED
  814. #if (TEMP_SENSOR_BED==-1)
  815. #define TEMP_BED_PIN 7 // ANALOG NUMBERING - connector *K3* on RUMBA thermocouple ADD ON is used <-- this can not be used when TEMP_SENSOR_2 is defined as thermocouple
  816. #else
  817. #define TEMP_BED_PIN 11 // ANALOG NUMBERING - default connector for thermistor *THB* on rumba board is used
  818. #endif
  819. #endif
  820. #define SDPOWER -1
  821. #define SDSS 53
  822. #define SDCARDDETECT 49
  823. #define BEEPER 44
  824. #define LCD_PINS_RS 19
  825. #define LCD_PINS_ENABLE 42
  826. #define LCD_PINS_D4 18
  827. #define LCD_PINS_D5 38
  828. #define LCD_PINS_D6 41
  829. #define LCD_PINS_D7 40
  830. #define BTN_EN1 11
  831. #define BTN_EN2 12
  832. #define BTN_ENC 43
  833. #endif //MOTHERBOARD==80
  834. /****************************************************************************************
  835. * Teensylu 0.7 / Printrboard pin assignments (AT90USB1286)
  836. * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
  837. http://www.pjrc.com/teensy/teensyduino.html
  838. * See http://reprap.org/wiki/Printrboard for more info
  839. ****************************************************************************************/
  840. #if MOTHERBOARD == 8 || MOTHERBOARD == 81
  841. #define KNOWN_BOARD 1
  842. #define AT90USB 1286 // Disable MarlinSerial etc.
  843. #ifndef __AVR_AT90USB1286__
  844. #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
  845. #endif
  846. #define LARGE_FLASH true
  847. #define X_STEP_PIN 0
  848. #define X_DIR_PIN 1
  849. #define X_ENABLE_PIN 39
  850. #define Y_STEP_PIN 2
  851. #define Y_DIR_PIN 3
  852. #define Y_ENABLE_PIN 38
  853. #define Z_STEP_PIN 4
  854. #define Z_DIR_PIN 5
  855. #define Z_ENABLE_PIN 23
  856. #define E0_STEP_PIN 6
  857. #define E0_DIR_PIN 7
  858. #define E0_ENABLE_PIN 19
  859. #define HEATER_0_PIN 21 // Extruder
  860. #define HEATER_1_PIN -1
  861. #define HEATER_2_PIN -1
  862. #define HEATER_BED_PIN 20 // Bed
  863. #define FAN_PIN 22 // Fan
  864. // You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h
  865. // for the fan and Teensyduino uses a different pin mapping.
  866. #if MOTHERBOARD == 8 // Teensylu
  867. #define X_STOP_PIN 13
  868. #define Y_STOP_PIN 14
  869. #define Z_STOP_PIN 15
  870. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  871. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  872. #else // Printrboard
  873. #define X_STOP_PIN 35
  874. #define Y_STOP_PIN 8
  875. #define Z_STOP_PIN 36
  876. #define TEMP_0_PIN 1 // Extruder / Analog pin numbering
  877. #define TEMP_BED_PIN 0 // Bed / Analog pin numbering
  878. #endif
  879. #define TEMP_1_PIN -1
  880. #define TEMP_2_PIN -1
  881. #define SDPOWER -1
  882. #define SDSS 8
  883. #define LED_PIN -1
  884. #define PS_ON_PIN -1
  885. #define KILL_PIN -1
  886. #define ALARM_PIN -1
  887. #ifndef SDSUPPORT
  888. // these pins are defined in the SD library if building with SD support
  889. #define SCK_PIN 9
  890. #define MISO_PIN 11
  891. #define MOSI_PIN 10
  892. #endif
  893. #endif // MOTHERBOARD == 8 (Teensylu) or 81 (Printrboard)
  894. /****************************************************************************************
  895. * Brainwave 1.0 pin assignments (AT90USB646)
  896. * Requires hardware bundle for Arduino:
  897. https://github.com/unrepentantgeek/brainwave-arduino
  898. ****************************************************************************************/
  899. #if MOTHERBOARD == 82
  900. #define KNOWN_BOARD 1
  901. #define AT90USB 646 // Disable MarlinSerial etc.
  902. #ifndef __AVR_AT90USB646__
  903. #error Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu.
  904. #endif
  905. #define X_STEP_PIN 27
  906. #define X_DIR_PIN 29
  907. #define X_ENABLE_PIN 28
  908. #define X_STOP_PIN 7
  909. #define X_ATT_PIN 26
  910. #define Y_STEP_PIN 31
  911. #define Y_DIR_PIN 33
  912. #define Y_ENABLE_PIN 32
  913. #define Y_STOP_PIN 6
  914. #define Y_ATT_PIN 30
  915. #define Z_STEP_PIN 17
  916. #define Z_DIR_PIN 19
  917. #define Z_ENABLE_PIN 18
  918. #define Z_STOP_PIN 5
  919. #define Z_ATT_PIN 16
  920. #define E0_STEP_PIN 21
  921. #define E0_DIR_PIN 23
  922. #define E0_ENABLE_PIN 22
  923. #define E0_ATT_PIN 20
  924. #define HEATER_0_PIN 4 // Extruder
  925. #define HEATER_1_PIN -1
  926. #define HEATER_2_PIN -1
  927. #define HEATER_BED_PIN 38 // Bed
  928. #define FAN_PIN 3 // Fan
  929. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  930. #define TEMP_1_PIN -1
  931. #define TEMP_2_PIN -1
  932. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  933. #define SDPOWER -1
  934. #define SDSS -1
  935. #define LED_PIN 39
  936. #define PS_ON_PIN -1
  937. #define KILL_PIN -1
  938. #define ALARM_PIN -1
  939. #ifndef SDSUPPORT
  940. // these pins are defined in the SD library if building with SD support
  941. #define SCK_PIN 9
  942. #define MISO_PIN 11
  943. #define MOSI_PIN 10
  944. #endif
  945. #endif // MOTHERBOARD == 82 (Brainwave)
  946. /****************************************************************************************
  947. * Gen3+ pin assignment
  948. *
  949. ****************************************************************************************/
  950. #if MOTHERBOARD == 9
  951. #define MOTHERBOARD 6 /*TODO: Figure out, Why is this done?*/
  952. #define KNOWN_BOARD 1
  953. #ifndef __AVR_ATmega644P__
  954. #ifndef __AVR_ATmega1284P__
  955. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  956. #endif
  957. #endif
  958. #define X_STEP_PIN 15
  959. #define X_DIR_PIN 18
  960. #define X_STOP_PIN 20
  961. #define Y_STEP_PIN 23
  962. #define Y_DIR_PIN 22
  963. #define Y_STOP_PIN 25
  964. #define Z_STEP_PIN 27
  965. #define Z_DIR_PIN 28
  966. #define Z_STOP_PIN 30
  967. #define E_STEP_PIN 17
  968. #define E_DIR_PIN 21
  969. #define LED_PIN -1
  970. #define FAN_PIN -1
  971. #define PS_ON_PIN 14
  972. #define KILL_PIN -1
  973. #define HEATER_0_PIN 12 // (extruder)
  974. #define HEATER_1_PIN 16 // (bed)
  975. #define X_ENABLE_PIN 19
  976. #define Y_ENABLE_PIN 24
  977. #define Z_ENABLE_PIN 29
  978. #define E_ENABLE_PIN 13
  979. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  980. #define TEMP_1_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  981. #define TEMP_2_PIN -1
  982. #define SDPOWER -1
  983. #define SDSS 4
  984. #define HEATER_2_PIN -1
  985. #endif
  986. /****************************************************************************************
  987. * Open Motion controller with enable based extruders
  988. *
  989. * ATMega644
  990. *
  991. * +---\/---+
  992. * (D 0) PB0 1| |40 PA0 (AI 0 / D31)
  993. * (D 1) PB1 2| |39 PA1 (AI 1 / D30)
  994. * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
  995. * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
  996. * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
  997. * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
  998. * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
  999. * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
  1000. * RST 9| |32 AREF
  1001. * VCC 10| |31 GND
  1002. * GND 11| |30 AVCC
  1003. * XTAL2 12| |29 PC7 (D 23)
  1004. * XTAL1 13| |28 PC6 (D 22)
  1005. * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
  1006. * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
  1007. * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
  1008. * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
  1009. * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
  1010. * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
  1011. * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
  1012. * +--------+
  1013. *
  1014. ****************************************************************************************/
  1015. #if MOTHERBOARD == 90 //Alpha OMCA board
  1016. #define KNOWN_BOARD 1
  1017. #ifndef __AVR_ATmega644__
  1018. #error Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu.
  1019. #endif
  1020. #define X_STEP_PIN 21
  1021. #define X_DIR_PIN 20
  1022. #define X_ENABLE_PIN 24
  1023. #define X_STOP_PIN 0
  1024. #define Y_STEP_PIN 23
  1025. #define Y_DIR_PIN 22
  1026. #define Y_ENABLE_PIN 24
  1027. #define Y_STOP_PIN 1
  1028. #define Z_STEP_PIN 26
  1029. #define Z_DIR_PIN 25
  1030. #define Z_ENABLE_PIN 24
  1031. #define Z_STOP_PIN 2
  1032. #define E0_STEP_PIN 28
  1033. #define E0_DIR_PIN 27
  1034. #define E0_ENABLE_PIN 24
  1035. #define E1_STEP_PIN -1 // 19
  1036. #define E1_DIR_PIN -1 // 18
  1037. #define E1_ENABLE_PIN 24
  1038. #define E2_STEP_PIN -1 // 17
  1039. #define E2_DIR_PIN -1 // 16
  1040. #define E2_ENABLE_PIN 24
  1041. #define SDPOWER -1
  1042. #define SDSS 11
  1043. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1044. #define LED_PIN -1
  1045. #define FAN_PIN 3
  1046. #define PS_ON_PIN -1
  1047. #define KILL_PIN -1
  1048. #define HEATER_0_PIN 4
  1049. #define HEATER_1_PIN -1 // 12
  1050. #define HEATER_2_PIN -1 // 13
  1051. #define TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  1052. #define TEMP_1_PIN -1 // 1
  1053. #define TEMP_2_PIN -1 // 2
  1054. #define HEATER_BED_PIN -1 // 14/15
  1055. #define TEMP_BED_PIN -1 // 1,2 or I2C
  1056. /* 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) */
  1057. #endif
  1058. #if MOTHERBOARD == 91 // Final OMCA board -- REF http://sanguino.cc/hardware
  1059. #define KNOWN_BOARD 1
  1060. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
  1061. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)
  1062. #endif
  1063. #define X_STEP_PIN 26
  1064. #define X_DIR_PIN 25
  1065. #define X_ENABLE_PIN 10
  1066. #define X_STOP_PIN 0
  1067. #define Y_STEP_PIN 28
  1068. #define Y_DIR_PIN 27
  1069. #define Y_ENABLE_PIN 10
  1070. #define Y_STOP_PIN 1
  1071. #define Z_STEP_PIN 23
  1072. #define Z_DIR_PIN 22
  1073. #define Z_ENABLE_PIN 10
  1074. #define Z_STOP_PIN 2
  1075. #define E0_STEP_PIN 24
  1076. #define E0_DIR_PIN 21
  1077. #define E0_ENABLE_PIN 10
  1078. /* future proofing */
  1079. #define __FS 20
  1080. #define __FD 19
  1081. #define __GS 18
  1082. #define __GD 13
  1083. #define UNUSED_PWM 14 /* PWM on LEFT connector */
  1084. #define E1_STEP_PIN -1 // 21
  1085. #define E1_DIR_PIN -1 // 20
  1086. #define E1_ENABLE_PIN -1 // 19
  1087. #define E2_STEP_PIN -1 // 21
  1088. #define E2_DIR_PIN -1 // 20
  1089. #define E2_ENABLE_PIN -1 // 18
  1090. #define SDPOWER -1
  1091. #define SDSS 11
  1092. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1093. #define LED_PIN -1
  1094. #define FAN_PIN 14 /* PWM on MIDDLE connector */
  1095. #define PS_ON_PIN -1
  1096. #define KILL_PIN -1
  1097. #define HEATER_0_PIN 3 /*DONE PWM on RIGHT connector */
  1098. #define HEATER_1_PIN -1
  1099. #define HEATER_2_PIN -1
  1100. #define HEATER_1_PIN -1
  1101. #define HEATER_2_PIN -1
  1102. #define TEMP_0_PIN 0 // ANALOG INPUT NUMBERING
  1103. #define TEMP_1_PIN 1 // ANALOG
  1104. #define TEMP_2_PIN -1 // 2
  1105. #define HEATER_BED_PIN 4
  1106. #define TEMP_BED_PIN 2 // 1,2 or I2C
  1107. #define I2C_SCL 16
  1108. #define I2C_SDA 17
  1109. #endif
  1110. #if MOTHERBOARD == 301
  1111. #define KNOWN_BOARD
  1112. /*****************************************************************
  1113. * Rambo Pin Assignments
  1114. ******************************************************************/
  1115. #ifndef __AVR_ATmega2560__
  1116. #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
  1117. #endif
  1118. #define LARGE_FLASH true
  1119. #define X_STEP_PIN 37
  1120. #define X_DIR_PIN 48
  1121. #define X_MIN_PIN 12
  1122. #define X_MAX_PIN 24
  1123. #define X_ENABLE_PIN 29
  1124. #define X_MS1_PIN 40
  1125. #define X_MS2_PIN 41
  1126. #define Y_STEP_PIN 36
  1127. #define Y_DIR_PIN 49
  1128. #define Y_MIN_PIN 11
  1129. #define Y_MAX_PIN 23
  1130. #define Y_ENABLE_PIN 28
  1131. #define Y_MS1_PIN 69
  1132. #define Y_MS2_PIN 39
  1133. #define Z_STEP_PIN 35
  1134. #define Z_DIR_PIN 47
  1135. #define Z_MIN_PIN 10
  1136. #define Z_MAX_PIN 30
  1137. #define Z_ENABLE_PIN 27
  1138. #define Z_MS1_PIN 68
  1139. #define Z_MS2_PIN 67
  1140. #define HEATER_BED_PIN 3
  1141. #define TEMP_BED_PIN 2
  1142. #define HEATER_0_PIN 9
  1143. #define TEMP_0_PIN 0
  1144. #define HEATER_1_PIN 7
  1145. #define TEMP_1_PIN 1
  1146. #ifdef BARICUDA
  1147. #define HEATER_2_PIN 6
  1148. #else
  1149. #define HEATER_2_PIN -1
  1150. #endif
  1151. #define TEMP_2_PIN -1
  1152. #define E0_STEP_PIN 34
  1153. #define E0_DIR_PIN 43
  1154. #define E0_ENABLE_PIN 26
  1155. #define E0_MS1_PIN 65
  1156. #define E0_MS2_PIN 66
  1157. #define E1_STEP_PIN 33
  1158. #define E1_DIR_PIN 42
  1159. #define E1_ENABLE_PIN 25
  1160. #define E1_MS1_PIN 63
  1161. #define E1_MS2_PIN 64
  1162. #define DIGIPOTSS_PIN 38
  1163. #define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping
  1164. #define SDPOWER -1
  1165. #define SDSS 53
  1166. #define LED_PIN 13
  1167. #define FAN_PIN 8
  1168. #define PS_ON_PIN 4
  1169. #define KILL_PIN -1
  1170. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  1171. #endif
  1172. /****************************************************************************************
  1173. * MegaTronics
  1174. *
  1175. ****************************************************************************************/
  1176. #if MOTHERBOARD == 70
  1177. #define KNOWN_BOARD 1
  1178. //////////////////FIX THIS//////////////
  1179. #ifndef __AVR_ATmega2560__
  1180. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1181. #endif
  1182. #define LARGE_FLASH true
  1183. #define X_STEP_PIN 26
  1184. #define X_DIR_PIN 28
  1185. #define X_ENABLE_PIN 24
  1186. #define X_MIN_PIN 41
  1187. #define X_MAX_PIN 37
  1188. #define Y_STEP_PIN 60 // A6
  1189. #define Y_DIR_PIN 61 // A7
  1190. #define Y_ENABLE_PIN 22
  1191. #define Y_MIN_PIN 14
  1192. #define Y_MAX_PIN 15
  1193. #define Z_STEP_PIN 54 // A0
  1194. #define Z_DIR_PIN 55 // A1
  1195. #define Z_ENABLE_PIN 56 // A2
  1196. #define Z_MIN_PIN 18
  1197. #define Z_MAX_PIN 19
  1198. #define E0_STEP_PIN 31
  1199. #define E0_DIR_PIN 32
  1200. #define E0_ENABLE_PIN 38
  1201. #define E1_STEP_PIN 34
  1202. #define E1_DIR_PIN 36
  1203. #define E1_ENABLE_PIN 30
  1204. #define SDPOWER -1
  1205. #define SDSS 53
  1206. #define LED_PIN 13
  1207. #define FAN_PIN 7 // IO pin. Buffer needed
  1208. #define PS_ON_PIN 12
  1209. #define KILL_PIN -1
  1210. #define HEATER_0_PIN 9 // EXTRUDER 1
  1211. #define HEATER_1_PIN 8 // EXTRUDER 2 (FAN On Sprinter)
  1212. #define HEATER_2_PIN -1
  1213. #if TEMP_SENSOR_0 == -1
  1214. #define TEMP_0_PIN 8 // ANALOG NUMBERING
  1215. #else
  1216. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  1217. #endif
  1218. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  1219. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  1220. #define HEATER_BED_PIN 10 // BED
  1221. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  1222. #define BEEPER 33 // Beeper on AUX-4
  1223. #ifdef ULTRA_LCD
  1224. #ifdef NEWPANEL
  1225. //arduino pin which triggers an piezzo beeper
  1226. #define LCD_PINS_RS 16
  1227. #define LCD_PINS_ENABLE 17
  1228. #define LCD_PINS_D4 23
  1229. #define LCD_PINS_D5 25
  1230. #define LCD_PINS_D6 27
  1231. #define LCD_PINS_D7 29
  1232. //buttons are directly attached using AUX-2
  1233. #define BTN_EN1 59
  1234. #define BTN_EN2 64
  1235. #define BTN_ENC 43 //the click
  1236. #define SDCARDDETECT -1 // Ramps does not use this port
  1237. #endif
  1238. #endif //ULTRA_LCD
  1239. #endif
  1240. #ifndef KNOWN_BOARD
  1241. #error Unknown MOTHERBOARD value in configuration.h
  1242. #endif
  1243. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  1244. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,
  1245. #if EXTRUDERS > 1
  1246. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
  1247. #else
  1248. #define _E1_PINS
  1249. #endif
  1250. #if EXTRUDERS > 2
  1251. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,
  1252. #else
  1253. #define _E2_PINS
  1254. #endif
  1255. #ifdef X_STOP_PIN
  1256. #if X_HOME_DIR < 0
  1257. #define X_MIN_PIN X_STOP_PIN
  1258. #define X_MAX_PIN -1
  1259. #else
  1260. #define X_MIN_PIN -1
  1261. #define X_MAX_PIN X_STOP_PIN
  1262. #endif
  1263. #endif
  1264. #ifdef Y_STOP_PIN
  1265. #if Y_HOME_DIR < 0
  1266. #define Y_MIN_PIN Y_STOP_PIN
  1267. #define Y_MAX_PIN -1
  1268. #else
  1269. #define Y_MIN_PIN -1
  1270. #define Y_MAX_PIN Y_STOP_PIN
  1271. #endif
  1272. #endif
  1273. #ifdef Z_STOP_PIN
  1274. #if Z_HOME_DIR < 0
  1275. #define Z_MIN_PIN Z_STOP_PIN
  1276. #define Z_MAX_PIN -1
  1277. #else
  1278. #define Z_MIN_PIN -1
  1279. #define Z_MAX_PIN Z_STOP_PIN
  1280. #endif
  1281. #endif
  1282. #ifdef DISABLE_MAX_ENDSTOPS
  1283. #define X_MAX_PIN -1
  1284. #define Y_MAX_PIN -1
  1285. #define Z_MAX_PIN -1
  1286. #endif
  1287. #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, PS_ON_PIN, \
  1288. HEATER_BED_PIN, FAN_PIN, \
  1289. _E0_PINS _E1_PINS _E2_PINS \
  1290. analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
  1291. #endif