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.

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