My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

pins.h 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  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 E_STEP_PIN 11
  45. #define E_DIR_PIN 12
  46. #define E_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 TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  55. #define HEATER_1_PIN -1
  56. #define HEATER_2_PIN -1
  57. #endif
  58. /****************************************************************************************
  59. * Sanguino/RepRap Motherboard with direct-drive extruders
  60. *
  61. * ATMega644P
  62. *
  63. * +---\/---+
  64. * (D 0) PB0 1| |40 PA0 (AI 0 / D31)
  65. * (D 1) PB1 2| |39 PA1 (AI 1 / D30)
  66. * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
  67. * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
  68. * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
  69. * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
  70. * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
  71. * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
  72. * RST 9| |32 AREF
  73. * VCC 10| |31 GND
  74. * GND 11| |30 AVCC
  75. * XTAL2 12| |29 PC7 (D 23)
  76. * XTAL1 13| |28 PC6 (D 22)
  77. * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
  78. * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
  79. * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
  80. * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
  81. * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
  82. * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
  83. * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
  84. * +--------+
  85. *
  86. ****************************************************************************************/
  87. #if MOTHERBOARD == 1
  88. #define KNOWN_BOARD 1
  89. #ifndef __AVR_ATmega644P__
  90. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  91. #endif
  92. #define X_STEP_PIN 15
  93. #define X_DIR_PIN 18
  94. #define X_ENABLE_PIN 19
  95. #define X_MIN_PIN 20
  96. #define X_MAX_PIN 21
  97. #define Y_STEP_PIN 23
  98. #define Y_DIR_PIN 22
  99. #define Y_ENABLE_PIN 19
  100. #define Y_MIN_PIN 25
  101. #define Y_MAX_PIN 26
  102. #define Z_STEP_PIN 29
  103. #define Z_DIR_PIN 30
  104. #define Z_ENABLE_PIN 31
  105. #define Z_MIN_PIN 2
  106. #define Z_MAX_PIN 1
  107. #define E_STEP_PIN 12
  108. #define E_DIR_PIN 16
  109. #define E_ENABLE_PIN 3
  110. #define SDPOWER -1
  111. #define SDSS -1
  112. #define LED_PIN 0
  113. #define FAN_PIN -1
  114. #define PS_ON_PIN -1
  115. #define KILL_PIN -1
  116. #define HEATER_0_PIN 14
  117. #define TEMP_0_PIN 4 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  118. #define HEATER_1_PIN -1
  119. #define HEATER_2_PIN -1
  120. /* 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) */
  121. #endif
  122. /****************************************************************************************
  123. * RepRap Motherboard ****---NOOOOOO RS485/EXTRUDER CONTROLLER!!!!!!!!!!!!!!!!!---*******
  124. *
  125. ****************************************************************************************/
  126. #if MOTHERBOARD == 2
  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 24
  139. #define Y_MIN_PIN 25
  140. #define Y_MAX_PIN 26
  141. #define Z_STEP_PINN 27
  142. #define Z_DIR_PINN 28
  143. #define Z_ENABLE_PIN 29
  144. #define Z_MIN_PIN 30
  145. #define Z_MAX_PIN 31
  146. #define E_STEP_PIN 17
  147. #define E_DIR_PIN 16
  148. #define E_ENABLE_PIN -1
  149. #define SDPOWER -1
  150. #define SDSS 4
  151. #define LED_PIN 0
  152. #define SD_CARD_WRITE 2
  153. #define SD_CARD_DETECT 3
  154. #define SD_CARD_SELECT 4
  155. //our RS485 pins
  156. #define TX_ENABLE_PIN 12
  157. #define RX_ENABLE_PIN 13
  158. //pin for controlling the PSU.
  159. #define PS_ON_PIN 14
  160. #define FAN_PIN -1
  161. #define KILL_PIN -1
  162. #define HEATER_0_PIN -1
  163. #define TEMP_0_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  164. #define HEATER_1_PIN -1
  165. #define HEATER_2_PIN -1
  166. #endif
  167. /****************************************************************************************
  168. * Arduino Mega pin assignment
  169. *
  170. ****************************************************************************************/
  171. #if MOTHERBOARD == 33
  172. #define MOTHERBOARD 3
  173. #define RAMPS_V_1_3
  174. #endif
  175. #if MOTHERBOARD == 3
  176. #define KNOWN_BOARD 1
  177. //////////////////FIX THIS//////////////
  178. #ifndef __AVR_ATmega1280__
  179. #ifndef __AVR_ATmega2560__
  180. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  181. #endif
  182. #endif
  183. // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
  184. // #define RAMPS_V_1_3
  185. // #define RAMPS_V_1_0
  186. #ifdef RAMPS_V_1_3
  187. #define X_STEP_PIN 54
  188. #define X_DIR_PIN 55
  189. #define X_ENABLE_PIN 38
  190. #define X_MIN_PIN 3
  191. #define X_MAX_PIN -1 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  192. #define Y_STEP_PIN 60
  193. #define Y_DIR_PIN 61
  194. #define Y_ENABLE_PIN 56
  195. #define Y_MIN_PIN 14
  196. #define Y_MAX_PIN -1 //15
  197. #define Z_STEP_PIN 46
  198. #define Z_DIR_PIN 48
  199. #define Z_ENABLE_PIN 62
  200. #define Z_MIN_PIN 18
  201. #define Z_MAX_PIN -1 //19
  202. #define E_STEP_PIN 26
  203. #define E_DIR_PIN 28
  204. #define E_ENABLE_PIN 24
  205. #define SDPOWER -1
  206. #define SDSS 53
  207. #define LED_PIN 13
  208. #define FAN_PIN 9
  209. #define PS_ON_PIN 12
  210. #define KILL_PIN -1
  211. #define HEATER_0_PIN 10
  212. #define HEATER_1_PIN 8
  213. #define HEATER_2_PIN -1
  214. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  215. #define TEMP_1_PIN 14 // ANALOG NUMBERING
  216. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  217. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default
  218. #define X_STEP_PIN 26
  219. #define X_DIR_PIN 28
  220. #define X_ENABLE_PIN 24
  221. #define X_MIN_PIN 3
  222. #define X_MAX_PIN -1 //2
  223. #define Y_STEP_PIN 38
  224. #define Y_DIR_PIN 40
  225. #define Y_ENABLE_PIN 36
  226. #define Y_MIN_PIN 16
  227. #define Y_MAX_PIN -1 //17
  228. #define Z_STEP_PIN 44
  229. #define Z_DIR_PIN 46
  230. #define Z_ENABLE_PIN 42
  231. #define Z_MIN_PIN 18
  232. #define Z_MAX_PIN -1 //19
  233. #define E_STEP_PIN 32
  234. #define E_DIR_PIN 34
  235. #define E_ENABLE_PIN 30
  236. #define SDPOWER 48
  237. #define SDSS 53
  238. #define LED_PIN 13
  239. #define PS_ON_PIN -1
  240. #define KILL_PIN -1
  241. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  242. #define HEATER_0_PIN 12 // RAMPS 1.0
  243. #define HEATER_1_PIN -1 // RAMPS 1.0
  244. #define FAN_PIN 11 // RAMPS 1.0
  245. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  246. #define HEATER_0_PIN 10 // RAMPS 1.1
  247. #define HEATER_1_PIN 8 // RAMPS 1.1
  248. #define FAN_PIN 9 // RAMPS 1.1
  249. #endif
  250. #define HEATER_2_PIN -1
  251. #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  252. #define TEMP_1_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  253. #define TEMP_2_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  254. #endif
  255. // SPI for Max6675 Thermocouple
  256. #ifndef SDSUPPORT
  257. // these pins are defined in the SD library if building with SD support #define SCK_PIN 52
  258. #define MISO_PIN 50
  259. #define MOSI_PIN 51
  260. #define MAX6675_SS 53
  261. #else
  262. #define MAX6675_SS 49
  263. #endif
  264. #endif
  265. /****************************************************************************************
  266. * Duemilanove w/ ATMega328P pin assignment
  267. *
  268. ****************************************************************************************/
  269. #if MOTHERBOARD == 4
  270. #define KNOWN_BOARD 1
  271. #ifndef __AVR_ATmega328P__
  272. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  273. #endif
  274. #define X_STEP_PIN 19
  275. #define X_DIR_PIN 18
  276. #define X_ENABLE_PIN -1
  277. #define X_MIN_PIN 17
  278. #define X_MAX_PIN -1
  279. #define Y_STEP_PIN 10
  280. #define Y_DIR_PIN 7
  281. #define Y_ENABLE_PIN -1
  282. #define Y_MIN_PIN 8
  283. #define Y_MAX_PIN -1
  284. #define Z_STEP_PIN 13
  285. #define Z_DIR_PIN 3
  286. #define Z_ENABLE_PIN 2
  287. #define Z_MIN_PIN 4
  288. #define Z_MAX_PIN -1
  289. #define E_STEP_PIN 11
  290. #define E_DIR_PIN 12
  291. #define E_ENABLE_PIN -1
  292. #define SDPOWER -1
  293. #define SDSS -1
  294. #define LED_PIN -1
  295. #define FAN_PIN 5
  296. #define PS_ON_PIN -1
  297. #define KILL_PIN -1
  298. #define HEATER_0_PIN 6
  299. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  300. #define HEATER_1_PIN -1
  301. #define HEATER_2_PIN -1
  302. #endif
  303. /****************************************************************************************
  304. * Gen6 pin assignment
  305. *
  306. ****************************************************************************************/
  307. #if MOTHERBOARD == 5
  308. #define KNOWN_BOARD 1
  309. #ifndef __AVR_ATmega644P__
  310. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  311. #endif
  312. //x axis pins
  313. #define X_STEP_PIN 15
  314. #define X_DIR_PIN 18
  315. #define X_ENABLE_PIN 19
  316. #define X_MIN_PIN 20
  317. #define X_MAX_PIN -1
  318. //y axis pins
  319. #define Y_STEP_PIN 23
  320. #define Y_DIR_PIN 22
  321. #define Y_ENABLE_PIN 24
  322. #define Y_MIN_PIN 25
  323. #define Y_MAX_PIN -1
  324. //z axis pins
  325. #define Z_STEP_PIN 27
  326. #define Z_DIR_PIN 28
  327. #define Z_ENABLE_PIN 29
  328. #define Z_MIN_PIN 30
  329. #define Z_MAX_PIN -1
  330. //extruder pins
  331. #define E_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  332. #define E_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  333. #define E_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  334. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  335. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  336. #define HEATER_1_PIN -1 //changed @ rkoeppl 20110410
  337. #define HEATER_2_PIN -1
  338. #define SDPOWER -1
  339. #define SDSS 17
  340. #define LED_PIN -1 //changed @ rkoeppl 20110410
  341. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  342. #define TEMP_2_PIN -1
  343. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  344. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  345. //our pin for debugging.
  346. #define DEBUG_PIN 0
  347. //our RS485 pins
  348. #define TX_ENABLE_PIN 12
  349. #define RX_ENABLE_PIN 13
  350. #endif
  351. /****************************************************************************************
  352. * Sanguinololu pin assignment
  353. *
  354. ****************************************************************************************/
  355. #if MOTHERBOARD == 62
  356. #define MOTHERBOARD 6
  357. #define SANGUINOLOLU_V_1_2
  358. #endif
  359. #if MOTHERBOARD == 6
  360. #define KNOWN_BOARD 1
  361. #ifndef __AVR_ATmega644P__
  362. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  363. #endif
  364. #define X_STEP_PIN 15
  365. #define X_DIR_PIN 21
  366. #define X_MIN_PIN 18
  367. #define X_MAX_PIN -2
  368. #define Y_STEP_PIN 22
  369. #define Y_DIR_PIN 23
  370. #define Y_MIN_PIN 19
  371. #define Y_MAX_PIN -1
  372. #define Z_STEP_PIN 3
  373. #define Z_DIR_PIN 2
  374. #define Z_MIN_PIN 20
  375. #define Z_MAX_PIN -1
  376. #define E_STEP_PIN 1
  377. #define E_DIR_PIN 0
  378. #define LED_PIN -1
  379. #define FAN_PIN -1
  380. #define PS_ON_PIN -1
  381. #define KILL_PIN -1
  382. #define HEATER_0_PIN 13 // (extruder)
  383. #ifdef SANGUINOLOLU_V_1_2
  384. #define HEATER_1_PIN 12 // (bed)
  385. #define X_ENABLE_PIN 14
  386. #define Y_ENABLE_PIN 14
  387. #define Z_ENABLE_PIN 26
  388. #define E_ENABLE_PIN 14
  389. #else
  390. #define HEATER_1_PIN 14 // (bed)
  391. #define X_ENABLE_PIN -1
  392. #define Y_ENABLE_PIN -1
  393. #define Z_ENABLE_PIN -1
  394. #define E_ENABLE_PIN -1
  395. #endif
  396. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  397. #define TEMP_1_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  398. #define TEMP_2_PIN -1
  399. #define SDPOWER -1
  400. #define SDSS 31
  401. #define HEATER_2_PIN -1
  402. #endif
  403. #if MOTHERBOARD == 7
  404. #define KNOWN_BOARD
  405. /*****************************************************************
  406. * Ultimaker pin assignment
  407. ******************************************************************/
  408. #ifndef __AVR_ATmega1280__
  409. #ifndef __AVR_ATmega2560__
  410. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  411. #endif
  412. #endif
  413. #define X_STEP_PIN 25
  414. #define X_DIR_PIN 23
  415. #define X_MIN_PIN 22
  416. #define X_MAX_PIN 24
  417. #define X_ENABLE_PIN 27
  418. #define Y_STEP_PIN 31
  419. #define Y_DIR_PIN 33
  420. #define Y_MIN_PIN 26
  421. #define Y_MAX_PIN 28
  422. #define Y_ENABLE_PIN 29
  423. #define Z_STEP_PIN 37
  424. #define Z_DIR_PIN 39
  425. #define Z_MIN_PIN 30
  426. #define Z_MAX_PIN 32
  427. #define Z_ENABLE_PIN 35
  428. #define HEATER_1_PIN 4
  429. #define TEMP_1_PIN 11
  430. #define EXTRUDER_0_STEP_PIN 43
  431. #define EXTRUDER_0_DIR_PIN 45
  432. #define EXTRUDER_0_ENABLE_PIN 41
  433. #define HEATER_0_PIN 2
  434. #define TEMP_0_PIN 8
  435. #define EXTRUDER_1_STEP_PIN 49
  436. #define EXTRUDER_1_DIR_PIN 47
  437. #define EXTRUDER_1_ENABLE_PIN 51
  438. #define EXTRUDER_1_HEATER_PIN 3
  439. #define EXTRUDER_1_TEMPERATURE_PIN 10
  440. #define HEATER_2_PIN 51
  441. #define TEMP_2_PIN 3
  442. #define E_STEP_PIN EXTRUDER_0_STEP_PIN
  443. #define E_DIR_PIN EXTRUDER_0_DIR_PIN
  444. #define E_ENABLE_PIN EXTRUDER_0_ENABLE_PIN
  445. #define SDPOWER -1
  446. #define SDSS 53
  447. #define LED_PIN 13
  448. #define FAN_PIN 7
  449. #define PS_ON_PIN 12
  450. #define KILL_PIN -1
  451. #endif
  452. #ifndef KNOWN_BOARD
  453. #error Unknown MOTHERBOARD value in configuration.h
  454. #endif
  455. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  456. #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, E_STEP_PIN, E_DIR_PIN, E_ENABLE_PIN, LED_PIN, PS_ON_PIN, HEATER_0_PIN, HEATER_1_PIN, HEATER_2_PIN, FAN_PIN, TEMP_0_PIN, TEMP_1_PIN, TEMP_2_PIN}
  457. #endif