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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145
  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 9 // Uses HEATER_1 on Ramps Board
  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. #ifdef ULTRA_LCD
  270. #ifdef NEWPANEL
  271. //arduino pin which triggers an piezzo beeper
  272. #define BEEPER 33 // Beeper on AUX-4
  273. #define LCD_PINS_RS 16
  274. #define LCD_PINS_ENABLE 17
  275. #define LCD_PINS_D4 23
  276. #define LCD_PINS_D5 25
  277. #define LCD_PINS_D6 27
  278. #define LCD_PINS_D7 29
  279. //buttons are directly attached using AUX-2
  280. #define BTN_EN1 44
  281. #define BTN_EN2 42
  282. #define BTN_ENC 64 //the click
  283. #define BLEN_C 2
  284. #define BLEN_B 1
  285. #define BLEN_A 0
  286. #define SDCARDDETECT 31 // Ramps does not use this port
  287. //encoder rotation values
  288. #define encrot0 0
  289. #define encrot1 2
  290. #define encrot2 3
  291. #define encrot3 1
  292. #else //old style panel with shift register
  293. //arduino pin witch triggers an piezzo beeper
  294. #define BEEPER 33 No Beeper added
  295. //buttons are attached to a shift register
  296. // Not wired this yet
  297. //#define SHIFT_CLK 38
  298. //#define SHIFT_LD 42
  299. //#define SHIFT_OUT 40
  300. //#define SHIFT_EN 17
  301. #define LCD_PINS_RS 16
  302. #define LCD_PINS_ENABLE 17
  303. #define LCD_PINS_D4 23
  304. #define LCD_PINS_D5 25
  305. #define LCD_PINS_D6 27
  306. #define LCD_PINS_D7 29
  307. //encoder rotation values
  308. #define encrot0 0
  309. #define encrot1 2
  310. #define encrot2 3
  311. #define encrot3 1
  312. //bits in the shift register that carry the buttons for:
  313. // left up center down right red
  314. #define BL_LE 7
  315. #define BL_UP 6
  316. #define BL_MI 5
  317. #define BL_DW 4
  318. #define BL_RI 3
  319. #define BL_ST 2
  320. #define BLEN_B 1
  321. #define BLEN_A 0
  322. #endif
  323. #endif //ULTRA_LCD
  324. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default
  325. #define X_STEP_PIN 26
  326. #define X_DIR_PIN 28
  327. #define X_ENABLE_PIN 24
  328. #define X_MIN_PIN 3
  329. #define X_MAX_PIN -1 //2
  330. #define Y_STEP_PIN 38
  331. #define Y_DIR_PIN 40
  332. #define Y_ENABLE_PIN 36
  333. #define Y_MIN_PIN 16
  334. #define Y_MAX_PIN -1 //17
  335. #define Z_STEP_PIN 44
  336. #define Z_DIR_PIN 46
  337. #define Z_ENABLE_PIN 42
  338. #define Z_MIN_PIN 18
  339. #define Z_MAX_PIN -1 //19
  340. #define E0_STEP_PIN 32
  341. #define E0_DIR_PIN 34
  342. #define E0_ENABLE_PIN 30
  343. #define SDPOWER 48
  344. #define SDSS 53
  345. #define LED_PIN 13
  346. #define PS_ON_PIN -1
  347. #define KILL_PIN -1
  348. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  349. #define HEATER_0_PIN 12 // RAMPS 1.0
  350. #define HEATER_BED_PIN -1 // RAMPS 1.0
  351. #define FAN_PIN 11 // RAMPS 1.0
  352. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  353. #define HEATER_0_PIN 10 // RAMPS 1.1
  354. #define HEATER_BED_PIN 8 // RAMPS 1.1
  355. #define FAN_PIN 9 // RAMPS 1.1
  356. #endif
  357. #define HEATER_1_PIN -1
  358. #define HEATER_2_PIN -1
  359. #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  360. #define TEMP_1_PIN -1
  361. #define TEMP_2_PIN -1
  362. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  363. #endif
  364. // SPI for Max6675 Thermocouple
  365. #ifndef SDSUPPORT
  366. // these pins are defined in the SD library if building with SD support
  367. #define MAX_SCK_PIN 52
  368. #define MAX_MISO_PIN 50
  369. #define MAX_MOSI_PIN 51
  370. #define MAX6675_SS 53
  371. #else
  372. #define MAX6675_SS 49
  373. #endif
  374. #endif
  375. /****************************************************************************************
  376. * Duemilanove w/ ATMega328P pin assignment
  377. *
  378. ****************************************************************************************/
  379. #if MOTHERBOARD == 4
  380. #define KNOWN_BOARD 1
  381. #ifndef __AVR_ATmega328P__
  382. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  383. #endif
  384. #define X_STEP_PIN 19
  385. #define X_DIR_PIN 18
  386. #define X_ENABLE_PIN -1
  387. #define X_MIN_PIN 17
  388. #define X_MAX_PIN -1
  389. #define Y_STEP_PIN 10
  390. #define Y_DIR_PIN 7
  391. #define Y_ENABLE_PIN -1
  392. #define Y_MIN_PIN 8
  393. #define Y_MAX_PIN -1
  394. #define Z_STEP_PIN 13
  395. #define Z_DIR_PIN 3
  396. #define Z_ENABLE_PIN 2
  397. #define Z_MIN_PIN 4
  398. #define Z_MAX_PIN -1
  399. #define E0_STEP_PIN 11
  400. #define E0_DIR_PIN 12
  401. #define E0_ENABLE_PIN -1
  402. #define SDPOWER -1
  403. #define SDSS -1
  404. #define LED_PIN -1
  405. #define FAN_PIN 5
  406. #define PS_ON_PIN -1
  407. #define KILL_PIN -1
  408. #define HEATER_0_PIN 6
  409. #define HEATER_1_PIN -1
  410. #define HEATER_2_PIN -1
  411. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  412. #define TEMP_1_PIN -1
  413. #define TEMP_2_PIN -1
  414. #define HEATER_BED_PIN -1
  415. #define TEMP_BED_PIN -1
  416. #endif
  417. /****************************************************************************************
  418. * Gen6 pin assignment
  419. *
  420. ****************************************************************************************/
  421. #if MOTHERBOARD == 5
  422. #define KNOWN_BOARD 1
  423. #ifndef __AVR_ATmega644P__
  424. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  425. #endif
  426. //x axis pins
  427. #define X_STEP_PIN 15
  428. #define X_DIR_PIN 18
  429. #define X_ENABLE_PIN 19
  430. #define X_MIN_PIN 20
  431. #define X_MAX_PIN -1
  432. //y axis pins
  433. #define Y_STEP_PIN 23
  434. #define Y_DIR_PIN 22
  435. #define Y_ENABLE_PIN 24
  436. #define Y_MIN_PIN 25
  437. #define Y_MAX_PIN -1
  438. //z axis pins
  439. #define Z_STEP_PIN 27
  440. #define Z_DIR_PIN 28
  441. #define Z_ENABLE_PIN 29
  442. #define Z_MIN_PIN 30
  443. #define Z_MAX_PIN -1
  444. //extruder pins
  445. #define E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  446. #define E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  447. #define E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  448. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  449. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  450. #define TEMP_2_PIN -1 //changed @ rkoeppl 20110410
  451. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  452. #define HEATER_1_PIN -1
  453. #define HEATER_2_PIN -1
  454. #define HEATER_BED_PIN -1 //changed @ rkoeppl 20110410
  455. #define TEMP_BED_PIN -1 //changed @ rkoeppl 20110410
  456. #define SDPOWER -1
  457. #define SDSS 17
  458. #define LED_PIN -1 //changed @ rkoeppl 20110410
  459. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  460. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  461. //our pin for debugging.
  462. #define DEBUG_PIN 0
  463. //our RS485 pins
  464. #define TX_ENABLE_PIN 12
  465. #define RX_ENABLE_PIN 13
  466. #endif
  467. /****************************************************************************************
  468. * Sanguinololu pin assignment
  469. *
  470. ****************************************************************************************/
  471. #if MOTHERBOARD == 62
  472. #define MOTHERBOARD 6
  473. #define SANGUINOLOLU_V_1_2
  474. #endif
  475. #if MOTHERBOARD == 6
  476. #define KNOWN_BOARD 1
  477. #ifndef __AVR_ATmega644P__
  478. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  479. #endif
  480. #define X_STEP_PIN 15
  481. #define X_DIR_PIN 21
  482. #define X_MIN_PIN 18
  483. #define X_MAX_PIN -1
  484. #define Y_STEP_PIN 22
  485. #define Y_DIR_PIN 23
  486. #define Y_MIN_PIN 19
  487. #define Y_MAX_PIN -1
  488. #define Z_STEP_PIN 3
  489. #define Z_DIR_PIN 2
  490. #define Z_MIN_PIN 20
  491. #define Z_MAX_PIN -1
  492. #define E0_STEP_PIN 1
  493. #define E0_DIR_PIN 0
  494. #define LED_PIN -1
  495. #define FAN_PIN -1
  496. #define PS_ON_PIN -1
  497. #define KILL_PIN -1
  498. #define HEATER_0_PIN 13 // (extruder)
  499. #define HEATER_1_PIN -1
  500. #define HEATER_2_PIN -1
  501. #ifdef SANGUINOLOLU_V_1_2
  502. #define HEATER_BED_PIN 12 // (bed)
  503. #define X_ENABLE_PIN 14
  504. #define Y_ENABLE_PIN 14
  505. #define Z_ENABLE_PIN 26
  506. #define E0_ENABLE_PIN 14
  507. #else
  508. #define HEATER_BED_PIN 14 // (bed)
  509. #define X_ENABLE_PIN -1
  510. #define Y_ENABLE_PIN -1
  511. #define Z_ENABLE_PIN -1
  512. #define E0_ENABLE_PIN -1
  513. #endif
  514. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  515. #define TEMP_1_PIN -1
  516. #define TEMP_2_PIN -1
  517. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  518. #define SDPOWER -1
  519. #define SDSS 31
  520. #endif
  521. /****************************************************************************************
  522. * Gen7 v1.1, v1.2, v1.3 pin assignment
  523. *
  524. ****************************************************************************************/
  525. #if MOTHERBOARD == 79
  526. #define MOTHERBOARD 78
  527. #define GEN7_V_1_3
  528. #endif
  529. #if MOTHERBOARD == 78
  530. #define KNOWN_BOARD
  531. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  532. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  533. #endif
  534. //x axis pins
  535. #define X_STEP_PIN 19
  536. #define X_DIR_PIN 18
  537. #define X_ENABLE_PIN 24
  538. #define X_MIN_PIN 7
  539. #define X_MAX_PIN -1
  540. //y axis pins
  541. #define Y_STEP_PIN 23
  542. #define Y_DIR_PIN 22
  543. #define Y_ENABLE_PIN 24
  544. #define Y_MIN_PIN 5
  545. #define Y_MAX_PIN -1
  546. //z axis pins
  547. #define Z_STEP_PIN 26
  548. #define Z_DIR_PIN 25
  549. #define Z_ENABLE_PIN 24
  550. #define Z_MIN_PIN 1
  551. #define Z_MAX_PIN -1
  552. //extruder pins
  553. #define E0_STEP_PIN 28
  554. #define E0_DIR_PIN 27
  555. #define E0_ENABLE_PIN 24
  556. #define TEMP_0_PIN 1
  557. #define TEMP_1_PIN -1
  558. #define TEMP_2_PIN -1
  559. #define TEMP_BED_PIN 2
  560. #define HEATER_0_PIN 4
  561. #define HEATER_1_PIN -1
  562. #define HEATER_2_PIN -1
  563. #define HEATER_BED_PIN 3
  564. #define SDPOWER -1
  565. #define SDSS -1 // SCL pin of I2C header
  566. #define LED_PIN -1
  567. #ifdef GEN7_V_1_3
  568. // Gen7 v1.3 removed the fan pin
  569. #define FAN_PIN -1
  570. #else
  571. #define FAN_PIN 31
  572. #endif
  573. #define PS_ON_PIN 15
  574. //our pin for debugging.
  575. #define DEBUG_PIN 0
  576. //our RS485 pins
  577. #define TX_ENABLE_PIN 12
  578. #define RX_ENABLE_PIN 13
  579. #endif
  580. /*******************************************************************************
  581. *********
  582. * Gen7 Alfons3 pin assignment
  583. *
  584. ********************************************************************************
  585. ********/
  586. /* These Pins are assigned for the modified GEN7 Board from Alfons3 Please review the pins and adjust it for your needs*/
  587. #if MOTHERBOARD == 77
  588. #define KNOWN_BOARD
  589. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  590. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  591. #endif
  592. //x axis pins
  593. #define X_STEP_PIN 21 //different from stanard GEN7
  594. #define X_DIR_PIN 20 //different from stanard GEN7
  595. #define X_ENABLE_PIN 24
  596. #define X_MIN_PIN 0
  597. #define X_MAX_PIN -1
  598. //y axis pins
  599. #define Y_STEP_PIN 23
  600. #define Y_DIR_PIN 22
  601. #define Y_ENABLE_PIN 24
  602. #define Y_MIN_PIN 1
  603. #define Y_MAX_PIN -1
  604. //z axis pins
  605. #define Z_STEP_PIN 26
  606. #define Z_DIR_PIN 25
  607. #define Z_ENABLE_PIN 24
  608. #define Z_MIN_PIN 2
  609. #define Z_MAX_PIN -1
  610. //extruder pins
  611. #define E0_STEP_PIN 28
  612. #define E0_DIR_PIN 27
  613. #define E0_ENABLE_PIN 24
  614. #define TEMP_0_PIN 2
  615. #define TEMP_1_PIN -1
  616. #define TEMP_2_PIN -1
  617. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  618. #define HEATER_0_PIN 4
  619. #define HEATER_1_PIN -1
  620. #define HEATER_2_PIN -1
  621. #define HEATER_BED_PIN 3 // (bed)
  622. #define SDPOWER -1
  623. #define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support
  624. #define LED_PIN -1
  625. #define FAN_PIN -1
  626. #define PS_ON_PIN 19
  627. //our pin for debugging.
  628. #define DEBUG_PIN -1
  629. //our RS485 pins
  630. //#define TX_ENABLE_PIN 12
  631. //#define RX_ENABLE_PIN 13
  632. #define BEEPER -1
  633. #define SDCARDDETECT -1
  634. #define SUICIDE_PIN -1 //has to be defined; otherwise Power_off doesn't work
  635. //Pins for 4bit LCD Support
  636. #define LCD_PINS_RS 18
  637. #define LCD_PINS_ENABLE 17
  638. #define LCD_PINS_D4 16
  639. #define LCD_PINS_D5 15
  640. #define LCD_PINS_D6 13
  641. #define LCD_PINS_D7 14
  642. //buttons are directly attached
  643. #define BTN_EN1 11
  644. #define BTN_EN2 10
  645. #define BTN_ENC 12 //the click
  646. #define BLEN_C 2
  647. #define BLEN_B 1
  648. #define BLEN_A 0
  649. #define encrot0 0
  650. #define encrot1 2
  651. #define encrot2 3
  652. #define encrot3 1
  653. #endif
  654. #if MOTHERBOARD == 7
  655. #define KNOWN_BOARD
  656. /*****************************************************************
  657. * Ultimaker pin assignment
  658. ******************************************************************/
  659. #ifndef __AVR_ATmega1280__
  660. #ifndef __AVR_ATmega2560__
  661. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  662. #endif
  663. #endif
  664. #define X_STEP_PIN 25
  665. #define X_DIR_PIN 23
  666. #define X_MIN_PIN 22
  667. #define X_MAX_PIN 24
  668. #define X_ENABLE_PIN 27
  669. #define Y_STEP_PIN 31
  670. #define Y_DIR_PIN 33
  671. #define Y_MIN_PIN 26
  672. #define Y_MAX_PIN 28
  673. #define Y_ENABLE_PIN 29
  674. #define Z_STEP_PIN 37
  675. #define Z_DIR_PIN 39
  676. #define Z_MIN_PIN 30
  677. #define Z_MAX_PIN 32
  678. #define Z_ENABLE_PIN 35
  679. #define HEATER_BED_PIN 4
  680. #define TEMP_BED_PIN 10
  681. #define HEATER_0_PIN 2
  682. #define TEMP_0_PIN 8
  683. #define HEATER_1_PIN 3
  684. #define TEMP_1_PIN 9
  685. #define HEATER_2_PIN -1
  686. #define TEMP_2_PIN -1
  687. #define E0_STEP_PIN 43
  688. #define E0_DIR_PIN 45
  689. #define E0_ENABLE_PIN 41
  690. #define E1_STEP_PIN 49
  691. #define E1_DIR_PIN 47
  692. #define E1_ENABLE_PIN 51
  693. #define SDPOWER -1
  694. #define SDSS 53
  695. #define LED_PIN 13
  696. #define FAN_PIN 7
  697. #define PS_ON_PIN 12
  698. #define KILL_PIN -1
  699. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  700. #ifdef ULTRA_LCD
  701. #ifdef NEWPANEL
  702. //arduino pin witch triggers an piezzo beeper
  703. #define BEEPER 18
  704. #define LCD_PINS_RS 20
  705. #define LCD_PINS_ENABLE 17
  706. #define LCD_PINS_D4 16
  707. #define LCD_PINS_D5 21
  708. #define LCD_PINS_D6 5
  709. #define LCD_PINS_D7 6
  710. //buttons are directly attached
  711. #define BTN_EN1 40
  712. #define BTN_EN2 42
  713. #define BTN_ENC 19 //the click
  714. #define BLEN_C 2
  715. #define BLEN_B 1
  716. #define BLEN_A 0
  717. #define SDCARDDETECT 38
  718. //encoder rotation values
  719. #define encrot0 0
  720. #define encrot1 2
  721. #define encrot2 3
  722. #define encrot3 1
  723. #else //old style panel with shift register
  724. //arduino pin witch triggers an piezzo beeper
  725. #define BEEPER 18
  726. //buttons are attached to a shift register
  727. #define SHIFT_CLK 38
  728. #define SHIFT_LD 42
  729. #define SHIFT_OUT 40
  730. #define SHIFT_EN 17
  731. #define LCD_PINS_RS 16
  732. #define LCD_PINS_ENABLE 5
  733. #define LCD_PINS_D4 6
  734. #define LCD_PINS_D5 21
  735. #define LCD_PINS_D6 20
  736. #define LCD_PINS_D7 19
  737. //encoder rotation values
  738. #define encrot0 0
  739. #define encrot1 2
  740. #define encrot2 3
  741. #define encrot3 1
  742. //bits in the shift register that carry the buttons for:
  743. // left up center down right red
  744. #define BL_LE 7
  745. #define BL_UP 6
  746. #define BL_MI 5
  747. #define BL_DW 4
  748. #define BL_RI 3
  749. #define BL_ST 2
  750. #define BLEN_B 1
  751. #define BLEN_A 0
  752. #endif
  753. #endif //ULTRA_LCD
  754. #endif
  755. #if MOTHERBOARD == 71
  756. #define KNOWN_BOARD
  757. /*****************************************************************
  758. * Ultimaker pin assignment (Old electronics)
  759. ******************************************************************/
  760. #ifndef __AVR_ATmega1280__
  761. #ifndef __AVR_ATmega2560__
  762. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  763. #endif
  764. #endif
  765. #define X_STEP_PIN 25
  766. #define X_DIR_PIN 23
  767. #define X_MIN_PIN 15
  768. #define X_MAX_PIN 14
  769. #define X_ENABLE_PIN 27
  770. #define Y_STEP_PIN 31
  771. #define Y_DIR_PIN 33
  772. #define Y_MIN_PIN 17
  773. #define Y_MAX_PIN 16
  774. #define Y_ENABLE_PIN 29
  775. #define Z_STEP_PIN 37
  776. #define Z_DIR_PIN 39
  777. #define Z_MIN_PIN 19
  778. #define Z_MAX_PIN 18
  779. #define Z_ENABLE_PIN 35
  780. #define HEATER_BED_PIN -1
  781. #define TEMP_BED_PIN -1
  782. #define HEATER_0_PIN 2
  783. #define TEMP_0_PIN 8
  784. #define HEATER_1_PIN 1
  785. #define TEMP_1_PIN 1
  786. #define HEATER_2_PIN -1
  787. #define TEMP_2_PIN -1
  788. #define E0_STEP_PIN 43
  789. #define E0_DIR_PIN 45
  790. #define E0_ENABLE_PIN 41
  791. #define E1_STEP_PIN -1
  792. #define E1_DIR_PIN -1
  793. #define E1_ENABLE_PIN -1
  794. #define SDPOWER -1
  795. #define SDSS -1
  796. #define LED_PIN -1
  797. #define FAN_PIN -1
  798. #define PS_ON_PIN -1
  799. #define KILL_PIN -1
  800. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  801. #define LCD_PINS_RS 24
  802. #define LCD_PINS_ENABLE 22
  803. #define LCD_PINS_D4 36
  804. #define LCD_PINS_D5 34
  805. #define LCD_PINS_D6 32
  806. #define LCD_PINS_D7 30
  807. #endif
  808. /****************************************************************************************
  809. * Teensylu 0.7 pin assingments (ATMEGA90USB)
  810. * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
  811. ****************************************************************************************/
  812. #if MOTHERBOARD == 8
  813. #define MOTHERBOARD 8
  814. #define KNOWN_BOARD 1
  815. #define X_STEP_PIN 0
  816. #define X_DIR_PIN 1
  817. #define X_ENABLE_PIN 39
  818. #define X_MIN_PIN 13
  819. #define X_MAX_PIN -1
  820. #define Y_STEP_PIN 2
  821. #define Y_DIR_PIN 3
  822. #define Y_ENABLE_PIN 38
  823. #define Y_MIN_PIN 14
  824. #define Y_MAX_PIN -1
  825. #define Z_STEP_PIN 4
  826. #define Z_DIR_PIN 5
  827. #define Z_ENABLE_PIN 23
  828. #define Z_MIN_PIN 15
  829. #define Z_MAX_PIN -1
  830. #define E0_STEP_PIN 6
  831. #define E0_DIR_PIN 7
  832. #define E0_ENABLE_PIN 19
  833. #define HEATER_0_PIN 21 // Extruder
  834. #define HEATER_1_PIN -1
  835. #define HEATER_2_PIN -1
  836. #define HEATER_BED_PIN 20 // Bed
  837. #define FAN_PIN 22 // Fan
  838. #define TEMP_0_PIN 7 // Extruder
  839. #define TEMP_1_PIN -1
  840. #define TEMP_2_PIN -1
  841. #define TEMP_BED_PIN 6 // Bed
  842. #define SDPOWER -1
  843. #define SDSS 8
  844. #define LED_PIN -1
  845. #define PS_ON_PIN -1
  846. #define KILL_PIN -1
  847. #define ALARM_PIN -1
  848. #ifndef SDSUPPORT
  849. // these pins are defined in the SD library if building with SD support
  850. #define SCK_PIN 9
  851. #define MISO_PIN 11
  852. #define MOSI_PIN 10
  853. #endif
  854. #endif
  855. /****************************************************************************************
  856. * Gen3+ pin assignment
  857. *
  858. ****************************************************************************************/
  859. #if MOTHERBOARD == 9
  860. #define MOTHERBOARD 6
  861. #define KNOWN_BOARD 1
  862. #ifndef __AVR_ATmega644P__
  863. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  864. #endif
  865. #define X_STEP_PIN 15
  866. #define X_DIR_PIN 18
  867. #define X_MIN_PIN 20
  868. #define X_MAX_PIN -1
  869. #define Y_STEP_PIN 23
  870. #define Y_DIR_PIN 22
  871. #define Y_MIN_PIN 25
  872. #define Y_MAX_PIN -1
  873. #define Z_STEP_PIN 27
  874. #define Z_DIR_PIN 28
  875. #define Z_MIN_PIN 30
  876. #define Z_MAX_PIN -1
  877. #define E_STEP_PIN 17
  878. #define E_DIR_PIN 21
  879. #define LED_PIN -1
  880. #define FAN_PIN -1
  881. #define PS_ON_PIN 14
  882. #define KILL_PIN -1
  883. #define HEATER_0_PIN 12 // (extruder)
  884. #define HEATER_1_PIN 16 // (bed)
  885. #define X_ENABLE_PIN 19
  886. #define Y_ENABLE_PIN 24
  887. #define Z_ENABLE_PIN 29
  888. #define E_ENABLE_PIN 13
  889. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  890. #define TEMP_1_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  891. #define TEMP_2_PIN -1
  892. #define SDPOWER -1
  893. #define SDSS 4
  894. #define HEATER_2_PIN -1
  895. #endif
  896. #ifndef KNOWN_BOARD
  897. #error Unknown MOTHERBOARD value in configuration.h
  898. #endif
  899. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  900. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN
  901. #if EXTRUDERS == 3
  902. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN
  903. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN
  904. #elif EXTRUDERS == 2
  905. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN
  906. #define _E2_PINS -1
  907. #elif EXTRUDERS == 1
  908. #define _E1_PINS -1
  909. #define _E2_PINS -1
  910. #else
  911. #error Unsupported number of extruders
  912. #endif
  913. #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, \
  914. HEATER_0_PIN, HEATER_1_PIN, HEATER_2_PIN, \
  915. HEATER_BED_PIN, FAN_PIN, \
  916. _E0_PINS, _E1_PINS, _E2_PINS, \
  917. TEMP_0_PIN, TEMP_1_PIN, TEMP_2_PIN, TEMP_BED_PIN }
  918. #endif