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

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