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

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