pins.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867
  1. #ifndef PINS_H
  2. #define PINS_H
  3. #define ALARM_PIN -1
  4. /****************************************************************************************
  5. * Arduino pin assignment
  6. *
  7. * ATMega168
  8. * +-\/-+
  9. * PC6 1| |28 PC5 (AI 5 / D19)
  10. * (D 0) PD0 2| |27 PC4 (AI 4 / D18)
  11. * (D 1) PD1 3| |26 PC3 (AI 3 / D17)
  12. * (D 2) PD2 4| |25 PC2 (AI 2 / D16)
  13. * PWM+ (D 3) PD3 5| |24 PC1 (AI 1 / D15)
  14. * (D 4) PD4 6| |23 PC0 (AI 0 / D14)
  15. * VCC 7| |22 GND
  16. * GND 8| |21 AREF
  17. * PB6 9| |20 AVCC
  18. * PB7 10| |19 PB5 (D 13)
  19. * PWM+ (D 5) PD5 11| |18 PB4 (D 12)
  20. * PWM+ (D 6) PD6 12| |17 PB3 (D 11) PWM
  21. * (D 7) PD7 13| |16 PB2 (D 10) PWM
  22. * (D 8) PB0 14| |15 PB1 (D 9) PWM
  23. * +----+
  24. ****************************************************************************************/
  25. #if MOTHERBOARD == 0
  26. #define KNOWN_BOARD 1
  27. #ifndef __AVR_ATmega168__
  28. #error Oops! Make sure you have 'Arduino Diecimila' selected from the boards menu.
  29. #endif
  30. #define X_STEP_PIN 2
  31. #define X_DIR_PIN 3
  32. #define X_ENABLE_PIN -1
  33. #define X_MIN_PIN 4
  34. #define X_MAX_PIN 9
  35. #define Y_STEP_PIN 10
  36. #define Y_DIR_PIN 7
  37. #define Y_ENABLE_PIN -1
  38. #define Y_MIN_PIN 8
  39. #define Y_MAX_PIN 13
  40. #define Z_STEP_PIN 19
  41. #define Z_DIR_PIN 18
  42. #define Z_ENABLE_PIN 5
  43. #define Z_MIN_PIN 17
  44. #define Z_MAX_PIN 16
  45. #define E_STEP_PIN 11
  46. #define E_DIR_PIN 12
  47. #define E_ENABLE_PIN -1
  48. #define SDPOWER -1
  49. #define SDSS -1
  50. #define LED_PIN -1
  51. #define FAN_PIN -1
  52. #define PS_ON_PIN 15
  53. #define KILL_PIN -1
  54. #define ALARM_PIN -1
  55. #define HEATER_0_PIN 6
  56. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  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. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
  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 ALARM_PIN -1
  117. #define HEATER_0_PIN 14
  118. #define TEMP_0_PIN 4 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  119. /* 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) */
  120. #endif
  121. /****************************************************************************************
  122. * RepRap Motherboard ****---NOOOOOO RS485/EXTRUDER CONTROLLER!!!!!!!!!!!!!!!!!---*******
  123. *
  124. ****************************************************************************************/
  125. #if MOTHERBOARD == 2
  126. #define KNOWN_BOARD 1
  127. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
  128. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  129. #endif
  130. #define X_STEP_PIN 15
  131. #define X_DIR_PIN 18
  132. #define X_ENABLE_PIN 19
  133. #define X_MIN_PIN 20
  134. #define X_MAX_PIN 21
  135. #define Y_STEP_PIN 23
  136. #define Y_DIR_PIN 22
  137. #define Y_ENABLE_PIN 24
  138. #define Y_MIN_PIN 25
  139. #define Y_MAX_PIN 26
  140. #define Z_STEP_PINN 27
  141. #define Z_DIR_PINN 28
  142. #define Z_ENABLE_PIN 29
  143. #define Z_MIN_PIN 30
  144. #define Z_MAX_PIN 31
  145. #define E_STEP_PIN 17
  146. #define E_DIR_PIN 16
  147. #define E_ENABLE_PIN -1
  148. #define SDPOWER -1
  149. #define SDSS 4
  150. #define LED_PIN 0
  151. #define SD_CARD_WRITE 2
  152. #define SD_CARD_DETECT 3
  153. #define SD_CARD_SELECT 4
  154. //our RS485 pins
  155. #define TX_ENABLE_PIN 12
  156. #define RX_ENABLE_PIN 13
  157. //pin for controlling the PSU.
  158. #define PS_ON_PIN 14
  159. #define FAN_PIN -1
  160. #define KILL_PIN -1
  161. #define ALARM_PIN -1
  162. #define HEATER_0_PIN -1
  163. #define TEMP_0_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  164. #endif
  165. /****************************************************************************************
  166. * Gen3 PLUS for RepRap Motherboard V1.2
  167. *
  168. ****************************************************************************************/
  169. #if MOTHERBOARD == 21
  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. //x axis pins
  175. #define X_STEP_PIN 15
  176. #define X_DIR_PIN 18
  177. #define X_ENABLE_PIN 19
  178. #define X_MIN_PIN 20
  179. #define X_MAX_PIN -1
  180. //y axis pins
  181. #define Y_STEP_PIN 23
  182. #define Y_DIR_PIN 22
  183. #define Y_ENABLE_PIN 24
  184. #define Y_MIN_PIN 25
  185. #define Y_MAX_PIN -1
  186. //z axis pins
  187. #define Z_STEP_PIN 27
  188. #define Z_DIR_PIN 28
  189. #define Z_ENABLE_PIN 29
  190. #define Z_MIN_PIN 30
  191. #define Z_MAX_PIN -1
  192. #define E_DIR_PIN 21
  193. #define E_STEP_PIN 17
  194. #define E_ENABLE_PIN 13
  195. //heaters
  196. //pin for hot end heater
  197. #define HEATER_0_PIN 12
  198. //Pin for heated bed heater
  199. #define HEATER_1_PIN 16
  200. //pin for debugging.
  201. #define DEBUG_PIN -1
  202. //SD card pin
  203. #define SDSS 4
  204. #define SDPOWER -1
  205. #define FAN_PIN -1
  206. #define TEMP_0_PIN 0
  207. #define TEMP_1_PIN 5
  208. #define LED_PIN -1
  209. //pin for controlling the PSU.
  210. #define PS_ON_PIN 14
  211. #endif
  212. /****************************************************************************************
  213. * Gen3 Monolithic Electronics
  214. *
  215. ****************************************************************************************/
  216. #if MOTHERBOARD == 22
  217. #define KNOWN_BOARD 1
  218. #ifndef __AVR_ATmega644P__
  219. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  220. #endif
  221. #define DEBUG_PIN 0
  222. // x axis
  223. #define X_STEP_PIN 15
  224. #define X_DIR_PIN 18
  225. #define X_MIN_PIN 20
  226. #define X_ENABLE_PIN 24 //actually uses Y_enable_pin
  227. #define X_MAX_PIN -1
  228. // y axes
  229. #define Y_STEP_PIN 23
  230. #define Y_DIR_PIN 22
  231. #define Y_MIN_PIN 25
  232. #define Y_ENABLE_PIN 24 //shared with X_enable_pin
  233. #define Y_MAX_PIN -1
  234. // z axes
  235. #define Z_STEP_PIN 27
  236. #define Z_DIR_PIN 28
  237. #define Z_MIN_PIN 30
  238. #define Z_ENABLE_PIN 29
  239. #define Z_MAX_PIN -1
  240. //extruder pins
  241. #define E_STEP_PIN 12
  242. #define E_DIR_PIN 17
  243. #define E_ENABLE_PIN 3
  244. #define HEATER_0_PIN 16
  245. #define TEMP_0_PIN 0
  246. #define FAN_PIN -1
  247. //bed pins
  248. #define HEATER_1_PIN -1
  249. #define TEMP_1_PIN -1
  250. #define SDSS -1
  251. #define SDPOWER -1
  252. #define LED_PIN -1
  253. //pin for controlling the PSU.
  254. #define PS_ON_PIN 14
  255. #endif
  256. /****************************************************************************************
  257. * Gen3 PLUS for TechZone Gen3 Remix Motherboard
  258. *
  259. ****************************************************************************************/
  260. #if MOTHERBOARD == 23
  261. #define KNOWN_BOARD 1
  262. #ifndef __AVR_ATmega644P__
  263. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  264. #endif
  265. //x axis pins
  266. #define X_STEP_PIN 15
  267. #define X_DIR_PIN 18
  268. #define X_ENABLE_PIN 24 //same as E/Y_enable_pin
  269. #define X_MIN_PIN 20
  270. #define X_MAX_PIN -1
  271. //y axis pins
  272. #define Y_STEP_PIN 23
  273. #define Y_DIR_PIN 22
  274. #define Y_ENABLE_PIN 24 //same as E/X_enable_pin
  275. #define Y_MIN_PIN 25
  276. #define Y_MAX_PIN -1
  277. //z axis pins
  278. #define Z_STEP_PIN 27
  279. #define Z_DIR_PIN 28
  280. #define Z_ENABLE_PIN 29
  281. #define Z_MIN_PIN 30
  282. #define Z_MAX_PIN -1
  283. #define E_DIR_PIN 21
  284. #define E_STEP_PIN 19
  285. #define E_ENABLE_PIN 24 //same as X/Y_enable_pin
  286. //heaters
  287. //pin for hot end heater
  288. #define HEATER_0_PIN 16
  289. //Pin for heated bed heater
  290. #define HEATER_1_PIN 17
  291. //pin for debugging.
  292. #define DEBUG_PIN -1
  293. //SD card pin
  294. #define SDSS 4
  295. #define SDPOWER -1
  296. #define FAN_PIN -1
  297. #define TEMP_0_PIN 0
  298. #define TEMP_1_PIN 5
  299. #define LED_PIN -1
  300. //pin for controlling the PSU.
  301. #define PS_ON_PIN 14
  302. #endif
  303. /****************************************************************************************
  304. * Arduino Mega pin assignment
  305. *
  306. ****************************************************************************************/
  307. #if MOTHERBOARD == 33
  308. #define MOTHERBOARD 3
  309. #define RAMPS_V_1_3
  310. #endif
  311. #if MOTHERBOARD == 3
  312. #define KNOWN_BOARD 1
  313. //////////////////FIX THIS//////////////
  314. #ifndef __AVR_ATmega1280__
  315. #ifndef __AVR_ATmega2560__
  316. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  317. #endif
  318. #endif
  319. // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
  320. // #define RAMPS_V_1_3
  321. // #define RAMPS_V_1_0
  322. #ifdef RAMPS_V_1_3
  323. #define X_STEP_PIN 54
  324. #define X_DIR_PIN 55
  325. #define X_ENABLE_PIN 38
  326. #define X_MIN_PIN 3
  327. #define X_MAX_PIN -1 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  328. #define Y_STEP_PIN 60
  329. #define Y_DIR_PIN 61
  330. #define Y_ENABLE_PIN 56
  331. #define Y_MIN_PIN 14
  332. #define Y_MAX_PIN -1 //15
  333. #define Z_STEP_PIN 46
  334. #define Z_DIR_PIN 48
  335. #define Z_ENABLE_PIN 62
  336. #define Z_MIN_PIN 18
  337. #define Z_MAX_PIN -1 //19
  338. #define E_STEP_PIN 26
  339. #define E_DIR_PIN 28
  340. #define E_ENABLE_PIN 24
  341. #define E_1_STEP_PIN 36
  342. #define E_1_DIR_PIN 34
  343. #define E_1_ENABLE_PIN 30
  344. #define SDPOWER -1
  345. #define SDSS 53
  346. #define LED_PIN 13
  347. #define FAN_PIN 9
  348. #define PS_ON_PIN 12
  349. #define KILL_PIN -1
  350. #define ALARM_PIN -1
  351. #define HEATER_0_PIN 10
  352. #define HEATER_1_PIN 8
  353. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  354. #define TEMP_1_PIN 14 // ANALOG NUMBERING
  355. #define TEMP_2_PIN 15 // ANALOG NUMBERING
  356. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default
  357. #define X_STEP_PIN 26
  358. #define X_DIR_PIN 28
  359. #define X_ENABLE_PIN 24
  360. #define X_MIN_PIN 3
  361. #define X_MAX_PIN -1 //2
  362. #define Y_STEP_PIN 38
  363. #define Y_DIR_PIN 40
  364. #define Y_ENABLE_PIN 36
  365. #define Y_MIN_PIN 16
  366. #define Y_MAX_PIN -1 //17
  367. #define Z_STEP_PIN 44
  368. #define Z_DIR_PIN 46
  369. #define Z_ENABLE_PIN 42
  370. #define Z_MIN_PIN 18
  371. #define Z_MAX_PIN -1 //19
  372. #define E_STEP_PIN 32
  373. #define E_DIR_PIN 34
  374. #define E_ENABLE_PIN 30
  375. #define SDPOWER 48
  376. #define SDSS 53
  377. #define LED_PIN 13
  378. #define PS_ON_PIN -1
  379. #define KILL_PIN -1
  380. #define ALARM_PIN -1
  381. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  382. #define HEATER_0_PIN 12 // RAMPS 1.0
  383. #define HEATER_1_PIN -1 // RAMPS 1.0
  384. #define FAN_PIN 11 // RAMPS 1.0
  385. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  386. #define HEATER_0_PIN 10 // RAMPS 1.1
  387. #define HEATER_1_PIN 8 // RAMPS 1.1
  388. #define FAN_PIN 9 // RAMPS 1.1
  389. #endif
  390. #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  391. #define TEMP_1_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  392. #endif
  393. // SPI for Max6675 Thermocouple
  394. #ifndef SDSUPPORT
  395. // these pins are defined in the SD library if building with SD support
  396. #define SCK_PIN 52
  397. #define MISO_PIN 50
  398. #define MOSI_PIN 51
  399. #define MAX6675_SS 53
  400. #else
  401. #define MAX6675_SS 49
  402. #endif
  403. #endif
  404. /****************************************************************************************
  405. * Duemilanove w/ ATMega328P pin assignment
  406. *
  407. ****************************************************************************************/
  408. #if MOTHERBOARD == 4
  409. #define KNOWN_BOARD 1
  410. #ifndef __AVR_ATmega328P__
  411. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  412. #endif
  413. #define X_STEP_PIN 19
  414. #define X_DIR_PIN 18
  415. #define X_ENABLE_PIN -1
  416. #define X_MIN_PIN 17
  417. #define X_MAX_PIN -1
  418. #define Y_STEP_PIN 10
  419. #define Y_DIR_PIN 7
  420. #define Y_ENABLE_PIN -1
  421. #define Y_MIN_PIN 8
  422. #define Y_MAX_PIN -1
  423. #define Z_STEP_PIN 13
  424. #define Z_DIR_PIN 3
  425. #define Z_ENABLE_PIN 2
  426. #define Z_MIN_PIN 4
  427. #define Z_MAX_PIN -1
  428. #define E_STEP_PIN 11
  429. #define E_DIR_PIN 12
  430. #define E_ENABLE_PIN -1
  431. #define SDPOWER -1
  432. #define SDSS -1
  433. #define LED_PIN -1
  434. #define FAN_PIN 5
  435. #define PS_ON_PIN -1
  436. #define KILL_PIN -1
  437. #define ALARM_PIN -1
  438. #define HEATER_0_PIN 6
  439. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  440. #endif
  441. /****************************************************************************************
  442. * Gen6 pin assignment
  443. *
  444. ****************************************************************************************/
  445. #if MOTHERBOARD == 5
  446. #define KNOWN_BOARD 1
  447. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
  448. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  449. #endif
  450. //x axis pins
  451. #define X_STEP_PIN 15
  452. #define X_DIR_PIN 18
  453. #define X_ENABLE_PIN 19
  454. #define X_MIN_PIN 20
  455. #define X_MAX_PIN -1
  456. //y axis pins
  457. #define Y_STEP_PIN 23
  458. #define Y_DIR_PIN 22
  459. #define Y_ENABLE_PIN 24
  460. #define Y_MIN_PIN 25
  461. #define Y_MAX_PIN -1
  462. //z axis pins
  463. #define Z_STEP_PIN 27
  464. #define Z_DIR_PIN 28
  465. #define Z_ENABLE_PIN 29
  466. #define Z_MIN_PIN 30
  467. #define Z_MAX_PIN -1
  468. //extruder pins
  469. #define E_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  470. #define E_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  471. #define E_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  472. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  473. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  474. #define HEATER_1_PIN -1 //changed @ rkoeppl 20110410
  475. #define SDPOWER -1
  476. #define SDSS 17
  477. #define LED_PIN -1 //changed @ rkoeppl 20110410
  478. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  479. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  480. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  481. //our pin for debugging.
  482. #define DEBUG_PIN 0
  483. //our RS485 pins
  484. #define TX_ENABLE_PIN 12
  485. #define RX_ENABLE_PIN 13
  486. #endif
  487. /****************************************************************************************
  488. * Sanguinololu pin assignment
  489. *
  490. ****************************************************************************************/
  491. #if MOTHERBOARD == 62
  492. #define MOTHERBOARD 6
  493. #define SANGUINOLOLU_V_1_2
  494. #endif
  495. #if MOTHERBOARD == 6
  496. #define KNOWN_BOARD 1
  497. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
  498. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  499. #endif
  500. #define X_STEP_PIN 15
  501. #define X_DIR_PIN 21
  502. #define X_MIN_PIN 18
  503. #define X_MAX_PIN -2
  504. #define Y_STEP_PIN 22
  505. #define Y_DIR_PIN 23
  506. #define Y_MIN_PIN 19
  507. #define Y_MAX_PIN -1
  508. #define Z_STEP_PIN 3
  509. #define Z_DIR_PIN 2
  510. #define Z_MIN_PIN 20
  511. #define Z_MAX_PIN -1
  512. #define E_STEP_PIN 1
  513. #define E_DIR_PIN 0
  514. #define LED_PIN -1
  515. #define FAN_PIN -1
  516. #define PS_ON_PIN -1
  517. #define KILL_PIN -1
  518. #define ALARM_PIN -1
  519. #define HEATER_0_PIN 13 // (extruder)
  520. #ifdef SANGUINOLOLU_V_1_2
  521. #define HEATER_1_PIN 12 // (bed)
  522. #define X_ENABLE_PIN 14
  523. #define Y_ENABLE_PIN 14
  524. #define Z_ENABLE_PIN 26
  525. #define E_ENABLE_PIN 14
  526. #else
  527. #define HEATER_1_PIN 14 // (bed)
  528. #define X_ENABLE_PIN -1
  529. #define Y_ENABLE_PIN -1
  530. #define Z_ENABLE_PIN -1
  531. #define E_ENABLE_PIN -1
  532. #endif
  533. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  534. #define TEMP_1_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  535. #define SDPOWER -1
  536. #define SDSS 31
  537. #endif
  538. /****************************************************************************************
  539. * Gen7 pin assignment
  540. *
  541. ****************************************************************************************
  542. * for Gen7 to work properly, you should reset your fuses to lfuse= 0xF7 ; hfuse = 0xD4 ; efuse = FD;
  543. * else you will always get a "brown out reset" loop resetting the firmware
  544. * you need a programmer to set the fuses
  545. **/
  546. #if MOTHERBOARD == 71 //GEN7 with 20 Mhz
  547. #define MOTHERBOARD 7
  548. #define QUARZ_20MHZ
  549. #endif
  550. #if MOTHERBOARD == 7
  551. #define KNOWN_BOARD 1
  552. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__) && !defined(__AVR_ATmega644__)
  553. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  554. #endif
  555. //x axis pins
  556. #define X_STEP_PIN 19
  557. #define X_DIR_PIN 18
  558. #define X_ENABLE_PIN 24
  559. #define X_MIN_PIN 7
  560. #define X_MAX_PIN -1 //X - Maxpin is 6
  561. //y axis pins
  562. #define Y_STEP_PIN 23
  563. #define Y_DIR_PIN 22
  564. #define Y_ENABLE_PIN 24
  565. #define Y_MIN_PIN 5
  566. #define Y_MAX_PIN -1 //Y - Maxpin is 2
  567. //z axis pins
  568. #define Z_STEP_PIN 26
  569. #define Z_DIR_PIN 25
  570. #define Z_ENABLE_PIN 24
  571. #define Z_MIN_PIN 1
  572. #define Z_MAX_PIN -1 //Z - Maxpin is 0
  573. //extruder pins
  574. #define E_STEP_PIN 28
  575. #define E_DIR_PIN 27
  576. #define E_ENABLE_PIN 24
  577. #define TEMP_0_PIN 1 // Extruder
  578. #define HEATER_0_PIN 4 // Extruder
  579. #define HEATER_1_PIN 3 // Bed
  580. #define SDPOWER -1
  581. #define SDSS -1
  582. #define LED_PIN -1
  583. #define TEMP_1_PIN 2 //Bed
  584. #define FAN_PIN -1
  585. #define PS_ON_PIN 15
  586. #endif
  587. /****************************************************************************************
  588. * Teensylu 0.7 pin assingments (ATMEGA90USB)
  589. * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
  590. ****************************************************************************************/
  591. #if MOTHERBOARD == 8
  592. #define MOTHERBOARD 8
  593. #define KNOWN_BOARD 1
  594. #define X_STEP_PIN 28
  595. #define X_DIR_PIN 29
  596. #define X_ENABLE_PIN 19
  597. #define X_MIN_PIN 25
  598. #define X_MAX_PIN -1
  599. #define Y_STEP_PIN 30
  600. #define Y_DIR_PIN 31
  601. #define Y_ENABLE_PIN 26
  602. #define Y_MIN_PIN 20
  603. #define Y_MAX_PIN -1
  604. #define Z_STEP_PIN 32
  605. #define Z_DIR_PIN 33
  606. #define Z_ENABLE_PIN 17
  607. #define Z_MIN_PIN 27
  608. #define Z_MAX_PIN -1
  609. #define E_STEP_PIN 34
  610. #define E_DIR_PIN 35
  611. #define E_ENABLE_PIN 13
  612. #define HEATER_0_PIN 15 // Extruder
  613. #define HEATER_1_PIN 14 // Bed
  614. #define FAN_PIN 16 // Fan
  615. #define TEMP_0_PIN 7 // Extruder
  616. #define TEMP_1_PIN 6 // Bed
  617. #define SDPOWER -1
  618. #define SDSS 20
  619. #define LED_PIN -1
  620. #define PS_ON_PIN -1
  621. #define KILL_PIN -1
  622. #define ALARM_PIN -1
  623. #ifndef SDSUPPORT
  624. // these pins are defined in the SD library if building with SD support
  625. #define SCK_PIN 21
  626. #define MISO_PIN 22
  627. #define MOSI_PIN 23
  628. #endif
  629. #endif
  630. /****************************************************************************************
  631. * Printrboard Rev. B pin assingments (ATMEGA90USB1286)
  632. * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
  633. * See http://reprap.org/wiki/Printrboard for more info
  634. ****************************************************************************************/
  635. #if MOTHERBOARD == 9
  636. #define MOTHERBOARD 9
  637. #define KNOWN_BOARD 1
  638. #define X_STEP_PIN 28
  639. #define X_DIR_PIN 29
  640. #define X_ENABLE_PIN 19
  641. #define X_MIN_PIN 47
  642. #define X_MAX_PIN -1
  643. #define Y_STEP_PIN 30
  644. #define Y_DIR_PIN 31
  645. #define Y_ENABLE_PIN 18
  646. #define Y_MIN_PIN 20
  647. #define Y_MAX_PIN -1
  648. #define Z_STEP_PIN 32
  649. #define Z_DIR_PIN 33
  650. #define Z_ENABLE_PIN 17
  651. #define Z_MIN_PIN 36
  652. #define Z_MAX_PIN -1
  653. #define E_STEP_PIN 34
  654. #define E_DIR_PIN 35
  655. #define E_ENABLE_PIN 13
  656. #define HEATER_0_PIN 15 // Extruder
  657. #define HEATER_1_PIN 14 // Bed
  658. #define FAN_PIN 16 // Fan
  659. #define TEMP_0_PIN 1 // Extruder
  660. #define TEMP_1_PIN 0 // Bed
  661. #define SDPOWER -1
  662. #define SDSS 2
  663. #define LED_PIN -1
  664. #define PS_ON_PIN -1
  665. #define KILL_PIN -1
  666. #ifndef SDSUPPORT
  667. // these pins are defined in the SD library if building with SD support
  668. #define SCK_PIN 21
  669. #define MISO_PIN 22
  670. #define MOSI_PIN 23
  671. #endif
  672. #endif
  673. #ifndef KNOWN_BOARD
  674. #error Unknown MOTHERBOARD value in configuration.h
  675. #endif
  676. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  677. const int 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, FAN_PIN, TEMP_0_PIN, TEMP_1_PIN};
  678. #endif