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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596
  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. * Sethi 3D_1 pin assignment - www.sethi3d.com.br
  48. *
  49. ****************************************************************************************/
  50. #if MOTHERBOARD == 20
  51. #define KNOWN_BOARD
  52. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  53. #error Oops! Make sure you have 'Sethi 3D' selected from the 'Tools -> Boards' menu.
  54. #endif
  55. #ifndef GEN7_VERSION
  56. #define GEN7_VERSION 12 // v1.x
  57. #endif
  58. //x axis pins
  59. #define X_STEP_PIN 19
  60. #define X_DIR_PIN 18
  61. #define X_ENABLE_PIN 24
  62. #define X_STOP_PIN 2
  63. //y axis pins
  64. #define Y_STEP_PIN 23
  65. #define Y_DIR_PIN 22
  66. #define Y_ENABLE_PIN 24
  67. #define Y_STOP_PIN 0
  68. //z axis pins
  69. #define Z_STEP_PIN 26
  70. #define Z_DIR_PIN 25
  71. #define Z_ENABLE_PIN 24
  72. #define Z_MIN_PIN 1
  73. #define Z_MAX_PIN 0
  74. //extruder pins
  75. #define E0_STEP_PIN 28
  76. #define E0_DIR_PIN 27
  77. #define E0_ENABLE_PIN 24
  78. #define TEMP_0_PIN 1
  79. #define TEMP_1_PIN -1
  80. #define TEMP_2_PIN -1
  81. #define TEMP_BED_PIN 2
  82. #define HEATER_0_PIN 4
  83. #define HEATER_1_PIN -1
  84. #define HEATER_2_PIN -1
  85. #define HEATER_BED_PIN 3
  86. #define KILL_PIN -1
  87. #define SDPOWER -1
  88. #define SDSS -1 // SCL pin of I2C header
  89. #define LED_PIN -1
  90. #if (GEN7_VERSION >= 13)
  91. // Gen7 v1.3 removed the fan pin
  92. #define FAN_PIN -1
  93. #else
  94. #define FAN_PIN 31
  95. #endif
  96. #define PS_ON_PIN 15
  97. //All these generations of Gen7 supply thermistor power
  98. //via PS_ON, so ignore bad thermistor readings
  99. #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  100. //our pin for debugging.
  101. #define DEBUG_PIN 0
  102. //our RS485 pins
  103. #define TX_ENABLE_PIN 12
  104. #define RX_ENABLE_PIN 13
  105. #endif
  106. /****************************************************************************************
  107. * Gen7 v1.1, v1.2, v1.3 pin assignment
  108. *
  109. ****************************************************************************************/
  110. #if MOTHERBOARD == 12
  111. #define MOTHERBOARD 11
  112. #define GEN7_VERSION 13 // v1.3
  113. #endif
  114. #if MOTHERBOARD == 11
  115. #define KNOWN_BOARD
  116. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  117. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  118. #endif
  119. #ifndef GEN7_VERSION
  120. #define GEN7_VERSION 12 // v1.x
  121. #endif
  122. //x axis pins
  123. #define X_STEP_PIN 19
  124. #define X_DIR_PIN 18
  125. #define X_ENABLE_PIN 24
  126. #define X_STOP_PIN 7
  127. //y axis pins
  128. #define Y_STEP_PIN 23
  129. #define Y_DIR_PIN 22
  130. #define Y_ENABLE_PIN 24
  131. #define Y_STOP_PIN 5
  132. //z axis pins
  133. #define Z_STEP_PIN 26
  134. #define Z_DIR_PIN 25
  135. #define Z_ENABLE_PIN 24
  136. #define Z_MIN_PIN 1
  137. #define Z_MAX_PIN 0
  138. //extruder pins
  139. #define E0_STEP_PIN 28
  140. #define E0_DIR_PIN 27
  141. #define E0_ENABLE_PIN 24
  142. #define TEMP_0_PIN 1
  143. #define TEMP_1_PIN -1
  144. #define TEMP_2_PIN -1
  145. #define TEMP_BED_PIN 2
  146. #define HEATER_0_PIN 4
  147. #define HEATER_1_PIN -1
  148. #define HEATER_2_PIN -1
  149. #define HEATER_BED_PIN 3
  150. #define KILL_PIN -1
  151. #define SDPOWER -1
  152. #define SDSS -1 // SCL pin of I2C header
  153. #define LED_PIN -1
  154. #if (GEN7_VERSION >= 13)
  155. // Gen7 v1.3 removed the fan pin
  156. #define FAN_PIN -1
  157. #else
  158. #define FAN_PIN 31
  159. #endif
  160. #define PS_ON_PIN 15
  161. //All these generations of Gen7 supply thermistor power
  162. //via PS_ON, so ignore bad thermistor readings
  163. #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  164. //our pin for debugging.
  165. #define DEBUG_PIN 0
  166. //our RS485 pins
  167. #define TX_ENABLE_PIN 12
  168. #define RX_ENABLE_PIN 13
  169. #endif
  170. /****************************************************************************************
  171. * Gen7 v1.4 pin assignment
  172. *
  173. ****************************************************************************************/
  174. #if MOTHERBOARD == 13
  175. #define GEN7_VERSION 14 // v1.4
  176. #endif
  177. #if MOTHERBOARD == 13
  178. #define KNOWN_BOARD
  179. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  180. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  181. #endif
  182. #ifndef GEN7_VERSION
  183. #define GEN7_VERSION 14 // v1.x
  184. #endif
  185. //x axis pins
  186. #define X_STEP_PIN 29
  187. #define X_DIR_PIN 28
  188. #define X_ENABLE_PIN 25
  189. #define X_STOP_PIN 0
  190. //y axis pins
  191. #define Y_STEP_PIN 27
  192. #define Y_DIR_PIN 26
  193. #define Y_ENABLE_PIN 25
  194. #define Y_STOP_PIN 1
  195. //z axis pins
  196. #define Z_STEP_PIN 23
  197. #define Z_DIR_PIN 22
  198. #define Z_ENABLE_PIN 25
  199. #define Z_STOP_PIN 2
  200. //extruder pins
  201. #define E0_STEP_PIN 19
  202. #define E0_DIR_PIN 18
  203. #define E0_ENABLE_PIN 25
  204. #define TEMP_0_PIN 1
  205. #define TEMP_1_PIN -1
  206. #define TEMP_2_PIN -1
  207. #define TEMP_BED_PIN 0
  208. #define HEATER_0_PIN 4
  209. #define HEATER_1_PIN -1
  210. #define HEATER_2_PIN -1
  211. #define HEATER_BED_PIN 3
  212. #define KILL_PIN -1
  213. #define SDPOWER -1
  214. #define SDSS -1 // SCL pin of I2C header
  215. #define LED_PIN -1
  216. #define FAN_PIN -1
  217. #define PS_ON_PIN 15
  218. //our pin for debugging.
  219. #define DEBUG_PIN 0
  220. //our RS485 pins
  221. #define TX_ENABLE_PIN 12
  222. #define RX_ENABLE_PIN 13
  223. #endif
  224. /*******************************************************************************
  225. *********
  226. * Gen7 Alfons3 pin assignment
  227. *
  228. ********************************************************************************
  229. ********/
  230. /* These Pins are assigned for the modified GEN7 Board from Alfons3 Please review the pins and adjust it for your needs*/
  231. #if MOTHERBOARD == 10
  232. #define KNOWN_BOARD
  233. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  234. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  235. #endif
  236. //x axis pins
  237. #define X_STEP_PIN 21 // different from standard GEN7
  238. #define X_DIR_PIN 20 // different from standard GEN7
  239. #define X_ENABLE_PIN 24
  240. #define X_STOP_PIN 0
  241. //y axis pins
  242. #define Y_STEP_PIN 23
  243. #define Y_DIR_PIN 22
  244. #define Y_ENABLE_PIN 24
  245. #define Y_STOP_PIN 1
  246. //z axis pins
  247. #define Z_STEP_PIN 26
  248. #define Z_DIR_PIN 25
  249. #define Z_ENABLE_PIN 24
  250. #define Z_STOP_PIN 2
  251. //extruder pins
  252. #define E0_STEP_PIN 28
  253. #define E0_DIR_PIN 27
  254. #define E0_ENABLE_PIN 24
  255. #define TEMP_0_PIN 2
  256. #define TEMP_1_PIN -1
  257. #define TEMP_2_PIN -1
  258. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  259. #define HEATER_0_PIN 4
  260. #define HEATER_1_PIN -1
  261. #define HEATER_2_PIN -1
  262. #define HEATER_BED_PIN 3 // (bed)
  263. #define SDPOWER -1
  264. #define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support
  265. #define LED_PIN -1
  266. #define FAN_PIN -1
  267. #define PS_ON_PIN 19
  268. //our pin for debugging.
  269. #define DEBUG_PIN -1
  270. //our RS485 pins
  271. //#define TX_ENABLE_PIN 12
  272. //#define RX_ENABLE_PIN 13
  273. #define BEEPER -1
  274. #define SDCARDDETECT -1
  275. #define SUICIDE_PIN -1 //has to be defined; otherwise Power_off doesn't work
  276. #define KILL_PIN -1
  277. //Pins for 4bit LCD Support
  278. #define LCD_PINS_RS 18
  279. #define LCD_PINS_ENABLE 17
  280. #define LCD_PINS_D4 16
  281. #define LCD_PINS_D5 15
  282. #define LCD_PINS_D6 13
  283. #define LCD_PINS_D7 14
  284. //buttons are directly attached
  285. #define BTN_EN1 11
  286. #define BTN_EN2 10
  287. #define BTN_ENC 12 //the click
  288. #endif
  289. /****************************************************************************************
  290. * Arduino Mega pin assignment
  291. *
  292. ****************************************************************************************/
  293. #if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
  294. #define KNOWN_BOARD 1
  295. //////////////////FIX THIS//////////////
  296. #ifndef __AVR_ATmega1280__
  297. #ifndef __AVR_ATmega2560__
  298. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  299. #endif
  300. #endif
  301. // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
  302. // #define RAMPS_V_1_3
  303. // #define RAMPS_V_1_0
  304. #if MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
  305. #define LARGE_FLASH true
  306. #if MOTHERBOARD == 77
  307. #define X_STEP_PIN 54
  308. #define X_DIR_PIN 55
  309. #define X_ENABLE_PIN 38
  310. #define X_MIN_PIN 3
  311. #define X_MAX_PIN -1 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  312. #define Y_STEP_PIN 60
  313. #define Y_DIR_PIN 61
  314. #define Y_ENABLE_PIN 56
  315. #define Y_MIN_PIN 14
  316. #define Y_MAX_PIN -1 //15
  317. #define Z_STEP_PIN 46
  318. #define Z_DIR_PIN 48
  319. #define Z_ENABLE_PIN 63
  320. #define Z_MIN_PIN 18
  321. #define Z_MAX_PIN -1
  322. #define Y2_STEP_PIN 36
  323. #define Y2_DIR_PIN 34
  324. #define Y2_ENABLE_PIN 30
  325. #define Z2_STEP_PIN 36
  326. #define Z2_DIR_PIN 34
  327. #define Z2_ENABLE_PIN 30
  328. #define E0_STEP_PIN 26
  329. #define E0_DIR_PIN 28
  330. #define E0_ENABLE_PIN 24
  331. #define E1_STEP_PIN 36
  332. #define E1_DIR_PIN 34
  333. #define E1_ENABLE_PIN 30
  334. #define SDPOWER -1
  335. #define SDSS 25//53
  336. #define LED_PIN 13
  337. #define BEEPER 33
  338. #else
  339. #define X_STEP_PIN 54
  340. #define X_DIR_PIN 55
  341. #define X_ENABLE_PIN 38
  342. #define X_MIN_PIN 3
  343. #define X_MAX_PIN 2
  344. #define Y_STEP_PIN 60
  345. #define Y_DIR_PIN 61
  346. #define Y_ENABLE_PIN 56
  347. #define Y_MIN_PIN 14
  348. #define Y_MAX_PIN 15
  349. #define Z_STEP_PIN 46
  350. #define Z_DIR_PIN 48
  351. #define Z_ENABLE_PIN 62
  352. #define Z_MIN_PIN 18
  353. #define Z_MAX_PIN 19
  354. #define Y2_STEP_PIN 36
  355. #define Y2_DIR_PIN 34
  356. #define Y2_ENABLE_PIN 30
  357. #define Z2_STEP_PIN 36
  358. #define Z2_DIR_PIN 34
  359. #define Z2_ENABLE_PIN 30
  360. #define E0_STEP_PIN 26
  361. #define E0_DIR_PIN 28
  362. #define E0_ENABLE_PIN 24
  363. #define E1_STEP_PIN 36
  364. #define E1_DIR_PIN 34
  365. #define E1_ENABLE_PIN 30
  366. #if MOTHERBOARD == 68
  367. #define E2_STEP_PIN 23
  368. #define E2_DIR_PIN 25
  369. #define E2_ENABLE_PIN 40
  370. #define E3_STEP_PIN 27
  371. #define E3_DIR_PIN 29
  372. #define E3_ENABLE_PIN 41
  373. #define E4_STEP_PIN 43
  374. #define E4_DIR_PIN 37
  375. #define E4_ENABLE_PIN 42
  376. #endif
  377. #define SDPOWER -1
  378. #define SDSS 53
  379. #define LED_PIN 13
  380. #endif
  381. #if MOTHERBOARD == 33 || MOTHERBOARD == 35 || MOTHERBOARD == 67 || MOTHERBOARD == 68
  382. #define FAN_PIN 9 // (Sprinter config)
  383. #else
  384. #define FAN_PIN 4 // IO pin. Buffer needed
  385. #endif
  386. #if MOTHERBOARD == 77
  387. #define FAN_PIN 8
  388. #endif
  389. #if MOTHERBOARD == 35
  390. #define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller
  391. #endif
  392. #define PS_ON_PIN 12
  393. #if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
  394. #define KILL_PIN 41
  395. #else
  396. #define KILL_PIN -1
  397. #endif
  398. #if MOTHERBOARD == 35
  399. #define HEATER_0_PIN 8
  400. #else
  401. #define HEATER_0_PIN 10 // EXTRUDER 1
  402. #endif
  403. #if MOTHERBOARD == 33 || MOTHERBOARD == 67
  404. #define HEATER_1_PIN -1
  405. #else
  406. #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
  407. #endif
  408. #if MOTHERBOARD == 77
  409. #define HEATER_0_PIN 10
  410. #define HEATER_1_PIN 12
  411. #define HEATER_2_PIN 6
  412. #elif MOTHERBOARD == 68
  413. #define HEATER_2_PIN 16
  414. #define HEATER_3_PIN 17
  415. #define HEATER_4_PIN 4
  416. #define HEATER_5_PIN 5
  417. #define HEATER_6_PIN 6
  418. #define HEATER_7_PIN 11
  419. #else
  420. #define HEATER_2_PIN -1
  421. #endif
  422. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  423. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  424. #if MOTHERBOARD == 68
  425. #define TEMP_2_PIN 12 // ANALOG NUMBERING
  426. #define TEMP_3_PIN 11 // ANALOG NUMBERING
  427. #define TEMP_4_PIN 10 // ANALOG NUMBERING
  428. #define TC1 4 // ANALOG NUMBERING Thermo couple on Azteeg X3Pro
  429. #define TC2 5 // ANALOG NUMBERING Thermo couple on Azteeg X3Pro
  430. #else
  431. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  432. #endif
  433. #if MOTHERBOARD == 35
  434. #define HEATER_BED_PIN -1 // NO BED
  435. #else
  436. #if MOTHERBOARD == 77
  437. #define HEATER_BED_PIN 9 // BED
  438. #else
  439. #define HEATER_BED_PIN 8 // BED
  440. #endif
  441. #endif
  442. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  443. #ifdef NUM_SERVOS
  444. #define SERVO0_PIN 11
  445. #if NUM_SERVOS > 1
  446. #define SERVO1_PIN 6
  447. #endif
  448. #if NUM_SERVOS > 2
  449. #define SERVO2_PIN 5
  450. #endif
  451. #if NUM_SERVOS > 3
  452. #define SERVO3_PIN 4
  453. #endif
  454. #endif
  455. #if MOTHERBOARD == 68
  456. #define BEEPER 33
  457. #endif
  458. #ifdef TEMP_STAT_LEDS
  459. #if MOTHERBOARD == 67
  460. #define STAT_LED_RED 6
  461. #define STAT_LED_BLUE 11
  462. #endif
  463. #endif
  464. #ifdef ULTRA_LCD
  465. #ifdef NEWPANEL
  466. #define LCD_PINS_RS 16
  467. #define LCD_PINS_ENABLE 17
  468. #define LCD_PINS_D4 23
  469. #define LCD_PINS_D5 25
  470. #define LCD_PINS_D6 27
  471. #define LCD_PINS_D7 29
  472. #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
  473. #define BEEPER 37
  474. #define BTN_EN1 31
  475. #define BTN_EN2 33
  476. #define BTN_ENC 35
  477. #define SDCARDDETECT 49
  478. #elif defined(LCD_I2C_PANELOLU2)
  479. #define BTN_EN1 47 //reverse if the encoder turns the wrong way.
  480. #define BTN_EN2 43
  481. #define BTN_ENC 32
  482. #define LCD_SDSS 53
  483. #define SDCARDDETECT -1
  484. #define KILL_PIN 41
  485. #elif defined(LCD_I2C_VIKI)
  486. #define BTN_EN1 22 //reverse if the encoder turns the wrong way.
  487. #define BTN_EN2 7
  488. #define BTN_ENC -1
  489. #define LCD_SDSS 53
  490. #define SDCARDDETECT 49
  491. #else
  492. //arduino pin which triggers an piezzo beeper
  493. #define BEEPER 33 // Beeper on AUX-4
  494. //buttons are directly attached using AUX-2
  495. #ifdef REPRAPWORLD_KEYPAD
  496. #define BTN_EN1 64 // encoder
  497. #define BTN_EN2 59 // encoder
  498. #define BTN_ENC 63 // enter button
  499. #define SHIFT_OUT 40 // shift register
  500. #define SHIFT_CLK 44 // shift register
  501. #define SHIFT_LD 42 // shift register
  502. #else
  503. #define BTN_EN1 37
  504. #define BTN_EN2 35
  505. #define BTN_ENC 31 //the click
  506. #endif
  507. #ifdef G3D_PANEL
  508. #define SDCARDDETECT 49
  509. #else
  510. #define SDCARDDETECT -1 // Ramps does not use this port
  511. #endif
  512. #endif
  513. #if MOTHERBOARD == 77
  514. #define BEEPER -1
  515. #define LCD_PINS_RS 27
  516. #define LCD_PINS_ENABLE 29
  517. #define LCD_PINS_D4 37
  518. #define LCD_PINS_D5 35
  519. #define LCD_PINS_D6 33
  520. #define LCD_PINS_D7 31
  521. //buttons
  522. #define BTN_EN1 16
  523. #define BTN_EN2 17
  524. #define BTN_ENC 23 //the click
  525. #endif
  526. #else //old style panel with shift register
  527. //arduino pin witch triggers an piezzo beeper
  528. #define BEEPER 33 //No Beeper added
  529. //buttons are attached to a shift register
  530. // Not wired this yet
  531. //#define SHIFT_CLK 38
  532. //#define SHIFT_LD 42
  533. //#define SHIFT_OUT 40
  534. //#define SHIFT_EN 17
  535. #define LCD_PINS_RS 16
  536. #define LCD_PINS_ENABLE 17
  537. #define LCD_PINS_D4 23
  538. #define LCD_PINS_D5 25
  539. #define LCD_PINS_D6 27
  540. #define LCD_PINS_D7 29
  541. #endif
  542. #endif //ULTRA_LCD
  543. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default (MOTHERBOARD == 3)
  544. #define X_STEP_PIN 26
  545. #define X_DIR_PIN 28
  546. #define X_ENABLE_PIN 24
  547. #define X_MIN_PIN 3
  548. #define X_MAX_PIN -1 //2
  549. #define Y_STEP_PIN 38
  550. #define Y_DIR_PIN 40
  551. #define Y_ENABLE_PIN 36
  552. #define Y_MIN_PIN 16
  553. #define Y_MAX_PIN -1 //17
  554. #define Z_STEP_PIN 44
  555. #define Z_DIR_PIN 46
  556. #define Z_ENABLE_PIN 42
  557. #define Z_MIN_PIN 18
  558. #define Z_MAX_PIN -1 //19
  559. #define E0_STEP_PIN 32
  560. #define E0_DIR_PIN 34
  561. #define E0_ENABLE_PIN 30
  562. #define SDPOWER 48
  563. #define SDSS 53
  564. #define LED_PIN 13
  565. #define PS_ON_PIN -1
  566. #define KILL_PIN -1
  567. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  568. #define HEATER_0_PIN 12 // RAMPS 1.0
  569. #define HEATER_BED_PIN -1 // RAMPS 1.0
  570. #define FAN_PIN 11 // RAMPS 1.0
  571. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  572. #define HEATER_0_PIN 10 // RAMPS 1.1
  573. #define HEATER_BED_PIN 8 // RAMPS 1.1
  574. #define FAN_PIN 9 // RAMPS 1.1
  575. #endif
  576. #define HEATER_1_PIN -1
  577. #define HEATER_2_PIN -1
  578. #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  579. #define TEMP_1_PIN -1
  580. #define TEMP_2_PIN -1
  581. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  582. #endif // MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77
  583. // SPI for Max6675 Thermocouple
  584. #ifndef SDSUPPORT
  585. // these pins are defined in the SD library if building with SD support
  586. #define MAX_SCK_PIN 52
  587. #define MAX_MISO_PIN 50
  588. #define MAX_MOSI_PIN 51
  589. #define MAX6675_SS 53
  590. #else
  591. #define MAX6675_SS 49
  592. #endif
  593. #endif //MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77
  594. /****************************************************************************************
  595. * Duemilanove w/ ATMega328P pin assignment
  596. *
  597. ****************************************************************************************/
  598. #if MOTHERBOARD == 4
  599. #define KNOWN_BOARD 1
  600. #ifndef __AVR_ATmega328P__
  601. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  602. #endif
  603. #define X_STEP_PIN 19
  604. #define X_DIR_PIN 18
  605. #define X_ENABLE_PIN -1
  606. #define X_STOP_PIN 17
  607. #define Y_STEP_PIN 10
  608. #define Y_DIR_PIN 7
  609. #define Y_ENABLE_PIN -1
  610. #define Y_STOP_PIN 8
  611. #define Z_STEP_PIN 13
  612. #define Z_DIR_PIN 3
  613. #define Z_ENABLE_PIN 2
  614. #define Z_STOP_PIN 4
  615. #define E0_STEP_PIN 11
  616. #define E0_DIR_PIN 12
  617. #define E0_ENABLE_PIN -1
  618. #define SDPOWER -1
  619. #define SDSS -1
  620. #define LED_PIN -1
  621. #define FAN_PIN 5
  622. #define PS_ON_PIN -1
  623. #define KILL_PIN -1
  624. #define HEATER_0_PIN 6
  625. #define HEATER_1_PIN -1
  626. #define HEATER_2_PIN -1
  627. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  628. #define TEMP_1_PIN -1
  629. #define TEMP_2_PIN -1
  630. #define HEATER_BED_PIN -1
  631. #define TEMP_BED_PIN -1
  632. #endif
  633. /****************************************************************************************
  634. * Elefu RA Board Pin Assignments
  635. *
  636. ****************************************************************************************/
  637. #if MOTHERBOARD == 21
  638. #define KNOWN_BOARD 1
  639. #ifndef __AVR_ATmega2560__
  640. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  641. #endif
  642. #define X_STEP_PIN 49
  643. #define X_DIR_PIN 13
  644. #define X_ENABLE_PIN 48
  645. #define X_MIN_PIN 35
  646. #define X_MAX_PIN -1 //34
  647. #define Y_STEP_PIN 11
  648. #define Y_DIR_PIN 9
  649. #define Y_ENABLE_PIN 12
  650. #define Y_MIN_PIN 33
  651. #define Y_MAX_PIN -1 //32
  652. #define Z_STEP_PIN 7
  653. #define Z_DIR_PIN 6
  654. #define Z_ENABLE_PIN 8
  655. #define Z_MIN_PIN 31
  656. #define Z_MAX_PIN -1 //30
  657. #define E2_STEP_PIN 43
  658. #define E2_DIR_PIN 47
  659. #define E2_ENABLE_PIN 42
  660. #define E1_STEP_PIN 18
  661. #define E1_DIR_PIN 19
  662. #define E1_ENABLE_PIN 38
  663. #define E0_STEP_PIN 40
  664. #define E0_DIR_PIN 41
  665. #define E0_ENABLE_PIN 37
  666. #define SDPOWER -1
  667. #define LED_PIN -1 //Use +12V Aux port for LED Ring
  668. #define FAN_PIN 16 //5V PWM
  669. #define PS_ON_PIN 10 //Set to -1 if using a manual switch on the PWRSW Connector
  670. #define SLEEP_WAKE_PIN 26 //This feature still needs work
  671. #define HEATER_0_PIN 45 //12V PWM1
  672. #define HEATER_1_PIN 46 //12V PWM2
  673. #define HEATER_2_PIN 17 //12V PWM3
  674. #define HEATER_BED_PIN 44 //DOUBLE 12V PWM
  675. #define TEMP_0_PIN 3 //ANALOG NUMBERING
  676. #define TEMP_1_PIN 2 //ANALOG NUMBERING
  677. #define TEMP_2_PIN 1 //ANALOG NUMBERING
  678. #define TEMP_BED_PIN 0 //ANALOG NUMBERING
  679. #define BEEPER 36
  680. #define KILL_PIN -1
  681. // M240 Triggers a camera by emulating a Canon RC-1 Remote
  682. // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
  683. #define PHOTOGRAPH_PIN 29
  684. #ifdef RA_CONTROL_PANEL
  685. #define SDSS 53
  686. #define SDCARDDETECT 28
  687. #define BTN_EN1 14
  688. #define BTN_EN2 39
  689. #define BTN_ENC 15 //the click
  690. #define BLEN_C 2
  691. #define BLEN_B 1
  692. #define BLEN_A 0
  693. //encoder rotation values
  694. #define encrot0 0
  695. #define encrot1 2
  696. #define encrot2 3
  697. #define encrot3 1
  698. #endif //RA_CONTROL_PANEL
  699. #ifdef RA_DISCO
  700. //variables for which pins the TLC5947 is using
  701. #define TLC_CLOCK_PIN 25
  702. #define TLC_BLANK_PIN 23
  703. #define TLC_XLAT_PIN 22
  704. #define TLC_DATA_PIN 24
  705. //We also need to define pin to port number mapping for the 2560 to match the pins listed above. If you change the TLC pins, update this as well per the 2560 datasheet!
  706. //This currently only works with the RA Board.
  707. #define TLC_CLOCK_BIT 3 //bit 3 on port A
  708. #define TLC_CLOCK_PORT &PORTA //bit 3 on port A
  709. #define TLC_BLANK_BIT 1 //bit 1 on port A
  710. #define TLC_BLANK_PORT &PORTA //bit 1 on port A
  711. #define TLC_DATA_BIT 2 //bit 2 on port A
  712. #define TLC_DATA_PORT &PORTA //bit 2 on port A
  713. #define TLC_XLAT_BIT 0 //bit 0 on port A
  714. #define TLC_XLAT_PORT &PORTA //bit 0 on port A
  715. //change this to match your situation. Lots of TLCs takes up the arduino SRAM very quickly, so be careful
  716. //Leave it at at least 1 if you have enabled RA_LIGHTING
  717. //The number of TLC5947 boards chained together for use with the animation, additional ones will repeat the animation on them, but are not individually addressable and mimic those before them. You can leave the default at 2 even if you only have 1 TLC5947 module.
  718. #define NUM_TLCS 2
  719. //These TRANS_ARRAY values let you change the order the LEDs on the lighting modules will animate for chase functions.
  720. //Modify them according to your specific situation.
  721. //NOTE: the array should be 8 long for every TLC you have. These defaults assume (2) TLCs.
  722. #define TRANS_ARRAY {0, 1, 2, 3, 4, 5, 6, 7, 15, 14, 13, 12, 11, 10, 9, 8} //forwards
  723. //#define TRANS_ARRAY {7, 6, 5, 4, 3, 2, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15} //backwards
  724. #endif //RA_LIGHTING
  725. #endif /* Ra Board */
  726. /****************************************************************************************
  727. * Gen6 pin assignment
  728. *
  729. ****************************************************************************************/
  730. #if MOTHERBOARD == 5 || MOTHERBOARD == 51
  731. #define KNOWN_BOARD 1
  732. #ifndef __AVR_ATmega644P__
  733. #ifndef __AVR_ATmega1284P__
  734. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  735. #endif
  736. #endif
  737. //x axis pins
  738. #define X_STEP_PIN 15
  739. #define X_DIR_PIN 18
  740. #define X_ENABLE_PIN 19
  741. #define X_STOP_PIN 20
  742. //y axis pins
  743. #define Y_STEP_PIN 23
  744. #define Y_DIR_PIN 22
  745. #define Y_ENABLE_PIN 24
  746. #define Y_STOP_PIN 25
  747. //z axis pins
  748. #define Z_STEP_PIN 27
  749. #define Z_DIR_PIN 28
  750. #define Z_ENABLE_PIN 29
  751. #define Z_STOP_PIN 30
  752. //extruder pins
  753. #define E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  754. #define E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  755. #define E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  756. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  757. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  758. #define TEMP_2_PIN -1 //changed @ rkoeppl 20110410
  759. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  760. #define HEATER_1_PIN -1
  761. #define HEATER_2_PIN -1
  762. #if MOTHERBOARD == 5
  763. #define HEATER_BED_PIN -1 //changed @ rkoeppl 20110410
  764. #define TEMP_BED_PIN -1 //changed @ rkoeppl 20110410
  765. #else
  766. #define HEATER_BED_PIN 1 //changed @ rkoeppl 20110410
  767. #define TEMP_BED_PIN 0 //changed @ rkoeppl 20110410
  768. #endif
  769. #define SDPOWER -1
  770. #define SDSS 17
  771. #define LED_PIN -1 //changed @ rkoeppl 20110410
  772. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  773. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  774. #define KILL_PIN -1 //changed @ drakelive 20120830
  775. //our pin for debugging.
  776. #define DEBUG_PIN 0
  777. //our RS485 pins
  778. #define TX_ENABLE_PIN 12
  779. #define RX_ENABLE_PIN 13
  780. #endif
  781. /****************************************************************************************
  782. * Sanguinololu pin assignment
  783. *
  784. ****************************************************************************************/
  785. #if MOTHERBOARD == 64
  786. #define STB
  787. #endif
  788. #if MOTHERBOARD == 63 || MOTHERBOARD == 66
  789. #define MELZI
  790. #endif
  791. #if MOTHERBOARD == 65
  792. #define AZTEEG_X1
  793. #endif
  794. #if MOTHERBOARD == 62 || MOTHERBOARD == 63 || MOTHERBOARD == 64 || MOTHERBOARD == 65 || MOTHERBOARD == 66
  795. #undef MOTHERBOARD
  796. #define MOTHERBOARD 6
  797. #define SANGUINOLOLU_V_1_2
  798. #if defined(__AVR_ATmega1284P__)
  799. #define LARGE_FLASH true
  800. #endif
  801. #endif
  802. #if MOTHERBOARD == 6
  803. #define KNOWN_BOARD 1
  804. #ifndef __AVR_ATmega644P__
  805. #ifndef __AVR_ATmega1284P__
  806. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  807. #endif
  808. #endif
  809. #define X_STEP_PIN 15
  810. #define X_DIR_PIN 21
  811. #define X_STOP_PIN 18
  812. #define Y_STEP_PIN 22
  813. #define Y_DIR_PIN 23
  814. #define Y_STOP_PIN 19
  815. #define Z_STEP_PIN 3
  816. #define Z_DIR_PIN 2
  817. #define Z_STOP_PIN 20
  818. #define E0_STEP_PIN 1
  819. #define E0_DIR_PIN 0
  820. #define LED_PIN -1
  821. #define FAN_PIN -1
  822. #if FAN_PIN == 12 || FAN_PIN ==13
  823. #define FAN_SOFT_PWM
  824. #endif
  825. #ifdef MELZI
  826. #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. */
  827. #define FAN_PIN 4 // Works for Panelolu2 too
  828. #endif
  829. #ifdef STB
  830. #define FAN_PIN 4
  831. // Uncomment this if you have the first generation (V1.10) of STBs board
  832. #define LCD_PIN_BL 17 // LCD backlight LED
  833. #endif
  834. #ifdef AZTEEG_X1
  835. #define FAN_PIN 4
  836. #endif
  837. #ifdef NUM_SERVOS
  838. #define SERVO0_PIN -1
  839. #if NUM_SERVOS > 1
  840. #define SERVO1_PIN -1
  841. #endif
  842. #if NUM_SERVOS > 2
  843. #define SERVO2_PIN -1
  844. #endif
  845. #if NUM_SERVOS > 3
  846. #define SERVO3_PIN -1
  847. #endif
  848. #endif
  849. #define PS_ON_PIN -1
  850. #define KILL_PIN -1
  851. #define HEATER_0_PIN 13 // (extruder)
  852. #define HEATER_1_PIN -1
  853. #define HEATER_2_PIN -1
  854. #ifdef SANGUINOLOLU_V_1_2
  855. #define HEATER_BED_PIN 12 // (bed)
  856. #define X_ENABLE_PIN 14
  857. #define Y_ENABLE_PIN 14
  858. #define Z_ENABLE_PIN 26
  859. #define E0_ENABLE_PIN 14
  860. #ifdef LCD_I2C_PANELOLU2
  861. #define FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan
  862. #endif
  863. #else
  864. #define HEATER_BED_PIN 14 // (bed)
  865. #define X_ENABLE_PIN -1
  866. #define Y_ENABLE_PIN -1
  867. #define Z_ENABLE_PIN -1
  868. #define E0_ENABLE_PIN -1
  869. #endif
  870. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  871. #define TEMP_1_PIN -1
  872. #define TEMP_2_PIN -1
  873. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  874. #define SDPOWER -1
  875. #define SDSS 31
  876. /* 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. */
  877. //#define SDSS 24
  878. #ifdef ULTRA_LCD
  879. #ifdef NEWPANEL
  880. //we have no buzzer installed
  881. #define BEEPER -1
  882. //LCD Pins
  883. #ifdef DOGLCD
  884. // Pins for DOGM SPI LCD Support
  885. #define DOGLCD_A0 30
  886. #define DOGLCD_CS 29
  887. // GLCD features
  888. #define LCD_CONTRAST 1
  889. // Uncomment screen orientation
  890. // #define LCD_SCREEN_ROT_0
  891. // #define LCD_SCREEN_ROT_90
  892. #define LCD_SCREEN_ROT_180
  893. // #define LCD_SCREEN_ROT_270
  894. #else // standard Hitachi LCD controller
  895. #define LCD_PINS_RS 4
  896. #define LCD_PINS_ENABLE 17
  897. #define LCD_PINS_D4 30
  898. #define LCD_PINS_D5 29
  899. #define LCD_PINS_D6 28
  900. #define LCD_PINS_D7 27
  901. #endif
  902. //The encoder and click button
  903. #define BTN_EN1 11
  904. #define BTN_EN2 10
  905. #ifdef LCD_I2C_PANELOLU2
  906. #ifdef MELZI
  907. #define BTN_ENC 29 //the click switch
  908. #define LCD_SDSS 30 //to use the SD card reader on the Panelolu2 rather than the melzi board
  909. #else
  910. #define BTN_ENC 30 //the click switch
  911. #endif
  912. #else
  913. #define BTN_ENC 16 //the click switch
  914. #endif //Panelolu2
  915. //not connected to a pin
  916. #define SDCARDDETECT -1
  917. #endif //Newpanel
  918. #endif //Ultipanel
  919. #ifdef MAKRPANEL
  920. #define BEEPER 29
  921. // Pins for DOGM SPI LCD Support
  922. #define DOGLCD_A0 30
  923. #define DOGLCD_CS 17
  924. #define LCD_PIN_BL 28 // backlight LED on PA3
  925. // GLCD features
  926. #define LCD_CONTRAST 1
  927. // Uncomment screen orientation
  928. #define LCD_SCREEN_ROT_0
  929. // #define LCD_SCREEN_ROT_90
  930. // #define LCD_SCREEN_ROT_180
  931. // #define LCD_SCREEN_ROT_270
  932. //The encoder and click button
  933. #define BTN_EN1 11
  934. #define BTN_EN2 10
  935. #define BTN_ENC 16 //the click switch
  936. //not connected to a pin
  937. #define SDCARDDETECT -1
  938. #endif //Makrpanel
  939. #endif
  940. #if MOTHERBOARD == 7
  941. #define KNOWN_BOARD
  942. /*****************************************************************
  943. * Ultimaker pin assignment
  944. ******************************************************************/
  945. #ifndef __AVR_ATmega1280__
  946. #ifndef __AVR_ATmega2560__
  947. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  948. #endif
  949. #endif
  950. #define LARGE_FLASH true
  951. #define X_STEP_PIN 25
  952. #define X_DIR_PIN 23
  953. #define X_MIN_PIN 22
  954. #define X_MAX_PIN 24
  955. #define X_ENABLE_PIN 27
  956. #define Y_STEP_PIN 31
  957. #define Y_DIR_PIN 33
  958. #define Y_MIN_PIN 26
  959. #define Y_MAX_PIN 28
  960. #define Y_ENABLE_PIN 29
  961. #define Z_STEP_PIN 37
  962. #define Z_DIR_PIN 39
  963. #define Z_MIN_PIN 30
  964. #define Z_MAX_PIN 32
  965. #define Z_ENABLE_PIN 35
  966. #define HEATER_BED_PIN 4
  967. #define TEMP_BED_PIN 10
  968. #define HEATER_0_PIN 2
  969. #define TEMP_0_PIN 8
  970. #define HEATER_1_PIN 3
  971. #define TEMP_1_PIN 9
  972. #define HEATER_2_PIN -1
  973. #define TEMP_2_PIN -1
  974. #define E0_STEP_PIN 43
  975. #define E0_DIR_PIN 45
  976. #define E0_ENABLE_PIN 41
  977. #define E1_STEP_PIN 49
  978. #define E1_DIR_PIN 47
  979. #define E1_ENABLE_PIN 48
  980. #define SDPOWER -1
  981. #define SDSS 53
  982. #define LED_PIN 13
  983. #define FAN_PIN 7
  984. #define PS_ON_PIN 12
  985. #define KILL_PIN -1
  986. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  987. #ifdef ULTRA_LCD
  988. #ifdef NEWPANEL
  989. //arduino pin witch triggers an piezzo beeper
  990. #define BEEPER 18
  991. #define LCD_PINS_RS 20
  992. #define LCD_PINS_ENABLE 17
  993. #define LCD_PINS_D4 16
  994. #define LCD_PINS_D5 21
  995. #define LCD_PINS_D6 5
  996. #define LCD_PINS_D7 6
  997. //buttons are directly attached
  998. #define BTN_EN1 40
  999. #define BTN_EN2 42
  1000. #define BTN_ENC 19 //the click
  1001. #define SDCARDDETECT 38
  1002. #else //old style panel with shift register
  1003. //arduino pin witch triggers an piezzo beeper
  1004. #define BEEPER 18
  1005. //buttons are attached to a shift register
  1006. #define SHIFT_CLK 38
  1007. #define SHIFT_LD 42
  1008. #define SHIFT_OUT 40
  1009. #define SHIFT_EN 17
  1010. #define LCD_PINS_RS 16
  1011. #define LCD_PINS_ENABLE 5
  1012. #define LCD_PINS_D4 6
  1013. #define LCD_PINS_D5 21
  1014. #define LCD_PINS_D6 20
  1015. #define LCD_PINS_D7 19
  1016. #define SDCARDDETECT -1
  1017. #endif
  1018. #endif //ULTRA_LCD
  1019. #endif
  1020. #if MOTHERBOARD == 71
  1021. #define KNOWN_BOARD
  1022. /*****************************************************************
  1023. * Ultimaker pin assignment (Old electronics)
  1024. ******************************************************************/
  1025. #ifndef __AVR_ATmega1280__
  1026. #ifndef __AVR_ATmega2560__
  1027. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1028. #endif
  1029. #endif
  1030. #define LARGE_FLASH true
  1031. #define X_STEP_PIN 25
  1032. #define X_DIR_PIN 23
  1033. #define X_MIN_PIN 15
  1034. #define X_MAX_PIN 14
  1035. #define X_ENABLE_PIN 27
  1036. #define Y_STEP_PIN 31
  1037. #define Y_DIR_PIN 33
  1038. #define Y_MIN_PIN 17
  1039. #define Y_MAX_PIN 16
  1040. #define Y_ENABLE_PIN 29
  1041. #define Z_STEP_PIN 37
  1042. #define Z_DIR_PIN 39
  1043. #define Z_MIN_PIN 19
  1044. #define Z_MAX_PIN 18
  1045. #define Z_ENABLE_PIN 35
  1046. #define HEATER_BED_PIN -1
  1047. #define TEMP_BED_PIN -1
  1048. #define HEATER_0_PIN 2
  1049. #define TEMP_0_PIN 8
  1050. #define HEATER_1_PIN 1
  1051. #define TEMP_1_PIN 1
  1052. #define HEATER_2_PIN -1
  1053. #define TEMP_2_PIN -1
  1054. #define E0_STEP_PIN 43
  1055. #define E0_DIR_PIN 45
  1056. #define E0_ENABLE_PIN 41
  1057. #define E1_STEP_PIN -1
  1058. #define E1_DIR_PIN -1
  1059. #define E1_ENABLE_PIN -1
  1060. #define SDPOWER -1
  1061. #define SDSS -1
  1062. #define LED_PIN -1
  1063. #define FAN_PIN -1
  1064. #define PS_ON_PIN -1
  1065. #define KILL_PIN -1
  1066. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  1067. #define LCD_PINS_RS 24
  1068. #define LCD_PINS_ENABLE 22
  1069. #define LCD_PINS_D4 36
  1070. #define LCD_PINS_D5 34
  1071. #define LCD_PINS_D6 32
  1072. #define LCD_PINS_D7 30
  1073. #endif
  1074. #if MOTHERBOARD == 72
  1075. #define KNOWN_BOARD
  1076. /*****************************************************************
  1077. * Ultiboard v2.0 pin assignment
  1078. ******************************************************************/
  1079. #ifndef __AVR_ATmega2560__
  1080. #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
  1081. #endif
  1082. #define X_STEP_PIN 25
  1083. #define X_DIR_PIN 23
  1084. #define X_STOP_PIN 22
  1085. #define X_ENABLE_PIN 27
  1086. #define Y_STEP_PIN 32
  1087. #define Y_DIR_PIN 33
  1088. #define Y_STOP_PIN 26
  1089. #define Y_ENABLE_PIN 31
  1090. #define Z_STEP_PIN 35
  1091. #define Z_DIR_PIN 36
  1092. #define Z_STOP_PIN 29
  1093. #define Z_ENABLE_PIN 34
  1094. #define HEATER_BED_PIN 4
  1095. #define TEMP_BED_PIN 10
  1096. #define HEATER_0_PIN 2
  1097. #define TEMP_0_PIN 8
  1098. #define HEATER_1_PIN 3
  1099. #define TEMP_1_PIN 9
  1100. #define HEATER_2_PIN -1
  1101. #define TEMP_2_PIN -1
  1102. #define E0_STEP_PIN 42
  1103. #define E0_DIR_PIN 43
  1104. #define E0_ENABLE_PIN 37
  1105. #define E1_STEP_PIN 49
  1106. #define E1_DIR_PIN 47
  1107. #define E1_ENABLE_PIN 48
  1108. #define SDPOWER -1
  1109. #define SDSS 53
  1110. #define LED_PIN 8
  1111. #define FAN_PIN 7
  1112. #define PS_ON_PIN -1
  1113. #define KILL_PIN -1
  1114. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  1115. #define SAFETY_TRIGGERED_PIN 28 //PIN to detect the safety circuit has triggered
  1116. #define MAIN_VOLTAGE_MEASURE_PIN 14 //Analogue PIN to measure the main voltage, with a 100k - 4k7 resitor divider.
  1117. #define MOTOR_CURRENT_PWM_XY_PIN 44
  1118. #define MOTOR_CURRENT_PWM_Z_PIN 45
  1119. #define MOTOR_CURRENT_PWM_E_PIN 46
  1120. //Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range
  1121. #define MOTOR_CURRENT_PWM_RANGE 2000
  1122. #define DEFAULT_PWM_MOTOR_CURRENT {1300, 1300, 1250}
  1123. //arduino pin witch triggers an piezzo beeper
  1124. #define BEEPER 18
  1125. #define LCD_PINS_RS 20
  1126. #define LCD_PINS_ENABLE 15
  1127. #define LCD_PINS_D4 14
  1128. #define LCD_PINS_D5 21
  1129. #define LCD_PINS_D6 5
  1130. #define LCD_PINS_D7 6
  1131. //buttons are directly attached
  1132. #define BTN_EN1 40
  1133. #define BTN_EN2 41
  1134. #define BTN_ENC 19 //the click
  1135. #define BLEN_C 2
  1136. #define BLEN_B 1
  1137. #define BLEN_A 0
  1138. #define SDCARDDETECT 39
  1139. #endif//MOTHERBOARD == 72
  1140. /****************************************************************************************
  1141. * RUMBA pin assignment
  1142. *
  1143. ****************************************************************************************/
  1144. #if MOTHERBOARD == 80
  1145. #define KNOWN_BOARD 1
  1146. #ifndef __AVR_ATmega2560__
  1147. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1148. #endif
  1149. #define X_STEP_PIN 17
  1150. #define X_DIR_PIN 16
  1151. #define X_ENABLE_PIN 48
  1152. #define X_MIN_PIN 37
  1153. #define X_MAX_PIN 36
  1154. #define Y_STEP_PIN 54
  1155. #define Y_DIR_PIN 47
  1156. #define Y_ENABLE_PIN 55
  1157. #define Y_MIN_PIN 35
  1158. #define Y_MAX_PIN 34
  1159. #define Z_STEP_PIN 57
  1160. #define Z_DIR_PIN 56
  1161. #define Z_ENABLE_PIN 62
  1162. #define Z_MIN_PIN 33
  1163. #define Z_MAX_PIN 32
  1164. #define E0_STEP_PIN 23
  1165. #define E0_DIR_PIN 22
  1166. #define E0_ENABLE_PIN 24
  1167. #define E1_STEP_PIN 26
  1168. #define E1_DIR_PIN 25
  1169. #define E1_ENABLE_PIN 27
  1170. #define E2_STEP_PIN 29
  1171. #define E2_DIR_PIN 28
  1172. #define E2_ENABLE_PIN 39
  1173. #define LED_PIN 13
  1174. #define FAN_PIN 7
  1175. //additional FAN1 PIN (e.g. useful for electronics fan or light on/off) on PIN 8
  1176. #define PS_ON_PIN 45
  1177. #define KILL_PIN 46
  1178. #if (TEMP_SENSOR_0==0)
  1179. #define TEMP_0_PIN -1
  1180. #define HEATER_0_PIN -1
  1181. #else
  1182. #define HEATER_0_PIN 2 // EXTRUDER 1
  1183. #if (TEMP_SENSOR_0==-1)
  1184. #define TEMP_0_PIN 6 // ANALOG NUMBERING - connector *K1* on RUMBA thermocouple ADD ON is used
  1185. #else
  1186. #define TEMP_0_PIN 15 // ANALOG NUMBERING - default connector for thermistor *T0* on rumba board is used
  1187. #endif
  1188. #endif
  1189. #if (TEMP_SENSOR_1==0)
  1190. #define TEMP_1_PIN -1
  1191. #define HEATER_1_PIN -1
  1192. #else
  1193. #define HEATER_1_PIN 3 // EXTRUDER 2
  1194. #if (TEMP_SENSOR_1==-1)
  1195. #define TEMP_1_PIN 5 // ANALOG NUMBERING - connector *K2* on RUMBA thermocouple ADD ON is used
  1196. #else
  1197. #define TEMP_1_PIN 14 // ANALOG NUMBERING - default connector for thermistor *T1* on rumba board is used
  1198. #endif
  1199. #endif
  1200. #if (TEMP_SENSOR_2==0)
  1201. #define TEMP_2_PIN -1
  1202. #define HEATER_2_PIN -1
  1203. #else
  1204. #define HEATER_2_PIN 6 // EXTRUDER 3
  1205. #if (TEMP_SENSOR_2==-1)
  1206. #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
  1207. #else
  1208. #define TEMP_2_PIN 13 // ANALOG NUMBERING - default connector for thermistor *T2* on rumba board is used
  1209. #endif
  1210. #endif
  1211. //optional for extruder 4 or chamber: #define TEMP_X_PIN 12 // ANALOG NUMBERING - default connector for thermistor *T3* on rumba board is used
  1212. //optional FAN1 can be used as 4th heater output: #define HEATER_3_PIN 8 // EXTRUDER 4
  1213. #if (TEMP_SENSOR_BED==0)
  1214. #define TEMP_BED_PIN -1
  1215. #define HEATER_BED_PIN -1
  1216. #else
  1217. #define HEATER_BED_PIN 9 // BED
  1218. #if (TEMP_SENSOR_BED==-1)
  1219. #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
  1220. #else
  1221. #define TEMP_BED_PIN 11 // ANALOG NUMBERING - default connector for thermistor *THB* on rumba board is used
  1222. #endif
  1223. #endif
  1224. #define SDPOWER -1
  1225. #define SDSS 53
  1226. #define SDCARDDETECT 49
  1227. #define BEEPER 44
  1228. #define LCD_PINS_RS 19
  1229. #define LCD_PINS_ENABLE 42
  1230. #define LCD_PINS_D4 18
  1231. #define LCD_PINS_D5 38
  1232. #define LCD_PINS_D6 41
  1233. #define LCD_PINS_D7 40
  1234. #define BTN_EN1 11
  1235. #define BTN_EN2 12
  1236. #define BTN_ENC 43
  1237. #endif //MOTHERBOARD==80
  1238. /****************************************************************************************
  1239. * Teensylu 0.7 / Printrboard pin assignments (AT90USB1286)
  1240. * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
  1241. http://www.pjrc.com/teensy/teensyduino.html
  1242. * See http://reprap.org/wiki/Printrboard for more info
  1243. ****************************************************************************************/
  1244. #if MOTHERBOARD == 8 || MOTHERBOARD == 81
  1245. #define KNOWN_BOARD 1
  1246. #define AT90USB 1286 // Disable MarlinSerial etc.
  1247. #ifndef __AVR_AT90USB1286__
  1248. #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
  1249. #endif
  1250. #define LARGE_FLASH true
  1251. #define X_STEP_PIN 0
  1252. #define X_DIR_PIN 1
  1253. #define X_ENABLE_PIN 39
  1254. #define Y_STEP_PIN 2
  1255. #define Y_DIR_PIN 3
  1256. #define Y_ENABLE_PIN 38
  1257. #define Z_STEP_PIN 4
  1258. #define Z_DIR_PIN 5
  1259. #define Z_ENABLE_PIN 23
  1260. #define E0_STEP_PIN 6
  1261. #define E0_DIR_PIN 7
  1262. #define E0_ENABLE_PIN 19
  1263. #define HEATER_0_PIN 21 // Extruder
  1264. #define HEATER_1_PIN -1
  1265. #define HEATER_2_PIN -1
  1266. #define HEATER_BED_PIN 20 // Bed
  1267. #define FAN_PIN 22 // Fan
  1268. // You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h
  1269. // for the fan and Teensyduino uses a different pin mapping.
  1270. #if MOTHERBOARD == 8 // Teensylu
  1271. #define X_STOP_PIN 13
  1272. #define Y_STOP_PIN 14
  1273. #define Z_STOP_PIN 15
  1274. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  1275. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  1276. #else // Printrboard
  1277. #define X_STOP_PIN 35
  1278. #define Y_STOP_PIN 8
  1279. #define Z_STOP_PIN 36
  1280. #define TEMP_0_PIN 1 // Extruder / Analog pin numbering
  1281. #define TEMP_BED_PIN 0 // Bed / Analog pin numbering
  1282. #endif
  1283. #define TEMP_1_PIN -1
  1284. #define TEMP_2_PIN -1
  1285. #define SDPOWER -1
  1286. #define SDSS 8
  1287. #define LED_PIN -1
  1288. #define PS_ON_PIN -1
  1289. #define KILL_PIN -1
  1290. #define ALARM_PIN -1
  1291. #ifndef SDSUPPORT
  1292. // these pins are defined in the SD library if building with SD support
  1293. #define SCK_PIN 9
  1294. #define MISO_PIN 11
  1295. #define MOSI_PIN 10
  1296. #endif
  1297. #endif // MOTHERBOARD == 8 (Teensylu) or 81 (Printrboard)
  1298. /****************************************************************************************
  1299. * Brainwave 1.0 pin assignments (AT90USB646)
  1300. * Requires hardware bundle for Arduino:
  1301. https://github.com/unrepentantgeek/brainwave-arduino
  1302. ****************************************************************************************/
  1303. #if MOTHERBOARD == 82
  1304. #define KNOWN_BOARD 1
  1305. #define AT90USB 646 // Disable MarlinSerial etc.
  1306. #ifndef __AVR_AT90USB646__
  1307. #error Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu.
  1308. #endif
  1309. #define X_STEP_PIN 27
  1310. #define X_DIR_PIN 29
  1311. #define X_ENABLE_PIN 28
  1312. #define X_STOP_PIN 7
  1313. #define X_ATT_PIN 26
  1314. #define Y_STEP_PIN 31
  1315. #define Y_DIR_PIN 33
  1316. #define Y_ENABLE_PIN 32
  1317. #define Y_STOP_PIN 6
  1318. #define Y_ATT_PIN 30
  1319. #define Z_STEP_PIN 17
  1320. #define Z_DIR_PIN 19
  1321. #define Z_ENABLE_PIN 18
  1322. #define Z_STOP_PIN 5
  1323. #define Z_ATT_PIN 16
  1324. #define E0_STEP_PIN 21
  1325. #define E0_DIR_PIN 23
  1326. #define E0_ENABLE_PIN 22
  1327. #define E0_ATT_PIN 20
  1328. #define HEATER_0_PIN 4 // Extruder
  1329. #define HEATER_1_PIN -1
  1330. #define HEATER_2_PIN -1
  1331. #define HEATER_BED_PIN 38 // Bed
  1332. #define FAN_PIN 3 // Fan
  1333. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  1334. #define TEMP_1_PIN -1
  1335. #define TEMP_2_PIN -1
  1336. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  1337. #define SDPOWER -1
  1338. #define SDSS -1
  1339. #define LED_PIN 39
  1340. #define PS_ON_PIN -1
  1341. #define KILL_PIN -1
  1342. #define ALARM_PIN -1
  1343. #ifndef SDSUPPORT
  1344. // these pins are defined in the SD library if building with SD support
  1345. #define SCK_PIN 9
  1346. #define MISO_PIN 11
  1347. #define MOSI_PIN 10
  1348. #endif
  1349. #endif // MOTHERBOARD == 82 (Brainwave)
  1350. //
  1351. // SAV Mk-I
  1352. // -----------------------------------------------------------------------------------
  1353. /****************************************************************************************
  1354. * SAV MkI pin assignments (AT90USB1286)
  1355. * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
  1356. http://www.pjrc.com/teensy/teensyduino.html
  1357. RepRap Clone Wars project board.
  1358. ****************************************************************************************/
  1359. #if MOTHERBOARD == 83 // SAV Mk-I
  1360. #define KNOWN_BOARD 1
  1361. #define AT90USB 1286 // Disable MarlinSerial etc.
  1362. #ifndef __AVR_AT90USB1286__
  1363. #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
  1364. #endif
  1365. #define LARGE_FLASH true
  1366. #define X_STEP_PIN 0
  1367. #define X_DIR_PIN 1
  1368. #define X_ENABLE_PIN 39
  1369. #define Y_STEP_PIN 2
  1370. #define Y_DIR_PIN 3
  1371. #define Y_ENABLE_PIN 38
  1372. #define Z_STEP_PIN 4
  1373. #define Z_DIR_PIN 5
  1374. #define Z_ENABLE_PIN 23
  1375. #define E0_STEP_PIN 6
  1376. #define E0_DIR_PIN 7
  1377. #define E0_ENABLE_PIN 19
  1378. #define HEATER_0_PIN 21 // Extruder
  1379. #define HEATER_1_PIN -1
  1380. #define HEATER_2_PIN -1
  1381. #define HEATER_BED_PIN 20 // Bed
  1382. #define FAN_PIN 16 // Fan -- from Teensyduino environment.
  1383. // For the fan and Teensyduino uses a different pin mapping.
  1384. #define X_STOP_PIN 13
  1385. #define Y_STOP_PIN 14
  1386. #define Z_STOP_PIN 15
  1387. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  1388. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  1389. #define TEMP_1_PIN -1
  1390. #define TEMP_2_PIN -1
  1391. #define SDPOWER -1
  1392. #define SDSS 20 // PB0 - 8 in marlin env.
  1393. #define LED_PIN -1
  1394. #define PS_ON_PIN -1
  1395. #define KILL_PIN -1
  1396. #define ALARM_PIN -1
  1397. #define SDCARDDETECT -1
  1398. #ifndef SDSUPPORT
  1399. // these pins are defined in the SD library if building with SD support
  1400. #define SCK_PIN 9
  1401. #define MISO_PIN 11
  1402. #define MOSI_PIN 10
  1403. #endif
  1404. #define BEEPER -1
  1405. #define LCD_PINS_RS -1
  1406. #define LCD_PINS_ENABLE -1
  1407. #define LCD_PINS_D4 -1
  1408. #define LCD_PINS_D5 -1
  1409. #define LCD_PINS_D6 -1
  1410. #define LCD_PINS_D7 -1
  1411. #define BTN_EN1 -1
  1412. #define BTN_EN2 -1
  1413. #define BTN_ENC -1
  1414. // For LCD SHIFT register LCD
  1415. #define SR_DATA_PIN 0
  1416. #define SR_CLK_PIN 1
  1417. #endif // MOTHERBOARD == 83
  1418. /****************************************************************************************
  1419. * Gen3+ pin assignment
  1420. *
  1421. ****************************************************************************************/
  1422. #if MOTHERBOARD == 9
  1423. #define MOTHERBOARD 6 /*TODO: Figure out, Why is this done?*/
  1424. #define KNOWN_BOARD 1
  1425. #ifndef __AVR_ATmega644P__
  1426. #ifndef __AVR_ATmega1284P__
  1427. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  1428. #endif
  1429. #endif
  1430. #define X_STEP_PIN 15
  1431. #define X_DIR_PIN 18
  1432. #define X_STOP_PIN 20
  1433. #define Y_STEP_PIN 23
  1434. #define Y_DIR_PIN 22
  1435. #define Y_STOP_PIN 25
  1436. #define Z_STEP_PIN 27
  1437. #define Z_DIR_PIN 28
  1438. #define Z_STOP_PIN 30
  1439. #define E0_STEP_PIN 17
  1440. #define E0_DIR_PIN 21
  1441. #define LED_PIN -1
  1442. #define FAN_PIN -1
  1443. #define PS_ON_PIN 14
  1444. #define KILL_PIN -1
  1445. #define HEATER_0_PIN 12 // (extruder)
  1446. #define HEATER_BED_PIN 16 // (bed)
  1447. #define X_ENABLE_PIN 19
  1448. #define Y_ENABLE_PIN 24
  1449. #define Z_ENABLE_PIN 29
  1450. #define E0_ENABLE_PIN 13
  1451. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  1452. #define TEMP_1_PIN -1
  1453. #define TEMP_2_PIN -1
  1454. #define TEMP_BED_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  1455. #define SDPOWER -1
  1456. #define SDSS 4
  1457. #define HEATER_2_PIN -1
  1458. #endif
  1459. /****************************************************************************************
  1460. * Open Motion controller with enable based extruders
  1461. *
  1462. * ATMega644
  1463. *
  1464. * +---\/---+
  1465. * (D 0) PB0 1| |40 PA0 (AI 0 / D31)
  1466. * (D 1) PB1 2| |39 PA1 (AI 1 / D30)
  1467. * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
  1468. * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
  1469. * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
  1470. * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
  1471. * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
  1472. * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
  1473. * RST 9| |32 AREF
  1474. * VCC 10| |31 GND
  1475. * GND 11| |30 AVCC
  1476. * XTAL2 12| |29 PC7 (D 23)
  1477. * XTAL1 13| |28 PC6 (D 22)
  1478. * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
  1479. * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
  1480. * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
  1481. * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
  1482. * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
  1483. * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
  1484. * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
  1485. * +--------+
  1486. *
  1487. ****************************************************************************************/
  1488. #if MOTHERBOARD == 90 //Alpha OMCA board
  1489. #define KNOWN_BOARD 1
  1490. #ifndef __AVR_ATmega644__
  1491. #error Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu.
  1492. #endif
  1493. #define X_STEP_PIN 21
  1494. #define X_DIR_PIN 20
  1495. #define X_ENABLE_PIN 24
  1496. #define X_STOP_PIN 0
  1497. #define Y_STEP_PIN 23
  1498. #define Y_DIR_PIN 22
  1499. #define Y_ENABLE_PIN 24
  1500. #define Y_STOP_PIN 1
  1501. #define Z_STEP_PIN 26
  1502. #define Z_DIR_PIN 25
  1503. #define Z_ENABLE_PIN 24
  1504. #define Z_STOP_PIN 2
  1505. #define E0_STEP_PIN 28
  1506. #define E0_DIR_PIN 27
  1507. #define E0_ENABLE_PIN 24
  1508. #define E1_STEP_PIN -1 // 19
  1509. #define E1_DIR_PIN -1 // 18
  1510. #define E1_ENABLE_PIN 24
  1511. #define E2_STEP_PIN -1 // 17
  1512. #define E2_DIR_PIN -1 // 16
  1513. #define E2_ENABLE_PIN 24
  1514. #define SDPOWER -1
  1515. #define SDSS 11
  1516. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1517. #define LED_PIN -1
  1518. #define FAN_PIN 3
  1519. #define PS_ON_PIN -1
  1520. #define KILL_PIN -1
  1521. #define HEATER_0_PIN 4
  1522. #define HEATER_1_PIN -1 // 12
  1523. #define HEATER_2_PIN -1 // 13
  1524. #define TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  1525. #define TEMP_1_PIN -1 // 1
  1526. #define TEMP_2_PIN -1 // 2
  1527. #define HEATER_BED_PIN -1 // 14/15
  1528. #define TEMP_BED_PIN -1 // 1,2 or I2C
  1529. /* 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) */
  1530. #endif
  1531. #if MOTHERBOARD == 91 // Final OMCA board -- REF http://sanguino.cc/hardware
  1532. #define KNOWN_BOARD 1
  1533. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
  1534. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)
  1535. #endif
  1536. #define X_STEP_PIN 26
  1537. #define X_DIR_PIN 25
  1538. #define X_ENABLE_PIN 10
  1539. #define X_STOP_PIN 0
  1540. #define Y_STEP_PIN 28
  1541. #define Y_DIR_PIN 27
  1542. #define Y_ENABLE_PIN 10
  1543. #define Y_STOP_PIN 1
  1544. #define Z_STEP_PIN 23
  1545. #define Z_DIR_PIN 22
  1546. #define Z_ENABLE_PIN 10
  1547. #define Z_STOP_PIN 2
  1548. #define E0_STEP_PIN 24
  1549. #define E0_DIR_PIN 21
  1550. #define E0_ENABLE_PIN 10
  1551. /* future proofing */
  1552. #define __FS 20
  1553. #define __FD 19
  1554. #define __GS 18
  1555. #define __GD 13
  1556. #define UNUSED_PWM 14 /* PWM on LEFT connector */
  1557. #define E1_STEP_PIN -1 // 21
  1558. #define E1_DIR_PIN -1 // 20
  1559. #define E1_ENABLE_PIN -1 // 19
  1560. #define E2_STEP_PIN -1 // 21
  1561. #define E2_DIR_PIN -1 // 20
  1562. #define E2_ENABLE_PIN -1 // 18
  1563. #define SDPOWER -1
  1564. #define SDSS 11
  1565. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1566. #define LED_PIN -1
  1567. #define FAN_PIN 14 /* PWM on MIDDLE connector */
  1568. #define PS_ON_PIN -1
  1569. #define KILL_PIN -1
  1570. #define HEATER_0_PIN 3 /*DONE PWM on RIGHT connector */
  1571. #define HEATER_1_PIN -1
  1572. #define HEATER_2_PIN -1
  1573. #define HEATER_1_PIN -1
  1574. #define HEATER_2_PIN -1
  1575. #define TEMP_0_PIN 0 // ANALOG INPUT NUMBERING
  1576. #define TEMP_1_PIN 1 // ANALOG
  1577. #define TEMP_2_PIN -1 // 2
  1578. #define HEATER_BED_PIN 4
  1579. #define TEMP_BED_PIN 2 // 1,2 or I2C
  1580. #define I2C_SCL 16
  1581. #define I2C_SDA 17
  1582. #endif
  1583. #if MOTHERBOARD == 301
  1584. #define KNOWN_BOARD
  1585. /*****************************************************************
  1586. * Rambo Pin Assignments
  1587. ******************************************************************/
  1588. #ifndef __AVR_ATmega2560__
  1589. #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
  1590. #endif
  1591. #define LARGE_FLASH true
  1592. #define X_STEP_PIN 37
  1593. #define X_DIR_PIN 48
  1594. #define X_MIN_PIN 12
  1595. #define X_MAX_PIN 24
  1596. #define X_ENABLE_PIN 29
  1597. #define X_MS1_PIN 40
  1598. #define X_MS2_PIN 41
  1599. #define Y_STEP_PIN 36
  1600. #define Y_DIR_PIN 49
  1601. #define Y_MIN_PIN 11
  1602. #define Y_MAX_PIN 23
  1603. #define Y_ENABLE_PIN 28
  1604. #define Y_MS1_PIN 69
  1605. #define Y_MS2_PIN 39
  1606. #define Z_STEP_PIN 35
  1607. #define Z_DIR_PIN 47
  1608. #define Z_MIN_PIN 10
  1609. #define Z_MAX_PIN 30
  1610. #define Z_ENABLE_PIN 27
  1611. #define Z_MS1_PIN 68
  1612. #define Z_MS2_PIN 67
  1613. #define HEATER_BED_PIN 3
  1614. #define TEMP_BED_PIN 2
  1615. #define HEATER_0_PIN 9
  1616. #define TEMP_0_PIN 0
  1617. #define HEATER_1_PIN 7
  1618. #define TEMP_1_PIN 1
  1619. #ifdef BARICUDA
  1620. #define HEATER_2_PIN 6
  1621. #else
  1622. #define HEATER_2_PIN -1
  1623. #endif
  1624. #define TEMP_2_PIN -1
  1625. #define E0_STEP_PIN 34
  1626. #define E0_DIR_PIN 43
  1627. #define E0_ENABLE_PIN 26
  1628. #define E0_MS1_PIN 65
  1629. #define E0_MS2_PIN 66
  1630. #define E1_STEP_PIN 33
  1631. #define E1_DIR_PIN 42
  1632. #define E1_ENABLE_PIN 25
  1633. #define E1_MS1_PIN 63
  1634. #define E1_MS2_PIN 64
  1635. #define DIGIPOTSS_PIN 38
  1636. #define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping
  1637. #define SDPOWER -1
  1638. #define SDSS 53
  1639. #define LED_PIN 13
  1640. #define FAN_PIN 8
  1641. #define PS_ON_PIN 4
  1642. #define KILL_PIN -1 //80 with Smart Controller LCD
  1643. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  1644. #ifdef ULTRA_LCD
  1645. #define KILL_PIN 80
  1646. #ifdef NEWPANEL
  1647. //arduino pin which triggers an piezzo beeper
  1648. #define BEEPER 79 // Beeper on AUX-4
  1649. #define LCD_PINS_RS 70
  1650. #define LCD_PINS_ENABLE 71
  1651. #define LCD_PINS_D4 72
  1652. #define LCD_PINS_D5 73
  1653. #define LCD_PINS_D6 74
  1654. #define LCD_PINS_D7 75
  1655. //buttons are directly attached using AUX-2
  1656. #define BTN_EN1 76
  1657. #define BTN_EN2 77
  1658. #define BTN_ENC 78 //the click
  1659. #define BLEN_C 2
  1660. #define BLEN_B 1
  1661. #define BLEN_A 0
  1662. #define SDCARDDETECT 81 // Ramps does not use this port
  1663. //encoder rotation values
  1664. #define encrot0 0
  1665. #define encrot1 2
  1666. #define encrot2 3
  1667. #define encrot3 1
  1668. #else //old style panel with shift register
  1669. //arduino pin witch triggers an piezzo beeper
  1670. #define BEEPER 33 No Beeper added
  1671. //buttons are attached to a shift register
  1672. // Not wired this yet
  1673. // #define SHIFT_CLK 38
  1674. // #define SHIFT_LD 42
  1675. // #define SHIFT_OUT 40
  1676. // #define SHIFT_EN 17
  1677. #define LCD_PINS_RS 75
  1678. #define LCD_PINS_ENABLE 17
  1679. #define LCD_PINS_D4 23
  1680. #define LCD_PINS_D5 25
  1681. #define LCD_PINS_D6 27
  1682. #define LCD_PINS_D7 29
  1683. //encoder rotation values
  1684. #define encrot0 0
  1685. #define encrot1 2
  1686. #define encrot2 3
  1687. #define encrot3 1
  1688. //bits in the shift register that carry the buttons for:
  1689. // left up center down right red
  1690. #define BL_LE 7
  1691. #define BL_UP 6
  1692. #define BL_MI 5
  1693. #define BL_DW 4
  1694. #define BL_RI 3
  1695. #define BL_ST 2
  1696. #define BLEN_B 1
  1697. #define BLEN_A 0
  1698. #endif
  1699. #endif //ULTRA_LCD
  1700. #endif
  1701. /****************************************************************************************
  1702. * MegaTronics
  1703. *
  1704. ****************************************************************************************/
  1705. #if MOTHERBOARD == 70
  1706. #define KNOWN_BOARD 1
  1707. #ifndef __AVR_ATmega2560__
  1708. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1709. #endif
  1710. #define LARGE_FLASH true
  1711. #define X_STEP_PIN 26
  1712. #define X_DIR_PIN 28
  1713. #define X_ENABLE_PIN 24
  1714. #define X_MIN_PIN 41
  1715. #define X_MAX_PIN 37
  1716. #define Y_STEP_PIN 60 // A6
  1717. #define Y_DIR_PIN 61 // A7
  1718. #define Y_ENABLE_PIN 22
  1719. #define Y_MIN_PIN 14
  1720. #define Y_MAX_PIN 15
  1721. #define Z_STEP_PIN 54 // A0
  1722. #define Z_DIR_PIN 55 // A1
  1723. #define Z_ENABLE_PIN 56 // A2
  1724. #define Z_MIN_PIN 18
  1725. #define Z_MAX_PIN 19
  1726. #define E0_STEP_PIN 31
  1727. #define E0_DIR_PIN 32
  1728. #define E0_ENABLE_PIN 38
  1729. #define E1_STEP_PIN 34
  1730. #define E1_DIR_PIN 36
  1731. #define E1_ENABLE_PIN 30
  1732. #define SDPOWER -1
  1733. #define SDSS 53
  1734. #define LED_PIN 13
  1735. #define FAN_PIN 7 // IO pin. Buffer needed
  1736. #define PS_ON_PIN 12
  1737. #define KILL_PIN -1
  1738. #define HEATER_0_PIN 9 // EXTRUDER 1
  1739. #define HEATER_1_PIN 8 // EXTRUDER 2 (FAN On Sprinter)
  1740. #define HEATER_2_PIN -1
  1741. #if TEMP_SENSOR_0 == -1
  1742. #define TEMP_0_PIN 8 // ANALOG NUMBERING
  1743. #else
  1744. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  1745. #endif
  1746. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  1747. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  1748. #define HEATER_BED_PIN 10 // BED
  1749. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  1750. #define BEEPER 33 // Beeper on AUX-4
  1751. #ifdef ULTRA_LCD
  1752. #ifdef NEWPANEL
  1753. //arduino pin which triggers an piezzo beeper
  1754. #define LCD_PINS_RS 16
  1755. #define LCD_PINS_ENABLE 17
  1756. #define LCD_PINS_D4 23
  1757. #define LCD_PINS_D5 25
  1758. #define LCD_PINS_D6 27
  1759. #define LCD_PINS_D7 29
  1760. //buttons are directly attached using AUX-2
  1761. #define BTN_EN1 59
  1762. #define BTN_EN2 64
  1763. #define BTN_ENC 43 //the click
  1764. #define BLEN_C 2
  1765. #define BLEN_B 1
  1766. #define BLEN_A 0
  1767. #define SDCARDDETECT -1 // Ramps does not use this port
  1768. //encoder rotation values
  1769. #define encrot0 0
  1770. #define encrot1 2
  1771. #define encrot2 3
  1772. #define encrot3 1
  1773. #endif
  1774. #endif //ULTRA_LCD
  1775. #endif
  1776. /****************************************************************************************
  1777. * MegaTronics v2.0
  1778. *
  1779. ****************************************************************************************/
  1780. #if MOTHERBOARD == 701
  1781. #define KNOWN_BOARD 1
  1782. #ifndef __AVR_ATmega2560__
  1783. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1784. #endif
  1785. #define LARGE_FLASH true
  1786. #define X_STEP_PIN 26
  1787. #define X_DIR_PIN 27
  1788. #define X_ENABLE_PIN 25
  1789. #define X_MIN_PIN 37
  1790. #define X_MAX_PIN 40 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  1791. #define Y_STEP_PIN 4 // A6
  1792. #define Y_DIR_PIN 54 // A0
  1793. #define Y_ENABLE_PIN 5
  1794. #define Y_MIN_PIN 41
  1795. #define Y_MAX_PIN 38 //15
  1796. #define Z_STEP_PIN 56 // A2
  1797. #define Z_DIR_PIN 60 // A6
  1798. #define Z_ENABLE_PIN 55 // A1
  1799. #define Z_MIN_PIN 18
  1800. #define Z_MAX_PIN 19
  1801. #define E0_STEP_PIN 35
  1802. #define E0_DIR_PIN 36
  1803. #define E0_ENABLE_PIN 34
  1804. #define E1_STEP_PIN 29
  1805. #define E1_DIR_PIN 39
  1806. #define E1_ENABLE_PIN 28
  1807. #define E2_STEP_PIN 23
  1808. #define E2_DIR_PIN 24
  1809. #define E2_ENABLE_PIN 22
  1810. #define SDPOWER -1
  1811. #define SDSS 53
  1812. #define LED_PIN 13
  1813. #define FAN_PIN 7
  1814. #define FAN2_PIN 6
  1815. #define PS_ON_PIN 12
  1816. #define KILL_PIN -1
  1817. #define HEATER_0_PIN 9 // EXTRUDER 1
  1818. #define HEATER_1_PIN 8 // EXTRUDER 2
  1819. #define HEATER_2_PIN -1
  1820. #if TEMP_SENSOR_0 == -1
  1821. #define TEMP_0_PIN 4 // ANALOG NUMBERING
  1822. #else
  1823. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  1824. #endif
  1825. #if TEMP_SENSOR_1 == -1
  1826. #define TEMP_1_PIN 8 // ANALOG NUMBERING
  1827. #else
  1828. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  1829. #endif
  1830. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  1831. #define HEATER_BED_PIN 10 // BED
  1832. #if TEMP_SENSOR_BED == -1
  1833. #define TEMP_BED_PIN 8 // ANALOG NUMBERING
  1834. #else
  1835. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  1836. #endif
  1837. #define BEEPER 64
  1838. #define LCD_PINS_RS 14
  1839. #define LCD_PINS_ENABLE 15
  1840. #define LCD_PINS_D4 30
  1841. #define LCD_PINS_D5 31
  1842. #define LCD_PINS_D6 32
  1843. #define LCD_PINS_D7 33
  1844. //buttons are directly attached using keypad
  1845. #define BTN_EN1 61
  1846. #define BTN_EN2 59
  1847. #define BTN_ENC 43 //the click
  1848. #define BLEN_C 2
  1849. #define BLEN_B 1
  1850. #define BLEN_A 0
  1851. #define SDCARDDETECT -1 // Megatronics does not use this port
  1852. //encoder rotation values
  1853. #define encrot0 0
  1854. #define encrot1 2
  1855. #define encrot2 3
  1856. #define encrot3 1
  1857. #endif
  1858. /****************************************************************************************
  1859. * Minitronics v1.0
  1860. *
  1861. ****************************************************************************************/
  1862. #if MOTHERBOARD == 702
  1863. #define KNOWN_BOARD 1
  1864. #ifndef __AVR_ATmega1281__
  1865. #error Oops! Make sure you have 'Minitronics ' selected from the 'Tools -> Boards' menu.
  1866. #endif
  1867. #define LARGE_FLASH true
  1868. #define X_STEP_PIN 48
  1869. #define X_DIR_PIN 47
  1870. #define X_ENABLE_PIN 49
  1871. #define X_MIN_PIN 5
  1872. #define X_MAX_PIN -1 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  1873. #define Y_STEP_PIN 39 // A6
  1874. #define Y_DIR_PIN 40 // A0
  1875. #define Y_ENABLE_PIN 38
  1876. #define Y_MIN_PIN 2
  1877. #define Y_MAX_PIN -1 //15
  1878. #define Z_STEP_PIN 42 // A2
  1879. #define Z_DIR_PIN 43 // A6
  1880. #define Z_ENABLE_PIN 41 // A1
  1881. #define Z_MIN_PIN 6
  1882. #define Z_MAX_PIN -1
  1883. #define E0_STEP_PIN 45
  1884. #define E0_DIR_PIN 44
  1885. #define E0_ENABLE_PIN 27
  1886. #define E1_STEP_PIN 36
  1887. #define E1_DIR_PIN 35
  1888. #define E1_ENABLE_PIN 37
  1889. #define E2_STEP_PIN -1
  1890. #define E2_DIR_PIN -1
  1891. #define E2_ENABLE_PIN -1
  1892. #define SDPOWER -1
  1893. #define SDSS 16
  1894. #define LED_PIN 46
  1895. #define FAN_PIN 9
  1896. #define FAN2_PIN -1
  1897. #define PS_ON_PIN -1
  1898. #define KILL_PIN -1
  1899. #define HEATER_0_PIN 7 // EXTRUDER 1
  1900. #define HEATER_1_PIN 8 // EXTRUDER 2
  1901. #define HEATER_2_PIN -1
  1902. #define TEMP_0_PIN 7 // ANALOG NUMBERING
  1903. #define TEMP_1_PIN 6 // ANALOG NUMBERING
  1904. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  1905. #define HEATER_BED_PIN 3 // BED
  1906. #define TEMP_BED_PIN 6 // ANALOG NUMBERING
  1907. #define BEEPER -1
  1908. #define LCD_PINS_RS -1
  1909. #define LCD_PINS_ENABLE -1
  1910. #define LCD_PINS_D4 -1
  1911. #define LCD_PINS_D5 -1
  1912. #define LCD_PINS_D6 -1
  1913. #define LCD_PINS_D7 -1
  1914. //buttons are directly attached using keypad
  1915. #define BTN_EN1 -1
  1916. #define BTN_EN2 -1
  1917. #define BTN_ENC -1 //the click
  1918. #define BLEN_C 2
  1919. #define BLEN_B 1
  1920. #define BLEN_A 0
  1921. #define SDCARDDETECT -1 // Megatronics does not use this port
  1922. //encoder rotation values
  1923. #define encrot0 0
  1924. #define encrot1 2
  1925. #define encrot2 3
  1926. #define encrot3 1
  1927. #endif
  1928. /****************************************************************************************
  1929. * Cheaptronic v1.0
  1930. *
  1931. ****************************************************************************************/
  1932. #if MOTHERBOARD == 2
  1933. #define KNOWN_BOARD 1
  1934. #ifndef __AVR_ATmega2560__
  1935. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1936. #endif
  1937. #define LARGE_FLASH true
  1938. //X motor stepper
  1939. #define X_STEP_PIN 14
  1940. #define X_DIR_PIN 15
  1941. #define X_ENABLE_PIN 24
  1942. //X endstop
  1943. #define X_MIN_PIN 3
  1944. #define X_MAX_PIN -1
  1945. //Y motor stepper
  1946. #define Y_STEP_PIN 35
  1947. #define Y_DIR_PIN 36
  1948. #define Y_ENABLE_PIN 31
  1949. //Y endstop
  1950. #define Y_MIN_PIN 2
  1951. #define Y_MAX_PIN -1
  1952. //Z motor stepper
  1953. #define Z_STEP_PIN 40
  1954. #define Z_DIR_PIN 41
  1955. #define Z_ENABLE_PIN 37
  1956. //Z endstop
  1957. #define Z_MIN_PIN 5
  1958. #define Z_MAX_PIN -1
  1959. //Extruder 0 stepper
  1960. #define E0_STEP_PIN 26
  1961. #define E0_DIR_PIN 28
  1962. #define E0_ENABLE_PIN 25
  1963. //Extruder 1 stepper
  1964. #define E1_STEP_PIN 33
  1965. #define E1_DIR_PIN 34
  1966. #define E1_ENABLE_PIN 30
  1967. #define SDPOWER -1
  1968. #define SDSS -1
  1969. #define LED_PIN -1
  1970. //FAN
  1971. #define FAN_PIN -1
  1972. #define PS_ON_PIN -1
  1973. #define KILL_PIN -1
  1974. #define HEATER_0_PIN 19 // EXTRUDER 1
  1975. #define HEATER_1_PIN 23 // EXTRUDER 2
  1976. //HeatedBad
  1977. #define HEATER_BED_PIN 22
  1978. //Cheaptronic v1.0 hasent EXTRUDER 3
  1979. #define HEATER_2_PIN -1
  1980. //Temperature sensors
  1981. #define TEMP_0_PIN 15
  1982. #define TEMP_1_PIN 14
  1983. #define TEMP_2_PIN -1
  1984. #define TEMP_BED_PIN 13
  1985. //Cheaptronic v1.0 dont support LCD
  1986. #define LCD_PINS_RS -1
  1987. #define LCD_PINS_ENABLE -1
  1988. #define LCD_PINS_D4 -1
  1989. #define LCD_PINS_D5 -1
  1990. #define LCD_PINS_D6 -1
  1991. #define LCD_PINS_D7 -1
  1992. //Cheaptronic v1.0 dont support keypad
  1993. #define BTN_EN1 -1
  1994. #define BTN_EN2 -1
  1995. #define BTN_ENC -1
  1996. #define BLEN_C 2
  1997. #define BLEN_B 1
  1998. #define BLEN_A 0
  1999. //Cheaptronic v1.0 does not use this port
  2000. #define SDCARDDETECT -1
  2001. //encoder rotation values
  2002. #define encrot0 0
  2003. #define encrot1 2
  2004. #define encrot2 3
  2005. #define encrot3 1
  2006. #endif
  2007. #ifndef KNOWN_BOARD
  2008. #error Unknown MOTHERBOARD value in configuration.h
  2009. #endif
  2010. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  2011. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,
  2012. #if EXTRUDERS > 1
  2013. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
  2014. #else
  2015. #define _E1_PINS
  2016. #endif
  2017. #if EXTRUDERS > 2
  2018. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,
  2019. #else
  2020. #define _E2_PINS
  2021. #endif
  2022. #ifdef X_STOP_PIN
  2023. #if X_HOME_DIR < 0
  2024. #define X_MIN_PIN X_STOP_PIN
  2025. #define X_MAX_PIN -1
  2026. #else
  2027. #define X_MIN_PIN -1
  2028. #define X_MAX_PIN X_STOP_PIN
  2029. #endif
  2030. #endif
  2031. #ifdef Y_STOP_PIN
  2032. #if Y_HOME_DIR < 0
  2033. #define Y_MIN_PIN Y_STOP_PIN
  2034. #define Y_MAX_PIN -1
  2035. #else
  2036. #define Y_MIN_PIN -1
  2037. #define Y_MAX_PIN Y_STOP_PIN
  2038. #endif
  2039. #endif
  2040. #ifdef Z_STOP_PIN
  2041. #if Z_HOME_DIR < 0
  2042. #define Z_MIN_PIN Z_STOP_PIN
  2043. #define Z_MAX_PIN -1
  2044. #else
  2045. #define Z_MIN_PIN -1
  2046. #define Z_MAX_PIN Z_STOP_PIN
  2047. #endif
  2048. #endif
  2049. #ifdef DISABLE_MAX_ENDSTOPS
  2050. #define X_MAX_PIN -1
  2051. #define Y_MAX_PIN -1
  2052. #define Z_MAX_PIN -1
  2053. #endif
  2054. #ifdef DISABLE_MIN_ENDSTOPS
  2055. #define X_MIN_PIN -1
  2056. #define Y_MIN_PIN -1
  2057. #define Z_MIN_PIN -1
  2058. #endif
  2059. #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, \
  2060. HEATER_BED_PIN, FAN_PIN, \
  2061. _E0_PINS _E1_PINS _E2_PINS \
  2062. analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
  2063. #endif