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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665
  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. #define BLEN_C 2
  229. #define BLEN_B 1
  230. #define BLEN_A 0
  231. #define encrot0 0
  232. #define encrot1 2
  233. #define encrot2 3
  234. #define encrot3 1
  235. #endif
  236. /****************************************************************************************
  237. * Arduino Mega pin assignment
  238. *
  239. ****************************************************************************************/
  240. #if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34
  241. #define KNOWN_BOARD 1
  242. //////////////////FIX THIS//////////////
  243. #ifndef __AVR_ATmega1280__
  244. #ifndef __AVR_ATmega2560__
  245. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  246. #endif
  247. #endif
  248. // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
  249. // #define RAMPS_V_1_3
  250. // #define RAMPS_V_1_0
  251. #if MOTHERBOARD == 33 || MOTHERBOARD == 34
  252. #define LARGE_FLASH true
  253. #define X_STEP_PIN 54
  254. #define X_DIR_PIN 55
  255. #define X_ENABLE_PIN 38
  256. #define X_MIN_PIN 3
  257. #define X_MAX_PIN 2
  258. #define Y_STEP_PIN 60
  259. #define Y_DIR_PIN 61
  260. #define Y_ENABLE_PIN 56
  261. #define Y_MIN_PIN 14
  262. #define Y_MAX_PIN 15
  263. #define Z_STEP_PIN 46
  264. #define Z_DIR_PIN 48
  265. #define Z_ENABLE_PIN 62
  266. #define Z_MIN_PIN 18
  267. #define Z_MAX_PIN 19
  268. #define Z2_STEP_PIN 36
  269. #define Z2_DIR_PIN 34
  270. #define Z2_ENABLE_PIN 30
  271. #define E0_STEP_PIN 26
  272. #define E0_DIR_PIN 28
  273. #define E0_ENABLE_PIN 24
  274. #define E1_STEP_PIN 36
  275. #define E1_DIR_PIN 34
  276. #define E1_ENABLE_PIN 30
  277. #define SDPOWER -1
  278. #define SDSS 53
  279. #define LED_PIN 13
  280. #if MOTHERBOARD == 33
  281. #define FAN_PIN 9 // (Sprinter config)
  282. #else
  283. #define FAN_PIN 4 // IO pin. Buffer needed
  284. #endif
  285. #define PS_ON_PIN 12
  286. #if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
  287. #define KILL_PIN 41
  288. #else
  289. #define KILL_PIN -1
  290. #endif
  291. #define HEATER_0_PIN 10 // EXTRUDER 1
  292. #if MOTHERBOARD == 33
  293. #define HEATER_1_PIN -1
  294. #else
  295. #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
  296. #endif
  297. #define HEATER_2_PIN -1
  298. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  299. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  300. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  301. #define HEATER_BED_PIN 8 // BED
  302. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  303. #ifdef ULTRA_LCD
  304. #ifdef NEWPANEL
  305. //encoder rotation values
  306. #define encrot0 0
  307. #define encrot1 2
  308. #define encrot2 3
  309. #define encrot3 1
  310. #define BLEN_A 0
  311. #define BLEN_B 1
  312. #define BLEN_C 2
  313. #define LCD_PINS_RS 16
  314. #define LCD_PINS_ENABLE 17
  315. #define LCD_PINS_D4 23
  316. #define LCD_PINS_D5 25
  317. #define LCD_PINS_D6 27
  318. #define LCD_PINS_D7 29
  319. #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
  320. #define BEEPER 37
  321. #define BTN_EN1 31
  322. #define BTN_EN2 33
  323. #define BTN_ENC 35
  324. #define SDCARDDETECT 49
  325. #else
  326. //arduino pin which triggers an piezzo beeper
  327. #define BEEPER 33 // Beeper on AUX-4
  328. //buttons are directly attached using AUX-2
  329. #ifdef REPRAPWORLD_KEYPAD
  330. #define BTN_EN1 64 // encoder
  331. #define BTN_EN2 59 // encoder
  332. #define BTN_ENC 63 // enter button
  333. #define SHIFT_OUT 40 // shift register
  334. #define SHIFT_CLK 44 // shift register
  335. #define SHIFT_LD 42 // shift register
  336. // define register bit values, don't change it
  337. #define BLEN_REPRAPWORLD_KEYPAD_F3 0
  338. #define BLEN_REPRAPWORLD_KEYPAD_F2 1
  339. #define BLEN_REPRAPWORLD_KEYPAD_F1 2
  340. #define BLEN_REPRAPWORLD_KEYPAD_UP 3
  341. #define BLEN_REPRAPWORLD_KEYPAD_RIGHT 4
  342. #define BLEN_REPRAPWORLD_KEYPAD_MIDDLE 5
  343. #define BLEN_REPRAPWORLD_KEYPAD_DOWN 6
  344. #define BLEN_REPRAPWORLD_KEYPAD_LEFT 7
  345. #else
  346. #define BTN_EN1 37
  347. #define BTN_EN2 35
  348. #define BTN_ENC 31 //the click
  349. #endif
  350. #ifdef G3D_PANEL
  351. #define SDCARDDETECT 49
  352. #else
  353. #define SDCARDDETECT -1 // Ramps does not use this port
  354. #endif
  355. #endif
  356. #else //old style panel with shift register
  357. //arduino pin witch triggers an piezzo beeper
  358. #define BEEPER 33 No Beeper added
  359. //buttons are attached to a shift register
  360. // Not wired this yet
  361. //#define SHIFT_CLK 38
  362. //#define SHIFT_LD 42
  363. //#define SHIFT_OUT 40
  364. //#define SHIFT_EN 17
  365. #define LCD_PINS_RS 16
  366. #define LCD_PINS_ENABLE 17
  367. #define LCD_PINS_D4 23
  368. #define LCD_PINS_D5 25
  369. #define LCD_PINS_D6 27
  370. #define LCD_PINS_D7 29
  371. //encoder rotation values
  372. #define encrot0 0
  373. #define encrot1 2
  374. #define encrot2 3
  375. #define encrot3 1
  376. //bits in the shift register that carry the buttons for:
  377. // left up center down right red
  378. #define BL_LE 7
  379. #define BL_UP 6
  380. #define BL_MI 5
  381. #define BL_DW 4
  382. #define BL_RI 3
  383. #define BL_ST 2
  384. #define BLEN_B 1
  385. #define BLEN_A 0
  386. #endif
  387. #endif //ULTRA_LCD
  388. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default (MOTHERBOARD == 3)
  389. #define X_STEP_PIN 26
  390. #define X_DIR_PIN 28
  391. #define X_ENABLE_PIN 24
  392. #define X_MIN_PIN 3
  393. #define X_MAX_PIN -1 //2
  394. #define Y_STEP_PIN 38
  395. #define Y_DIR_PIN 40
  396. #define Y_ENABLE_PIN 36
  397. #define Y_MIN_PIN 16
  398. #define Y_MAX_PIN -1 //17
  399. #define Z_STEP_PIN 44
  400. #define Z_DIR_PIN 46
  401. #define Z_ENABLE_PIN 42
  402. #define Z_MIN_PIN 18
  403. #define Z_MAX_PIN -1 //19
  404. #define E0_STEP_PIN 32
  405. #define E0_DIR_PIN 34
  406. #define E0_ENABLE_PIN 30
  407. #define SDPOWER 48
  408. #define SDSS 53
  409. #define LED_PIN 13
  410. #define PS_ON_PIN -1
  411. #define KILL_PIN -1
  412. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  413. #define HEATER_0_PIN 12 // RAMPS 1.0
  414. #define HEATER_BED_PIN -1 // RAMPS 1.0
  415. #define FAN_PIN 11 // RAMPS 1.0
  416. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  417. #define HEATER_0_PIN 10 // RAMPS 1.1
  418. #define HEATER_BED_PIN 8 // RAMPS 1.1
  419. #define FAN_PIN 9 // RAMPS 1.1
  420. #endif
  421. #define HEATER_1_PIN -1
  422. #define HEATER_2_PIN -1
  423. #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  424. #define TEMP_1_PIN -1
  425. #define TEMP_2_PIN -1
  426. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  427. #endif// MOTHERBOARD == 33 || MOTHERBOARD == 34
  428. // SPI for Max6675 Thermocouple
  429. #ifndef SDSUPPORT
  430. // these pins are defined in the SD library if building with SD support
  431. #define MAX_SCK_PIN 52
  432. #define MAX_MISO_PIN 50
  433. #define MAX_MOSI_PIN 51
  434. #define MAX6675_SS 53
  435. #else
  436. #define MAX6675_SS 49
  437. #endif
  438. #endif//MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34
  439. /****************************************************************************************
  440. * Duemilanove w/ ATMega328P pin assignment
  441. *
  442. ****************************************************************************************/
  443. #if MOTHERBOARD == 4
  444. #define KNOWN_BOARD 1
  445. #ifndef __AVR_ATmega328P__
  446. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  447. #endif
  448. #define X_STEP_PIN 19
  449. #define X_DIR_PIN 18
  450. #define X_ENABLE_PIN -1
  451. #define X_STOP_PIN 17
  452. #define Y_STEP_PIN 10
  453. #define Y_DIR_PIN 7
  454. #define Y_ENABLE_PIN -1
  455. #define Y_STOP_PIN 8
  456. #define Z_STEP_PIN 13
  457. #define Z_DIR_PIN 3
  458. #define Z_ENABLE_PIN 2
  459. #define Z_STOP_PIN 4
  460. #define E0_STEP_PIN 11
  461. #define E0_DIR_PIN 12
  462. #define E0_ENABLE_PIN -1
  463. #define SDPOWER -1
  464. #define SDSS -1
  465. #define LED_PIN -1
  466. #define FAN_PIN 5
  467. #define PS_ON_PIN -1
  468. #define KILL_PIN -1
  469. #define HEATER_0_PIN 6
  470. #define HEATER_1_PIN -1
  471. #define HEATER_2_PIN -1
  472. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  473. #define TEMP_1_PIN -1
  474. #define TEMP_2_PIN -1
  475. #define HEATER_BED_PIN -1
  476. #define TEMP_BED_PIN -1
  477. #endif
  478. /****************************************************************************************
  479. * Gen6 pin assignment
  480. *
  481. ****************************************************************************************/
  482. #if MOTHERBOARD == 5 || MOTHERBOARD == 51
  483. #define KNOWN_BOARD 1
  484. #ifndef __AVR_ATmega644P__
  485. #ifndef __AVR_ATmega1284P__
  486. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  487. #endif
  488. #endif
  489. //x axis pins
  490. #define X_STEP_PIN 15
  491. #define X_DIR_PIN 18
  492. #define X_ENABLE_PIN 19
  493. #define X_STOP_PIN 20
  494. //y axis pins
  495. #define Y_STEP_PIN 23
  496. #define Y_DIR_PIN 22
  497. #define Y_ENABLE_PIN 24
  498. #define Y_STOP_PIN 25
  499. //z axis pins
  500. #define Z_STEP_PIN 27
  501. #define Z_DIR_PIN 28
  502. #define Z_ENABLE_PIN 29
  503. #define Z_STOP_PIN 30
  504. //extruder pins
  505. #define E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  506. #define E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  507. #define E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  508. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  509. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  510. #define TEMP_2_PIN -1 //changed @ rkoeppl 20110410
  511. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  512. #define HEATER_1_PIN -1
  513. #define HEATER_2_PIN -1
  514. #if MOTHERBOARD == 5
  515. #define HEATER_BED_PIN -1 //changed @ rkoeppl 20110410
  516. #define TEMP_BED_PIN -1 //changed @ rkoeppl 20110410
  517. #else
  518. #define HEATER_BED_PIN 1 //changed @ rkoeppl 20110410
  519. #define TEMP_BED_PIN 0 //changed @ rkoeppl 20110410
  520. #endif
  521. #define SDPOWER -1
  522. #define SDSS 17
  523. #define LED_PIN -1 //changed @ rkoeppl 20110410
  524. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  525. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  526. #define KILL_PIN -1 //changed @ drakelive 20120830
  527. //our pin for debugging.
  528. #define DEBUG_PIN 0
  529. //our RS485 pins
  530. #define TX_ENABLE_PIN 12
  531. #define RX_ENABLE_PIN 13
  532. #endif
  533. /****************************************************************************************
  534. * Sanguinololu pin assignment
  535. *
  536. ****************************************************************************************/
  537. #if MOTHERBOARD == 64
  538. #define STB
  539. #endif
  540. #if MOTHERBOARD == 63
  541. #define MELZI
  542. #endif
  543. #if MOTHERBOARD == 62 || MOTHERBOARD == 63 || MOTHERBOARD == 64
  544. #undef MOTHERBOARD
  545. #define MOTHERBOARD 6
  546. #define SANGUINOLOLU_V_1_2
  547. #endif
  548. #if MOTHERBOARD == 6
  549. #define KNOWN_BOARD 1
  550. #ifndef __AVR_ATmega644P__
  551. #ifndef __AVR_ATmega1284P__
  552. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  553. #endif
  554. #endif
  555. #define X_STEP_PIN 15
  556. #define X_DIR_PIN 21
  557. #define X_STOP_PIN 18
  558. #define Y_STEP_PIN 22
  559. #define Y_DIR_PIN 23
  560. #define Y_STOP_PIN 19
  561. #define Z_STEP_PIN 3
  562. #define Z_DIR_PIN 2
  563. #define Z_STOP_PIN 20
  564. #define E0_STEP_PIN 1
  565. #define E0_DIR_PIN 0
  566. #define LED_PIN -1
  567. #define FAN_PIN -1
  568. #if FAN_PIN == 12 || FAN_PIN ==13
  569. #define FAN_SOFT_PWM
  570. #endif
  571. #ifdef MELZI
  572. #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. */
  573. #define FAN_PIN 4
  574. #endif
  575. #ifdef STB
  576. #define FAN_PIN 4
  577. #endif
  578. #define PS_ON_PIN -1
  579. #define KILL_PIN -1
  580. #define HEATER_0_PIN 13 // (extruder)
  581. #define HEATER_1_PIN -1
  582. #define HEATER_2_PIN -1
  583. #ifdef SANGUINOLOLU_V_1_2
  584. #define HEATER_BED_PIN 12 // (bed)
  585. #define X_ENABLE_PIN 14
  586. #define Y_ENABLE_PIN 14
  587. #define Z_ENABLE_PIN 26
  588. #define E0_ENABLE_PIN 14
  589. #else
  590. #define HEATER_BED_PIN 14 // (bed)
  591. #define X_ENABLE_PIN -1
  592. #define Y_ENABLE_PIN -1
  593. #define Z_ENABLE_PIN -1
  594. #define E0_ENABLE_PIN -1
  595. #endif
  596. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  597. #define TEMP_1_PIN -1
  598. #define TEMP_2_PIN -1
  599. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  600. #define SDPOWER -1
  601. #define SDSS 31
  602. /* 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. */
  603. //#define SDSS 24
  604. #ifdef ULTRA_LCD
  605. #ifdef NEWPANEL
  606. //we have no buzzer installed
  607. #define BEEPER -1
  608. //LCD Pins
  609. #ifdef DOGLCD
  610. // Pins for DOGM SPI LCD Support
  611. #define DOGLCD_A0 30
  612. #define DOGLCD_CS 29
  613. // GLCD features
  614. #define LCD_CONTRAST 1
  615. // Uncomment screen orientation
  616. // #define LCD_SCREEN_ROT_0
  617. // #define LCD_SCREEN_ROT_90
  618. #define LCD_SCREEN_ROT_180
  619. // #define LCD_SCREEN_ROT_270
  620. #else // standard Hitachi LCD controller
  621. #define LCD_PINS_RS 4
  622. #define LCD_PINS_ENABLE 17
  623. #define LCD_PINS_D4 30
  624. #define LCD_PINS_D5 29
  625. #define LCD_PINS_D6 28
  626. #define LCD_PINS_D7 27
  627. #endif
  628. //The encoder and click button
  629. #define BTN_EN1 11 //must be a hardware interrupt pin
  630. #define BTN_EN2 10 //must be hardware interrupt pin
  631. #define BTN_ENC 16 //the switch
  632. //not connected to a pin
  633. #define SDCARDDETECT -1
  634. //from the same bit in the RAMPS Newpanel define
  635. //encoder rotation values
  636. #define encrot0 0
  637. #define encrot1 2
  638. #define encrot2 3
  639. #define encrot3 1
  640. #define BLEN_C 2
  641. #define BLEN_B 1
  642. #define BLEN_A 0
  643. #endif //Newpanel
  644. #endif //Ultipanel
  645. #endif
  646. #if MOTHERBOARD == 7
  647. #define KNOWN_BOARD
  648. /*****************************************************************
  649. * Ultimaker pin assignment
  650. ******************************************************************/
  651. #ifndef __AVR_ATmega1280__
  652. #ifndef __AVR_ATmega2560__
  653. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  654. #endif
  655. #endif
  656. #define LARGE_FLASH true
  657. #define X_STEP_PIN 25
  658. #define X_DIR_PIN 23
  659. #define X_MIN_PIN 22
  660. #define X_MAX_PIN 24
  661. #define X_ENABLE_PIN 27
  662. #define Y_STEP_PIN 31
  663. #define Y_DIR_PIN 33
  664. #define Y_MIN_PIN 26
  665. #define Y_MAX_PIN 28
  666. #define Y_ENABLE_PIN 29
  667. #define Z_STEP_PIN 37
  668. #define Z_DIR_PIN 39
  669. #define Z_MIN_PIN 30
  670. #define Z_MAX_PIN 32
  671. #define Z_ENABLE_PIN 35
  672. #define HEATER_BED_PIN 4
  673. #define TEMP_BED_PIN 10
  674. #define HEATER_0_PIN 2
  675. #define TEMP_0_PIN 8
  676. #define HEATER_1_PIN 3
  677. #define TEMP_1_PIN 9
  678. #define HEATER_2_PIN -1
  679. #define TEMP_2_PIN -1
  680. #define E0_STEP_PIN 43
  681. #define E0_DIR_PIN 45
  682. #define E0_ENABLE_PIN 41
  683. #define E1_STEP_PIN 49
  684. #define E1_DIR_PIN 47
  685. #define E1_ENABLE_PIN 48
  686. #define SDPOWER -1
  687. #define SDSS 53
  688. #define LED_PIN 13
  689. #define FAN_PIN 7
  690. #define PS_ON_PIN 12
  691. #define KILL_PIN -1
  692. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  693. #ifdef ULTRA_LCD
  694. #ifdef NEWPANEL
  695. //arduino pin witch triggers an piezzo beeper
  696. #define BEEPER 18
  697. #define LCD_PINS_RS 20
  698. #define LCD_PINS_ENABLE 17
  699. #define LCD_PINS_D4 16
  700. #define LCD_PINS_D5 21
  701. #define LCD_PINS_D6 5
  702. #define LCD_PINS_D7 6
  703. //buttons are directly attached
  704. #define BTN_EN1 40
  705. #define BTN_EN2 42
  706. #define BTN_ENC 19 //the click
  707. #define BLEN_C 2
  708. #define BLEN_B 1
  709. #define BLEN_A 0
  710. #define SDCARDDETECT 38
  711. //encoder rotation values
  712. #define encrot0 0
  713. #define encrot1 2
  714. #define encrot2 3
  715. #define encrot3 1
  716. #else //old style panel with shift register
  717. //arduino pin witch triggers an piezzo beeper
  718. #define BEEPER 18
  719. //buttons are attached to a shift register
  720. #define SHIFT_CLK 38
  721. #define SHIFT_LD 42
  722. #define SHIFT_OUT 40
  723. #define SHIFT_EN 17
  724. #define LCD_PINS_RS 16
  725. #define LCD_PINS_ENABLE 5
  726. #define LCD_PINS_D4 6
  727. #define LCD_PINS_D5 21
  728. #define LCD_PINS_D6 20
  729. #define LCD_PINS_D7 19
  730. //encoder rotation values
  731. #ifndef ULTIMAKERCONTROLLER
  732. #define encrot0 0
  733. #define encrot1 2
  734. #define encrot2 3
  735. #define encrot3 1
  736. #else
  737. #define encrot0 0
  738. #define encrot1 1
  739. #define encrot2 3
  740. #define encrot3 2
  741. #endif
  742. #define SDCARDDETECT -1
  743. //bits in the shift register that carry the buttons for:
  744. // left up center down right red
  745. #define BL_LE 7
  746. #define BL_UP 6
  747. #define BL_MI 5
  748. #define BL_DW 4
  749. #define BL_RI 3
  750. #define BL_ST 2
  751. #define BLEN_B 1
  752. #define BLEN_A 0
  753. #endif
  754. #endif //ULTRA_LCD
  755. #endif
  756. #if MOTHERBOARD == 71
  757. #define KNOWN_BOARD
  758. /*****************************************************************
  759. * Ultimaker pin assignment (Old electronics)
  760. ******************************************************************/
  761. #ifndef __AVR_ATmega1280__
  762. #ifndef __AVR_ATmega2560__
  763. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  764. #endif
  765. #endif
  766. #define LARGE_FLASH true
  767. #define X_STEP_PIN 25
  768. #define X_DIR_PIN 23
  769. #define X_MIN_PIN 15
  770. #define X_MAX_PIN 14
  771. #define X_ENABLE_PIN 27
  772. #define Y_STEP_PIN 31
  773. #define Y_DIR_PIN 33
  774. #define Y_MIN_PIN 17
  775. #define Y_MAX_PIN 16
  776. #define Y_ENABLE_PIN 29
  777. #define Z_STEP_PIN 37
  778. #define Z_DIR_PIN 39
  779. #define Z_MIN_PIN 19
  780. #define Z_MAX_PIN 18
  781. #define Z_ENABLE_PIN 35
  782. #define HEATER_BED_PIN -1
  783. #define TEMP_BED_PIN -1
  784. #define HEATER_0_PIN 2
  785. #define TEMP_0_PIN 8
  786. #define HEATER_1_PIN 1
  787. #define TEMP_1_PIN 1
  788. #define HEATER_2_PIN -1
  789. #define TEMP_2_PIN -1
  790. #define E0_STEP_PIN 43
  791. #define E0_DIR_PIN 45
  792. #define E0_ENABLE_PIN 41
  793. #define E1_STEP_PIN -1
  794. #define E1_DIR_PIN -1
  795. #define E1_ENABLE_PIN -1
  796. #define SDPOWER -1
  797. #define SDSS -1
  798. #define LED_PIN -1
  799. #define FAN_PIN -1
  800. #define PS_ON_PIN -1
  801. #define KILL_PIN -1
  802. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  803. #define LCD_PINS_RS 24
  804. #define LCD_PINS_ENABLE 22
  805. #define LCD_PINS_D4 36
  806. #define LCD_PINS_D5 34
  807. #define LCD_PINS_D6 32
  808. #define LCD_PINS_D7 30
  809. #endif
  810. /****************************************************************************************
  811. * RUMBA pin assignment
  812. *
  813. ****************************************************************************************/
  814. #if MOTHERBOARD == 80
  815. #define KNOWN_BOARD 1
  816. #ifndef __AVR_ATmega2560__
  817. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  818. #endif
  819. #define X_STEP_PIN 17
  820. #define X_DIR_PIN 16
  821. #define X_ENABLE_PIN 48
  822. #define X_MIN_PIN 37
  823. #define X_MAX_PIN 36
  824. #define Y_STEP_PIN 54
  825. #define Y_DIR_PIN 47
  826. #define Y_ENABLE_PIN 55
  827. #define Y_MIN_PIN 35
  828. #define Y_MAX_PIN 34
  829. #define Z_STEP_PIN 57
  830. #define Z_DIR_PIN 56
  831. #define Z_ENABLE_PIN 62
  832. #define Z_MIN_PIN 33
  833. #define Z_MAX_PIN 32
  834. #define E0_STEP_PIN 23
  835. #define E0_DIR_PIN 22
  836. #define E0_ENABLE_PIN 24
  837. #define E1_STEP_PIN 26
  838. #define E1_DIR_PIN 25
  839. #define E1_ENABLE_PIN 27
  840. #define E2_STEP_PIN 29
  841. #define E2_DIR_PIN 28
  842. #define E2_ENABLE_PIN 39
  843. #define LED_PIN 13
  844. #define FAN_PIN 7
  845. //additional FAN1 PIN (e.g. useful for electronics fan or light on/off) on PIN 8
  846. #define PS_ON_PIN 45
  847. #define KILL_PIN 46
  848. #define HEATER_0_PIN 2 // EXTRUDER 1
  849. #define HEATER_1_PIN 3 // EXTRUDER 2
  850. #define HEATER_2_PIN 6 // EXTRUDER 3
  851. //optional FAN1 can be used as 4th heater output: #define HEATER_3_PIN 8 // EXTRUDER 4
  852. #define HEATER_BED_PIN 9 // BED
  853. #define TEMP_0_PIN 15 // ANALOG NUMBERING
  854. #define TEMP_1_PIN 14 // ANALOG NUMBERING
  855. #define TEMP_2_PIN 13 // ANALOG NUMBERING
  856. //optional for extruder 4 or chamber: #define TEMP_2_PIN 12 // ANALOG NUMBERING
  857. #define TEMP_BED_PIN 11 // ANALOG NUMBERING
  858. #define SDPOWER -1
  859. #define SDSS 53
  860. #define SDCARDDETECT 49
  861. #define BEEPER 44
  862. #define LCD_PINS_RS 19
  863. #define LCD_PINS_ENABLE 42
  864. #define LCD_PINS_D4 18
  865. #define LCD_PINS_D5 38
  866. #define LCD_PINS_D6 41
  867. #define LCD_PINS_D7 40
  868. #define BTN_EN1 11
  869. #define BTN_EN2 12
  870. #define BTN_ENC 43
  871. //encoder rotation values
  872. #define BLEN_C 2
  873. #define BLEN_B 1
  874. #define BLEN_A 0
  875. #define encrot0 0
  876. #define encrot1 2
  877. #define encrot2 3
  878. #define encrot3 1
  879. #endif //MOTHERBOARD==80
  880. /****************************************************************************************
  881. * Teensylu 0.7 / Printrboard pin assignments (AT90USB1286)
  882. * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
  883. http://www.pjrc.com/teensy/teensyduino.html
  884. * See http://reprap.org/wiki/Printrboard for more info
  885. ****************************************************************************************/
  886. #if MOTHERBOARD == 8 || MOTHERBOARD == 81
  887. #define KNOWN_BOARD 1
  888. #define AT90USB 1286 // Disable MarlinSerial etc.
  889. #ifndef __AVR_AT90USB1286__
  890. #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
  891. #endif
  892. #define LARGE_FLASH true
  893. #define X_STEP_PIN 0
  894. #define X_DIR_PIN 1
  895. #define X_ENABLE_PIN 39
  896. #define Y_STEP_PIN 2
  897. #define Y_DIR_PIN 3
  898. #define Y_ENABLE_PIN 38
  899. #define Z_STEP_PIN 4
  900. #define Z_DIR_PIN 5
  901. #define Z_ENABLE_PIN 23
  902. #define E0_STEP_PIN 6
  903. #define E0_DIR_PIN 7
  904. #define E0_ENABLE_PIN 19
  905. #define HEATER_0_PIN 21 // Extruder
  906. #define HEATER_1_PIN -1
  907. #define HEATER_2_PIN -1
  908. #define HEATER_BED_PIN 20 // Bed
  909. #define FAN_PIN 22 // Fan
  910. // You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h
  911. // for the fan and Teensyduino uses a different pin mapping.
  912. #if MOTHERBOARD == 8 // Teensylu
  913. #define X_STOP_PIN 13
  914. #define Y_STOP_PIN 14
  915. #define Z_STOP_PIN 15
  916. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  917. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  918. #else // Printrboard
  919. #define X_STOP_PIN 35
  920. #define Y_STOP_PIN 8
  921. #define Z_STOP_PIN 36
  922. #define TEMP_0_PIN 1 // Extruder / Analog pin numbering
  923. #define TEMP_BED_PIN 0 // Bed / Analog pin numbering
  924. #endif
  925. #define TEMP_1_PIN -1
  926. #define TEMP_2_PIN -1
  927. #define SDPOWER -1
  928. #define SDSS 8
  929. #define LED_PIN -1
  930. #define PS_ON_PIN -1
  931. #define KILL_PIN -1
  932. #define ALARM_PIN -1
  933. #ifndef SDSUPPORT
  934. // these pins are defined in the SD library if building with SD support
  935. #define SCK_PIN 9
  936. #define MISO_PIN 11
  937. #define MOSI_PIN 10
  938. #endif
  939. #endif // MOTHERBOARD == 8 (Teensylu) or 81 (Printrboard)
  940. /****************************************************************************************
  941. * Brainwave 1.0 pin assignments (AT90USB646)
  942. * Requires hardware bundle for Arduino:
  943. https://github.com/unrepentantgeek/brainwave-arduino
  944. ****************************************************************************************/
  945. #if MOTHERBOARD == 82
  946. #define KNOWN_BOARD 1
  947. #define AT90USB 646 // Disable MarlinSerial etc.
  948. #ifndef __AVR_AT90USB646__
  949. #error Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu.
  950. #endif
  951. #define X_STEP_PIN 27
  952. #define X_DIR_PIN 29
  953. #define X_ENABLE_PIN 28
  954. #define X_STOP_PIN 7
  955. #define X_ATT_PIN 26
  956. #define Y_STEP_PIN 31
  957. #define Y_DIR_PIN 33
  958. #define Y_ENABLE_PIN 32
  959. #define Y_STOP_PIN 6
  960. #define Y_ATT_PIN 30
  961. #define Z_STEP_PIN 17
  962. #define Z_DIR_PIN 19
  963. #define Z_ENABLE_PIN 18
  964. #define Z_STOP_PIN 5
  965. #define Z_ATT_PIN 16
  966. #define E0_STEP_PIN 21
  967. #define E0_DIR_PIN 23
  968. #define E0_ENABLE_PIN 22
  969. #define E0_ATT_PIN 20
  970. #define HEATER_0_PIN 4 // Extruder
  971. #define HEATER_1_PIN -1
  972. #define HEATER_2_PIN -1
  973. #define HEATER_BED_PIN 38 // Bed
  974. #define FAN_PIN 3 // Fan
  975. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  976. #define TEMP_1_PIN -1
  977. #define TEMP_2_PIN -1
  978. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  979. #define SDPOWER -1
  980. #define SDSS -1
  981. #define LED_PIN 39
  982. #define PS_ON_PIN -1
  983. #define KILL_PIN -1
  984. #define ALARM_PIN -1
  985. #ifndef SDSUPPORT
  986. // these pins are defined in the SD library if building with SD support
  987. #define SCK_PIN 9
  988. #define MISO_PIN 11
  989. #define MOSI_PIN 10
  990. #endif
  991. #endif // MOTHERBOARD == 82 (Brainwave)
  992. /****************************************************************************************
  993. * Gen3+ pin assignment
  994. *
  995. ****************************************************************************************/
  996. #if MOTHERBOARD == 9
  997. #define MOTHERBOARD 6 /*TODO: Figure out, Why is this done?*/
  998. #define KNOWN_BOARD 1
  999. #ifndef __AVR_ATmega644P__
  1000. #ifndef __AVR_ATmega1284P__
  1001. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  1002. #endif
  1003. #endif
  1004. #define X_STEP_PIN 15
  1005. #define X_DIR_PIN 18
  1006. #define X_STOP_PIN 20
  1007. #define Y_STEP_PIN 23
  1008. #define Y_DIR_PIN 22
  1009. #define Y_STOP_PIN 25
  1010. #define Z_STEP_PIN 27
  1011. #define Z_DIR_PIN 28
  1012. #define Z_STOP_PIN 30
  1013. #define E_STEP_PIN 17
  1014. #define E_DIR_PIN 21
  1015. #define LED_PIN -1
  1016. #define FAN_PIN -1
  1017. #define PS_ON_PIN 14
  1018. #define KILL_PIN -1
  1019. #define HEATER_0_PIN 12 // (extruder)
  1020. #define HEATER_1_PIN 16 // (bed)
  1021. #define X_ENABLE_PIN 19
  1022. #define Y_ENABLE_PIN 24
  1023. #define Z_ENABLE_PIN 29
  1024. #define E_ENABLE_PIN 13
  1025. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  1026. #define TEMP_1_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  1027. #define TEMP_2_PIN -1
  1028. #define SDPOWER -1
  1029. #define SDSS 4
  1030. #define HEATER_2_PIN -1
  1031. #endif
  1032. /****************************************************************************************
  1033. * Open Motion controller with enable based extruders
  1034. *
  1035. * ATMega644
  1036. *
  1037. * +---\/---+
  1038. * (D 0) PB0 1| |40 PA0 (AI 0 / D31)
  1039. * (D 1) PB1 2| |39 PA1 (AI 1 / D30)
  1040. * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
  1041. * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
  1042. * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
  1043. * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
  1044. * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
  1045. * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
  1046. * RST 9| |32 AREF
  1047. * VCC 10| |31 GND
  1048. * GND 11| |30 AVCC
  1049. * XTAL2 12| |29 PC7 (D 23)
  1050. * XTAL1 13| |28 PC6 (D 22)
  1051. * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
  1052. * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
  1053. * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
  1054. * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
  1055. * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
  1056. * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
  1057. * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
  1058. * +--------+
  1059. *
  1060. ****************************************************************************************/
  1061. #if MOTHERBOARD == 90 //Alpha OMCA board
  1062. #define KNOWN_BOARD 1
  1063. #ifndef __AVR_ATmega644__
  1064. #error Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu.
  1065. #endif
  1066. #define X_STEP_PIN 21
  1067. #define X_DIR_PIN 20
  1068. #define X_ENABLE_PIN 24
  1069. #define X_STOP_PIN 0
  1070. #define Y_STEP_PIN 23
  1071. #define Y_DIR_PIN 22
  1072. #define Y_ENABLE_PIN 24
  1073. #define Y_STOP_PIN 1
  1074. #define Z_STEP_PIN 26
  1075. #define Z_DIR_PIN 25
  1076. #define Z_ENABLE_PIN 24
  1077. #define Z_STOP_PIN 2
  1078. #define E0_STEP_PIN 28
  1079. #define E0_DIR_PIN 27
  1080. #define E0_ENABLE_PIN 24
  1081. #define E1_STEP_PIN -1 // 19
  1082. #define E1_DIR_PIN -1 // 18
  1083. #define E1_ENABLE_PIN 24
  1084. #define E2_STEP_PIN -1 // 17
  1085. #define E2_DIR_PIN -1 // 16
  1086. #define E2_ENABLE_PIN 24
  1087. #define SDPOWER -1
  1088. #define SDSS 11
  1089. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1090. #define LED_PIN -1
  1091. #define FAN_PIN 3
  1092. #define PS_ON_PIN -1
  1093. #define KILL_PIN -1
  1094. #define HEATER_0_PIN 4
  1095. #define HEATER_1_PIN -1 // 12
  1096. #define HEATER_2_PIN -1 // 13
  1097. #define TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  1098. #define TEMP_1_PIN -1 // 1
  1099. #define TEMP_2_PIN -1 // 2
  1100. #define HEATER_BED_PIN -1 // 14/15
  1101. #define TEMP_BED_PIN -1 // 1,2 or I2C
  1102. /* 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) */
  1103. #endif
  1104. #if MOTHERBOARD == 91 // Final OMCA board -- REF http://sanguino.cc/hardware
  1105. #define KNOWN_BOARD 1
  1106. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
  1107. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)
  1108. #endif
  1109. #define X_STEP_PIN 26
  1110. #define X_DIR_PIN 25
  1111. #define X_ENABLE_PIN 10
  1112. #define X_STOP_PIN 0
  1113. #define Y_STEP_PIN 28
  1114. #define Y_DIR_PIN 27
  1115. #define Y_ENABLE_PIN 10
  1116. #define Y_STOP_PIN 1
  1117. #define Z_STEP_PIN 23
  1118. #define Z_DIR_PIN 22
  1119. #define Z_ENABLE_PIN 10
  1120. #define Z_STOP_PIN 2
  1121. #define E0_STEP_PIN 24
  1122. #define E0_DIR_PIN 21
  1123. #define E0_ENABLE_PIN 10
  1124. /* future proofing */
  1125. #define __FS 20
  1126. #define __FD 19
  1127. #define __GS 18
  1128. #define __GD 13
  1129. #define UNUSED_PWM 14 /* PWM on LEFT connector */
  1130. #define E1_STEP_PIN -1 // 21
  1131. #define E1_DIR_PIN -1 // 20
  1132. #define E1_ENABLE_PIN -1 // 19
  1133. #define E2_STEP_PIN -1 // 21
  1134. #define E2_DIR_PIN -1 // 20
  1135. #define E2_ENABLE_PIN -1 // 18
  1136. #define SDPOWER -1
  1137. #define SDSS 11
  1138. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1139. #define LED_PIN -1
  1140. #define FAN_PIN 14 /* PWM on MIDDLE connector */
  1141. #define PS_ON_PIN -1
  1142. #define KILL_PIN -1
  1143. #define HEATER_0_PIN 3 /*DONE PWM on RIGHT connector */
  1144. #define HEATER_1_PIN -1
  1145. #define HEATER_2_PIN -1
  1146. #define HEATER_1_PIN -1
  1147. #define HEATER_2_PIN -1
  1148. #define TEMP_0_PIN 0 // ANALOG INPUT NUMBERING
  1149. #define TEMP_1_PIN 1 // ANALOG
  1150. #define TEMP_2_PIN -1 // 2
  1151. #define HEATER_BED_PIN 4
  1152. #define TEMP_BED_PIN 2 // 1,2 or I2C
  1153. #define I2C_SCL 16
  1154. #define I2C_SDA 17
  1155. #endif
  1156. #if MOTHERBOARD == 301
  1157. #define KNOWN_BOARD
  1158. /*****************************************************************
  1159. * Rambo Pin Assignments
  1160. ******************************************************************/
  1161. #ifndef __AVR_ATmega2560__
  1162. #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
  1163. #endif
  1164. #define LARGE_FLASH true
  1165. #define X_STEP_PIN 37
  1166. #define X_DIR_PIN 48
  1167. #define X_MIN_PIN 12
  1168. #define X_MAX_PIN 24
  1169. #define X_ENABLE_PIN 29
  1170. #define X_MS1_PIN 40
  1171. #define X_MS2_PIN 41
  1172. #define Y_STEP_PIN 36
  1173. #define Y_DIR_PIN 49
  1174. #define Y_MIN_PIN 11
  1175. #define Y_MAX_PIN 23
  1176. #define Y_ENABLE_PIN 28
  1177. #define Y_MS1_PIN 69
  1178. #define Y_MS2_PIN 39
  1179. #define Z_STEP_PIN 35
  1180. #define Z_DIR_PIN 47
  1181. #define Z_MIN_PIN 10
  1182. #define Z_MAX_PIN 30
  1183. #define Z_ENABLE_PIN 27
  1184. #define Z_MS1_PIN 68
  1185. #define Z_MS2_PIN 67
  1186. #define HEATER_BED_PIN 3
  1187. #define TEMP_BED_PIN 2
  1188. #define HEATER_0_PIN 9
  1189. #define TEMP_0_PIN 0
  1190. #define HEATER_1_PIN 7
  1191. #define TEMP_1_PIN 1
  1192. #define HEATER_2_PIN -1
  1193. #define TEMP_2_PIN -1
  1194. #define E0_STEP_PIN 34
  1195. #define E0_DIR_PIN 43
  1196. #define E0_ENABLE_PIN 26
  1197. #define E0_MS1_PIN 65
  1198. #define E0_MS2_PIN 66
  1199. #define E1_STEP_PIN 33
  1200. #define E1_DIR_PIN 42
  1201. #define E1_ENABLE_PIN 25
  1202. #define E1_MS1_PIN 63
  1203. #define E1_MS2_PIN 64
  1204. #define DIGIPOTSS_PIN 38
  1205. #define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping
  1206. #define SDPOWER -1
  1207. #define SDSS 53
  1208. #define LED_PIN 13
  1209. #define FAN_PIN 8
  1210. #define PS_ON_PIN 4
  1211. #define KILL_PIN -1
  1212. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  1213. #endif
  1214. /****************************************************************************************
  1215. * MegaTronics
  1216. *
  1217. ****************************************************************************************/
  1218. #if MOTHERBOARD == 70
  1219. #define KNOWN_BOARD 1
  1220. //////////////////FIX THIS//////////////
  1221. #ifndef __AVR_ATmega2560__
  1222. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1223. #endif
  1224. #define LARGE_FLASH true
  1225. #define X_STEP_PIN 26
  1226. #define X_DIR_PIN 28
  1227. #define X_ENABLE_PIN 24
  1228. #define X_MIN_PIN 41
  1229. #define X_MAX_PIN 37
  1230. #define Y_STEP_PIN 60 // A6
  1231. #define Y_DIR_PIN 61 // A7
  1232. #define Y_ENABLE_PIN 22
  1233. #define Y_MIN_PIN 14
  1234. #define Y_MAX_PIN 15
  1235. #define Z_STEP_PIN 54 // A0
  1236. #define Z_DIR_PIN 55 // A1
  1237. #define Z_ENABLE_PIN 56 // A2
  1238. #define Z_MIN_PIN 18
  1239. #define Z_MAX_PIN 19
  1240. #define E0_STEP_PIN 31
  1241. #define E0_DIR_PIN 32
  1242. #define E0_ENABLE_PIN 38
  1243. #define E1_STEP_PIN 34
  1244. #define E1_DIR_PIN 36
  1245. #define E1_ENABLE_PIN 30
  1246. #define SDPOWER -1
  1247. #define SDSS 53
  1248. #define LED_PIN 13
  1249. #define FAN_PIN 7 // IO pin. Buffer needed
  1250. #define PS_ON_PIN 12
  1251. #define KILL_PIN -1
  1252. #define HEATER_0_PIN 9 // EXTRUDER 1
  1253. #define HEATER_1_PIN 8 // EXTRUDER 2 (FAN On Sprinter)
  1254. #define HEATER_2_PIN -1
  1255. #if TEMP_SENSOR_0 == -1
  1256. #define TEMP_0_PIN 8 // ANALOG NUMBERING
  1257. #else
  1258. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  1259. #endif
  1260. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  1261. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  1262. #define HEATER_BED_PIN 10 // BED
  1263. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  1264. #define BEEPER 33 // Beeper on AUX-4
  1265. #ifdef ULTRA_LCD
  1266. #ifdef NEWPANEL
  1267. //arduino pin which triggers an piezzo beeper
  1268. #define LCD_PINS_RS 16
  1269. #define LCD_PINS_ENABLE 17
  1270. #define LCD_PINS_D4 23
  1271. #define LCD_PINS_D5 25
  1272. #define LCD_PINS_D6 27
  1273. #define LCD_PINS_D7 29
  1274. //buttons are directly attached using AUX-2
  1275. #define BTN_EN1 59
  1276. #define BTN_EN2 64
  1277. #define BTN_ENC 43 //the click
  1278. #define BLEN_C 2
  1279. #define BLEN_B 1
  1280. #define BLEN_A 0
  1281. #define SDCARDDETECT -1 // Ramps does not use this port
  1282. //encoder rotation values
  1283. #define encrot0 0
  1284. #define encrot1 2
  1285. #define encrot2 3
  1286. #define encrot3 1
  1287. #endif
  1288. #endif //ULTRA_LCD
  1289. #endif
  1290. #ifndef KNOWN_BOARD
  1291. #error Unknown MOTHERBOARD value in configuration.h
  1292. #endif
  1293. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  1294. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,
  1295. #if EXTRUDERS > 1
  1296. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
  1297. #else
  1298. #define _E1_PINS
  1299. #endif
  1300. #if EXTRUDERS > 2
  1301. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,
  1302. #else
  1303. #define _E2_PINS
  1304. #endif
  1305. #ifdef X_STOP_PIN
  1306. #if X_HOME_DIR < 0
  1307. #define X_MIN_PIN X_STOP_PIN
  1308. #define X_MAX_PIN -1
  1309. #else
  1310. #define X_MIN_PIN -1
  1311. #define X_MAX_PIN X_STOP_PIN
  1312. #endif
  1313. #endif
  1314. #ifdef Y_STOP_PIN
  1315. #if Y_HOME_DIR < 0
  1316. #define Y_MIN_PIN Y_STOP_PIN
  1317. #define Y_MAX_PIN -1
  1318. #else
  1319. #define Y_MIN_PIN -1
  1320. #define Y_MAX_PIN Y_STOP_PIN
  1321. #endif
  1322. #endif
  1323. #ifdef Z_STOP_PIN
  1324. #if Z_HOME_DIR < 0
  1325. #define Z_MIN_PIN Z_STOP_PIN
  1326. #define Z_MAX_PIN -1
  1327. #else
  1328. #define Z_MIN_PIN -1
  1329. #define Z_MAX_PIN Z_STOP_PIN
  1330. #endif
  1331. #endif
  1332. #ifdef DISABLE_MAX_ENDSTOPS
  1333. #define X_MAX_PIN -1
  1334. #define Y_MAX_PIN -1
  1335. #define Z_MAX_PIN -1
  1336. #endif
  1337. #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, \
  1338. HEATER_BED_PIN, FAN_PIN, \
  1339. _E0_PINS _E1_PINS _E2_PINS \
  1340. analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
  1341. #endif