Advertisement
Herrpaule

Sprinter FW (RAMPS 1.3) - pins.h

May 3rd, 2013
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 25.77 KB | None | 0 0
  1. #ifndef PINS_H
  2. #define PINS_H
  3. #define ALARM_PIN          -1
  4.  
  5. /****************************************************************************************
  6. * Arduino pin assignment
  7. *
  8. *                  ATMega168
  9. *                   +-\/-+
  10. *             PC6  1|    |28  PC5 (AI 5 / D19)
  11. *       (D 0) PD0  2|    |27  PC4 (AI 4 / D18)
  12. *       (D 1) PD1  3|    |26  PC3 (AI 3 / D17)
  13. *       (D 2) PD2  4|    |25  PC2 (AI 2 / D16)
  14. *  PWM+ (D 3) PD3  5|    |24  PC1 (AI 1 / D15)
  15. *       (D 4) PD4  6|    |23  PC0 (AI 0 / D14)
  16. *             VCC  7|    |22  GND
  17. *             GND  8|    |21  AREF
  18. *             PB6  9|    |20  AVCC
  19. *             PB7 10|    |19  PB5 (D 13)
  20. *  PWM+ (D 5) PD5 11|    |18  PB4 (D 12)
  21. *  PWM+ (D 6) PD6 12|    |17  PB3 (D 11) PWM
  22. *       (D 7) PD7 13|    |16  PB2 (D 10) PWM
  23. *       (D 8) PB0 14|    |15  PB1 (D 9)  PWM
  24. *                   +----+
  25. ****************************************************************************************/
  26. #if MOTHERBOARD == 0
  27. #define KNOWN_BOARD 1
  28.  
  29. #ifndef __AVR_ATmega168__
  30. #error Oops!  Make sure you have 'Arduino Diecimila' selected from the boards menu.
  31. #endif
  32.  
  33. #define X_STEP_PIN          2
  34. #define X_DIR_PIN           3
  35. #define X_ENABLE_PIN       -1
  36. #define X_MIN_PIN           4
  37. #define X_MAX_PIN           9
  38.  
  39. #define Y_STEP_PIN         10
  40. #define Y_DIR_PIN           7
  41. #define Y_ENABLE_PIN       -1
  42. #define Y_MIN_PIN           8
  43. #define Y_MAX_PIN          13
  44.  
  45. #define Z_STEP_PIN         19
  46. #define Z_DIR_PIN          18
  47. #define Z_ENABLE_PIN        5
  48. #define Z_MIN_PIN          17
  49. #define Z_MAX_PIN          16
  50.  
  51. #define E_STEP_PIN         11
  52. #define E_DIR_PIN          12
  53. #define E_ENABLE_PIN       -1
  54.  
  55. #define SDPOWER          -1
  56. #define SDSS          -1
  57. #define LED_PIN            -1
  58. #define FAN_PIN            -1
  59. #define PS_ON_PIN          15
  60. #define KILL_PIN           -1
  61. #define ALARM_PIN          -1
  62.  
  63. #define HEATER_0_PIN        6
  64. #define TEMP_0_PIN          0    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  65.  
  66.  
  67. #endif
  68.  
  69.  
  70.  
  71. /****************************************************************************************
  72. * Sanguino/RepRap Motherboard with direct-drive extruders
  73. *
  74. *                        ATMega644P
  75. *
  76. *                        +---\/---+
  77. *            (D 0) PB0  1|        |40  PA0 (AI 0 / D31)
  78. *            (D 1) PB1  2|        |39  PA1 (AI 1 / D30)
  79. *       INT2 (D 2) PB2  3|        |38  PA2 (AI 2 / D29)
  80. *        PWM (D 3) PB3  4|        |37  PA3 (AI 3 / D28)
  81. *        PWM (D 4) PB4  5|        |36  PA4 (AI 4 / D27)
  82. *       MOSI (D 5) PB5  6|        |35  PA5 (AI 5 / D26)
  83. *       MISO (D 6) PB6  7|        |34  PA6 (AI 6 / D25)
  84. *        SCK (D 7) PB7  8|        |33  PA7 (AI 7 / D24)
  85. *                  RST  9|        |32  AREF
  86. *                  VCC 10|        |31  GND
  87. *                  GND 11|        |30  AVCC
  88. *                XTAL2 12|        |29  PC7 (D 23)
  89. *                XTAL1 13|        |28  PC6 (D 22)
  90. *       RX0 (D 8)  PD0 14|        |27  PC5 (D 21) TDI
  91. *       TX0 (D 9)  PD1 15|        |26  PC4 (D 20) TDO
  92. *  INT0 RX1 (D 10) PD2 16|        |25  PC3 (D 19) TMS
  93. *  INT1 TX1 (D 11) PD3 17|        |24  PC2 (D 18) TCK
  94. *       PWM (D 12) PD4 18|        |23  PC1 (D 17) SDA
  95. *       PWM (D 13) PD5 19|        |22  PC0 (D 16) SCL
  96. *       PWM (D 14) PD6 20|        |21  PD7 (D 15) PWM
  97. *                        +--------+
  98. *
  99. ****************************************************************************************
  100. *
  101. *                     ATMega644P (SMD)
  102. *
  103. *                        +--------+
  104. *       MOSI (D 5) PB5  1| O      |44  PB4 (D 4)  PWM  
  105. *       MISO (D 6) PB6  2|        |43  PB3 (D 3)  PWM  
  106. *       SCK  (D 7) PB7  3|        |42  PB2 (D 2)  INT2  
  107. *                  RST  4|        |41  PB1 (D 1)
  108. *                  Vcc  5|        |40  PB0 (D 0)  
  109. *                  GND  6|        |39  GND
  110. *                XTAL2  7|        |38  Vcc
  111. *                XTAL1  8|        |37  PA0 (AI 0 / D31)
  112. *       RX0 (D 8)  PD0  9|        |36  PA1 (AI 1 / D30)
  113. *       TX0 (D 9)  PD1 10|        |35  PA2 (AI 2 / D29)
  114. *  INT0 RX1 (D 10) PD2 11|        |34  PA3 (AI 3 / D28)
  115. *                        +        +
  116. *  INT1 TX1 (D 11) PD3 12|        |33  PA4 (AI 4 / D27)
  117. *       PWM (D 12) PD4 13|        |32  PA5 (AI 5 / D26)
  118. *       PWM (D 13) PD5 14|        |31  PA6 (AI 6 / D25)
  119. *       PWM (D 14) PD6 15|        |30  PA7 (AI 7 / D24)
  120. *       PWM (D 15) PD7 16|        |29  AREF
  121. *                  Vcc 17|        |28  GND
  122. *                  GND 18|        |27  AVCC
  123. *           (D 16) PC0 19|        |26  PC7 (D 23)      
  124. *           (D 17) PC1 20|        |25  PC6 (D 22)      
  125. *           (D 18) PC2 21|        |24  PC5 (D 21) TDI  
  126. *           (D 19) PC3 22|        |23  PC4 (D 20) TDO  
  127. *                        +--------+
  128. *
  129. ****************************************************************************************/
  130. #if MOTHERBOARD == 1
  131. #define KNOWN_BOARD 1
  132.  
  133. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
  134. #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  135. #endif
  136.  
  137. #define X_STEP_PIN         15
  138. #define X_DIR_PIN          18
  139. #define X_ENABLE_PIN       19
  140. #define X_MIN_PIN          20
  141. #define X_MAX_PIN          21
  142.  
  143. #define Y_STEP_PIN         23
  144. #define Y_DIR_PIN          22
  145. #define Y_ENABLE_PIN       19
  146. #define Y_MIN_PIN          25
  147. #define Y_MAX_PIN          26
  148.  
  149. #define Z_STEP_PIN         29
  150. #define Z_DIR_PIN          30
  151. #define Z_ENABLE_PIN       31
  152. #define Z_MIN_PIN           2
  153. #define Z_MAX_PIN           1
  154.  
  155. #define E_STEP_PIN         12
  156. #define E_DIR_PIN          16
  157. #define E_ENABLE_PIN        3
  158.  
  159. #define SDPOWER          -1
  160. #define SDSS          -1
  161. #define LED_PIN             0
  162. #define FAN_PIN            -1
  163. #define PS_ON_PIN          -1
  164. #define KILL_PIN           -1
  165. #define ALARM_PIN          -1
  166.  
  167. #define HEATER_0_PIN       14
  168. #define TEMP_0_PIN          4 //D27   // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  169.  
  170. /*  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)  */
  171.  
  172.  
  173.  
  174. #endif
  175.  
  176.  
  177. /****************************************************************************************
  178. * RepRap Motherboard  ****---NOOOOOO RS485/EXTRUDER CONTROLLER!!!!!!!!!!!!!!!!!---*******
  179. *
  180. ****************************************************************************************/
  181. #if MOTHERBOARD == 2
  182. #define KNOWN_BOARD 1
  183.  
  184. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__) && !defined(__ATmega644P__) && !defined(__ATmega1284P__)  
  185. #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  186. #endif
  187.  
  188. #define X_STEP_PIN      15
  189. #define X_DIR_PIN       18
  190. #define X_ENABLE_PIN    19
  191. #define X_MIN_PIN       20
  192. #define X_MAX_PIN       21
  193.  
  194. #define Y_STEP_PIN      23
  195. #define Y_DIR_PIN       22
  196. #define Y_ENABLE_PIN    24
  197. #define Y_MIN_PIN       25
  198. #define Y_MAX_PIN       26
  199.  
  200. #define Z_STEP_PINN     27
  201. #define Z_DIR_PINN      28
  202. #define Z_ENABLE_PIN    29
  203. #define Z_MIN_PIN       30
  204. #define Z_MAX_PIN       31
  205.  
  206. #define E_STEP_PIN      17
  207. #define E_DIR_PIN       16
  208. #define E_ENABLE_PIN    -1
  209.  
  210. #define SDPOWER          -1
  211. #define SDSS          4
  212. #define LED_PIN          0
  213.  
  214. #define SD_CARD_WRITE    2
  215. #define SD_CARD_DETECT   3
  216. #define SD_CARD_SELECT   4
  217.  
  218. //our RS485 pins
  219. #define TX_ENABLE_PIN   12
  220. #define RX_ENABLE_PIN   13
  221.  
  222. //pin for controlling the PSU.
  223. #define PS_ON_PIN       14
  224.  
  225. #define FAN_PIN         -1
  226. #define KILL_PIN        -1
  227. #define ALARM_PIN          -1
  228.  
  229. #define HEATER_0_PIN    -1
  230. #define TEMP_0_PIN      -1    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  231.  
  232.  
  233.  
  234.  
  235. #endif
  236.  
  237. /****************************************************************************************
  238. * Gen3 PLUS for RepRap Motherboard V1.2
  239. *
  240. ****************************************************************************************/
  241. #if MOTHERBOARD == 21
  242. #define KNOWN_BOARD 1
  243.  
  244. #ifndef __AVR_ATmega644P__
  245.     #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  246. #endif
  247.  
  248.  
  249. //x axis pins
  250. #define X_STEP_PIN      15
  251. #define X_DIR_PIN       18
  252. #define X_ENABLE_PIN    19
  253. #define X_MIN_PIN       20
  254. #define X_MAX_PIN       -1
  255.  
  256. //y axis pins
  257. #define Y_STEP_PIN      23
  258. #define Y_DIR_PIN       22
  259. #define Y_ENABLE_PIN    24
  260. #define Y_MIN_PIN       25
  261. #define Y_MAX_PIN       -1
  262.  
  263. //z axis pins
  264. #define Z_STEP_PIN      27
  265. #define Z_DIR_PIN       28
  266. #define Z_ENABLE_PIN    29
  267. #define Z_MIN_PIN       30
  268. #define Z_MAX_PIN       -1
  269.  
  270. #define E_DIR_PIN       21
  271. #define E_STEP_PIN  17
  272. #define E_ENABLE_PIN    13
  273.  
  274. //heaters
  275.  
  276. //pin for hot end heater
  277. #define HEATER_0_PIN    12
  278.  
  279. //Pin for heated bed heater
  280. #define HEATER_1_PIN     16
  281.  
  282.  
  283. //pin for debugging.
  284. #define DEBUG_PIN        -1
  285.  
  286. //SD card pin
  287.  
  288. #define SDSS          4
  289.  
  290. #define SDPOWER          -1
  291. #define FAN_PIN          -1
  292. #define TEMP_0_PIN        0
  293. #define TEMP_1_PIN        5
  294. #define LED_PIN          -1
  295.  
  296. //pin for controlling the PSU.
  297. #define PS_ON_PIN       14
  298.  
  299. #endif
  300.  
  301. /****************************************************************************************
  302. * Gen3  Monolithic Electronics
  303. *
  304. ****************************************************************************************/
  305. #if MOTHERBOARD == 22
  306. #define KNOWN_BOARD 1
  307.  
  308. #ifndef __AVR_ATmega644P__
  309.     #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  310. #endif
  311.  
  312. #define DEBUG_PIN 0
  313.  
  314.  
  315. // x axis
  316. #define X_STEP_PIN 15
  317. #define X_DIR_PIN 18
  318. #define X_MIN_PIN 20
  319. #define X_ENABLE_PIN 24 //actually uses Y_enable_pin
  320. #define X_MAX_PIN -1
  321.  
  322. // y axes
  323. #define Y_STEP_PIN 23
  324. #define Y_DIR_PIN 22
  325. #define Y_MIN_PIN 25
  326. #define Y_ENABLE_PIN 24 //shared with X_enable_pin
  327. #define Y_MAX_PIN -1
  328.  
  329. // z axes
  330. #define Z_STEP_PIN 27
  331. #define Z_DIR_PIN 28
  332. #define Z_MIN_PIN 30
  333. #define Z_ENABLE_PIN 29
  334. #define Z_MAX_PIN -1
  335.  
  336. //extruder pins
  337. #define E_STEP_PIN 12
  338. #define E_DIR_PIN 17
  339. #define E_ENABLE_PIN 3
  340. #define HEATER_0_PIN 16
  341. #define TEMP_0_PIN 0
  342.  
  343. #define FAN_PIN -1
  344.  
  345. //bed pins
  346. #define HEATER_1_PIN -1
  347. #define TEMP_1_PIN -1
  348.  
  349.  
  350. #define SDSS         -1
  351. #define SDPOWER          -1
  352. #define LED_PIN          -1
  353.  
  354. //pin for controlling the PSU.
  355. #define PS_ON_PIN       14
  356.  
  357. #endif
  358.  
  359.  
  360. /****************************************************************************************
  361. * Gen3 PLUS for TechZone Gen3 Remix Motherboard
  362. *
  363. ****************************************************************************************/
  364. #if MOTHERBOARD == 23
  365. #define KNOWN_BOARD 1
  366.  
  367. #ifndef __AVR_ATmega644P__
  368.     #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  369. #endif
  370.  
  371.  
  372. //x axis pins
  373. #define X_STEP_PIN      15
  374. #define X_DIR_PIN       18
  375. #define X_ENABLE_PIN    24 //same as E/Y_enable_pin
  376. #define X_MIN_PIN       20
  377. #define X_MAX_PIN       -1
  378.  
  379. //y axis pins
  380. #define Y_STEP_PIN      23
  381. #define Y_DIR_PIN       22
  382. #define Y_ENABLE_PIN    24 //same as E/X_enable_pin
  383. #define Y_MIN_PIN       25
  384. #define Y_MAX_PIN       -1
  385.  
  386. //z axis pins
  387. #define Z_STEP_PIN      27
  388. #define Z_DIR_PIN       28
  389. #define Z_ENABLE_PIN    29
  390. #define Z_MIN_PIN       30
  391. #define Z_MAX_PIN       -1
  392.  
  393. #define E_DIR_PIN        21
  394. #define E_STEP_PIN  19
  395. #define E_ENABLE_PIN    24 //same as X/Y_enable_pin
  396.  
  397. //heaters
  398.  
  399. //pin for hot end heater
  400. #define HEATER_0_PIN    16
  401.  
  402. //Pin for heated bed heater
  403. #define HEATER_1_PIN    17
  404.  
  405.  
  406. //pin for debugging.
  407. #define DEBUG_PIN        -1
  408.  
  409. //SD card pin
  410.  
  411. #define SDSS          4
  412.  
  413. #define SDPOWER          -1
  414. #define FAN_PIN          -1
  415. #define TEMP_0_PIN        0
  416. #define TEMP_1_PIN        5
  417. #define LED_PIN          -1
  418.  
  419. //pin for controlling the PSU.
  420. #define PS_ON_PIN       14
  421.  
  422. #endif
  423.  
  424.  
  425. /****************************************************************************************
  426. * Arduino Mega pin assignment
  427. *
  428. ****************************************************************************************/
  429. #if MOTHERBOARD == 33
  430. #define MOTHERBOARD 3
  431. #define RAMPS_V_1_3
  432. #endif
  433. #if MOTHERBOARD == 3
  434. #define KNOWN_BOARD 1
  435.  
  436. //////////////////FIX THIS//////////////
  437. #ifndef __AVR_ATmega1280__
  438.  #ifndef __AVR_ATmega2560__
  439.  #error Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  440.  #endif
  441. #endif
  442.  
  443. // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
  444. #define RAMPS_V_1_3
  445. // #define RAMPS_V_1_0
  446.  
  447. #ifdef RAMPS_V_1_3
  448.  
  449. #define X_STEP_PIN         54
  450. #define X_DIR_PIN          55
  451. #define X_ENABLE_PIN       38
  452. #define X_MIN_PIN           3
  453. #define X_MAX_PIN          -1   //2 //Max endstops default to disabled "-1", set to commented value to enable.
  454.  
  455. #define Y_STEP_PIN         60
  456. #define Y_DIR_PIN          61
  457. #define Y_ENABLE_PIN       56
  458. #define Y_MIN_PIN          14
  459. #define Y_MAX_PIN          -1   //15
  460.  
  461. #define Z_STEP_PIN         46
  462. #define Z_DIR_PIN          48
  463. #define Z_ENABLE_PIN       62
  464. #define Z_MIN_PIN          18
  465. #define Z_MAX_PIN          -1   //19
  466.  
  467. #define E_STEP_PIN         26
  468. #define E_DIR_PIN          28
  469. #define E_ENABLE_PIN       24
  470.  
  471. #define E_1_STEP_PIN       36
  472. #define E_1_DIR_PIN        34
  473. #define E_1_ENABLE_PIN     30
  474.  
  475. #define SDPOWER            -1
  476. #define SDSS               53
  477. #define LED_PIN            13
  478. #define FAN_PIN            9
  479. #define PS_ON_PIN          12
  480. #define KILL_PIN           -1
  481. #define ALARM_PIN          -1
  482.  
  483. #define HEATER_0_PIN       10
  484. #define HEATER_1_PIN       8
  485. #define TEMP_0_PIN         13   // ANALOG NUMBERING
  486. #define TEMP_1_PIN         14   // ANALOG NUMBERING
  487. #define TEMP_2_PIN         15   // ANALOG NUMBERING
  488.  
  489. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default
  490.  
  491. #define X_STEP_PIN         26
  492. #define X_DIR_PIN          28
  493. #define X_ENABLE_PIN       24
  494. #define X_MIN_PIN           3
  495. #define X_MAX_PIN          -1    //2
  496.  
  497. #define Y_STEP_PIN         38
  498. #define Y_DIR_PIN          40
  499. #define Y_ENABLE_PIN       36
  500. #define Y_MIN_PIN          16
  501. #define Y_MAX_PIN          -1    //17
  502.  
  503. #define Z_STEP_PIN         44
  504. #define Z_DIR_PIN          46
  505. #define Z_ENABLE_PIN       42
  506. #define Z_MIN_PIN          18
  507. #define Z_MAX_PIN          -1    //19
  508.  
  509. #define E_STEP_PIN         32
  510. #define E_DIR_PIN          34
  511. #define E_ENABLE_PIN       30
  512.  
  513. #define SDPOWER            48
  514. #define SDSS               53
  515. #define LED_PIN            13
  516. #define PS_ON_PIN          -1
  517. #define KILL_PIN           -1
  518. #define ALARM_PIN          -1
  519.  
  520.  
  521. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  522.   #define HEATER_0_PIN     12    // RAMPS 1.0
  523.   #define HEATER_1_PIN     -1    // RAMPS 1.0
  524.   #define FAN_PIN          11    // RAMPS 1.0
  525.  
  526. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  527.   #define HEATER_0_PIN     10    // RAMPS 1.1
  528.   #define HEATER_1_PIN      8    // RAMPS 1.1
  529.   #define FAN_PIN           9    // RAMPS 1.1
  530. #endif
  531.  
  532. #define TEMP_0_PIN          2    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  533. #define TEMP_1_PIN          1    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  534. #endif
  535.  
  536. // SPI for Max6675 Thermocouple
  537.  
  538. #ifndef SDSUPPORT
  539. // these pins are defined in the SD library if building with SD support  
  540.   #define SCK_PIN          52
  541.   #define MISO_PIN         50
  542.   #define MOSI_PIN         51
  543.   #define MAX6675_SS       53
  544. #else
  545.   #define MAX6675_SS       49
  546. #endif
  547.  
  548.  
  549. #endif
  550. /****************************************************************************************
  551. * Duemilanove w/ ATMega328P pin assignment
  552. *
  553. ****************************************************************************************/
  554. #if MOTHERBOARD == 4
  555. #define KNOWN_BOARD 1
  556.  
  557. #ifndef __AVR_ATmega328P__
  558. #error Oops!  Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  559. #endif
  560.  
  561. #define X_STEP_PIN         19
  562. #define X_DIR_PIN          18
  563. #define X_ENABLE_PIN       -1
  564. #define X_MIN_PIN          17
  565. #define X_MAX_PIN          -1
  566.  
  567. #define Y_STEP_PIN         10
  568. #define Y_DIR_PIN           7
  569. #define Y_ENABLE_PIN       -1
  570. #define Y_MIN_PIN           8
  571. #define Y_MAX_PIN          -1
  572.  
  573. #define Z_STEP_PIN         13
  574. #define Z_DIR_PIN           3
  575. #define Z_ENABLE_PIN        2
  576. #define Z_MIN_PIN           4
  577. #define Z_MAX_PIN          -1
  578.  
  579. #define E_STEP_PIN         11
  580. #define E_DIR_PIN          12
  581. #define E_ENABLE_PIN       -1
  582.  
  583. #define SDPOWER          -1
  584. #define SDSS          -1
  585. #define LED_PIN            -1
  586. #define FAN_PIN             5
  587. #define PS_ON_PIN          -1
  588. #define KILL_PIN           -1
  589. #define ALARM_PIN          -1
  590.  
  591. #define HEATER_0_PIN        6
  592. #define TEMP_0_PIN          0    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  593.  
  594.  
  595. #endif
  596.  
  597. /****************************************************************************************
  598. * Gen6 pin assignment
  599. *
  600. ****************************************************************************************/
  601. #if MOTHERBOARD == 51
  602.   #define MOTHERBOARD 5
  603.   #define GEN6_DELUXE
  604. #endif
  605.  
  606. #if MOTHERBOARD == 5
  607. #define KNOWN_BOARD 1
  608.  
  609. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
  610.     #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  611. #endif
  612.  
  613. //x axis pins
  614.     #define X_STEP_PIN      15
  615.     #define X_DIR_PIN       18
  616.     #define X_ENABLE_PIN    19
  617.     #define X_MIN_PIN       20
  618.     #define X_MAX_PIN       -1
  619.    
  620.     //y axis pins
  621.     #define Y_STEP_PIN      23
  622.     #define Y_DIR_PIN       22
  623.     #define Y_ENABLE_PIN    24
  624.     #define Y_MIN_PIN       25
  625.     #define Y_MAX_PIN       -1
  626.    
  627.     //z axis pins
  628.     #define Z_STEP_PIN      27
  629.     #define Z_DIR_PIN       28
  630.     #define Z_ENABLE_PIN    29
  631.     #define Z_MIN_PIN       30
  632.     #define Z_MAX_PIN       -1
  633.    
  634.     //extruder pins
  635.     #define E_STEP_PIN      4     //Edited @ EJE Electronics 20100715
  636.     #define E_DIR_PIN       2     //Edited @ EJE Electronics 20100715
  637.     #define E_ENABLE_PIN    3     //Added @ EJE Electronics 20100715
  638.     #define TEMP_0_PIN      5     //changed @ rkoeppl 20110410
  639.     #define HEATER_0_PIN    14    //changed @ rkoeppl 20110410
  640.    
  641.     #ifdef GEN6_DELUXE
  642.       #define HEATER_1_PIN   1    
  643.       #define TEMP_1_PIN     0    
  644.     #else
  645.       #define HEATER_1_PIN   -1  
  646.       #define TEMP_1_PIN     -1    
  647.     #endif
  648.    
  649.     #define SDPOWER          -1
  650.     #define SDSS          17
  651.     #define LED_PIN         -1    //changed @ rkoeppl 20110410
  652.     #define FAN_PIN         -1    //changed @ rkoeppl 20110410
  653.     #define PS_ON_PIN       -1    //changed @ rkoeppl 20110410
  654.     //our pin for debugging.
  655.    
  656.     #define DEBUG_PIN        0
  657.    
  658.     //our RS485 pins
  659.     #define TX_ENABLE_PIN   12
  660.     #define RX_ENABLE_PIN   13
  661.  
  662. #endif
  663. /****************************************************************************************
  664. * Sanguinololu pin assignment
  665. *
  666. ****************************************************************************************/
  667. #if MOTHERBOARD == 62
  668. #define MOTHERBOARD 6
  669. #define SANGUINOLOLU_V_1_2
  670. #endif
  671. #if MOTHERBOARD == 6
  672. #define KNOWN_BOARD 1
  673. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
  674. #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  675. #endif
  676.  
  677. #define X_STEP_PIN         15
  678. #define X_DIR_PIN          21
  679. #define X_MIN_PIN          18
  680. #define X_MAX_PIN           -2
  681.  
  682. #define Y_STEP_PIN         22
  683. #define Y_DIR_PIN          23
  684. #define Y_MIN_PIN          19
  685. #define Y_MAX_PIN          -1
  686.  
  687. #define Z_STEP_PIN         3
  688. #define Z_DIR_PIN          2
  689. #define Z_MIN_PIN          20
  690. #define Z_MAX_PIN          -1
  691.  
  692. #define E_STEP_PIN         1
  693. #define E_DIR_PIN          0
  694.  
  695. #define LED_PIN            -1
  696.  
  697. #define FAN_PIN            -1
  698.  
  699. #define PS_ON_PIN          -1
  700. #define KILL_PIN           -1
  701. #define ALARM_PIN          -1
  702.  
  703. #define HEATER_0_PIN       13 // (extruder)
  704.  
  705. #ifdef SANGUINOLOLU_V_1_2
  706.  
  707. #define HEATER_1_PIN       12 // (bed)
  708. #define X_ENABLE_PIN       14
  709. #define Y_ENABLE_PIN       14
  710. #define Z_ENABLE_PIN       26
  711. #define E_ENABLE_PIN       14
  712. #else
  713.  
  714. #define HEATER_1_PIN       14  // (bed)
  715. #define X_ENABLE_PIN       -1
  716. #define Y_ENABLE_PIN       -1
  717. #define Z_ENABLE_PIN       -1
  718. #define E_ENABLE_PIN       -1
  719.  
  720. #endif
  721.  
  722. #define TEMP_0_PIN          7   // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  723. #define TEMP_1_PIN          6   // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  724. #define SDPOWER          -1
  725. #define SDSS          31
  726.  
  727. #endif
  728.  
  729. /****************************************************************************************
  730. * Gen7 pin assignment
  731. *
  732. ****************************************************************************************
  733. * for Gen7 to work properly, you should reset your fuses to lfuse= 0xF7 ; hfuse = 0xD4 ; efuse = FD;
  734. * else you will always get a "brown out reset" loop resetting the firmware
  735. * you need a programmer to set the fuses
  736. **/
  737. #if MOTHERBOARD == 71    //GEN7 with 20 Mhz
  738. #define MOTHERBOARD 7
  739. #define QUARZ_20MHZ
  740. #endif
  741.  
  742. #if MOTHERBOARD == 7
  743. #define KNOWN_BOARD 1
  744.  
  745. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__) && !defined(__AVR_ATmega644__)
  746.     #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  747. #endif
  748.  
  749. //x axis pins
  750.     #define X_STEP_PIN      19
  751.     #define X_DIR_PIN       18
  752.     #define X_ENABLE_PIN    24
  753.     #define X_MIN_PIN       7
  754.     #define X_MAX_PIN       -1      //X - Maxpin is 6
  755.  
  756.     //y axis pins
  757.     #define Y_STEP_PIN      23
  758.     #define Y_DIR_PIN       22
  759.     #define Y_ENABLE_PIN    24
  760.     #define Y_MIN_PIN       5
  761.     #define Y_MAX_PIN       -1      //Y - Maxpin is 2
  762.  
  763.     //z axis pins
  764.     #define Z_STEP_PIN      26
  765.     #define Z_DIR_PIN       25
  766.     #define Z_ENABLE_PIN    24
  767.     #define Z_MIN_PIN       1
  768.     #define Z_MAX_PIN       -1      //Z - Maxpin is 0
  769.  
  770.     //extruder pins
  771.     #define E_STEP_PIN      28    
  772.     #define E_DIR_PIN       27    
  773.     #define E_ENABLE_PIN    24    
  774.     #define TEMP_0_PIN      1    // Extruder
  775.     #define HEATER_0_PIN     4    // Extruder
  776.     #define HEATER_1_PIN     3    // Bed
  777.  
  778.  
  779.     #define SDPOWER         -1
  780.     #define SDSS            -1
  781.     #define LED_PIN         -1    
  782.     #define TEMP_1_PIN      2    //Bed  
  783.     #define FAN_PIN         -1    
  784.     #define PS_ON_PIN       15    
  785.  
  786. #endif
  787.  
  788. /****************************************************************************************
  789. * Teensylu 0.7 pin assingments (ATMEGA90USB)
  790. * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
  791. ****************************************************************************************/
  792. #if MOTHERBOARD == 8
  793. #define MOTHERBOARD 8
  794. #define KNOWN_BOARD 1
  795.  
  796.  
  797. #define X_STEP_PIN         28
  798. #define X_DIR_PIN          29
  799. #define X_ENABLE_PIN       19
  800. #define X_MIN_PIN          25
  801. #define X_MAX_PIN          -1    
  802.  
  803. #define Y_STEP_PIN         30
  804. #define Y_DIR_PIN          31
  805. #define Y_ENABLE_PIN       26
  806. #define Y_MIN_PIN           20
  807. #define Y_MAX_PIN          -1    
  808.  
  809. #define Z_STEP_PIN         32
  810. #define Z_DIR_PIN          33
  811. #define Z_ENABLE_PIN       17
  812. #define Z_MIN_PIN          27
  813. #define Z_MAX_PIN          -1    
  814.  
  815. #define E_STEP_PIN         34
  816. #define E_DIR_PIN          35
  817. #define E_ENABLE_PIN       13
  818.  
  819. #define HEATER_0_PIN       15  // Extruder
  820. #define HEATER_1_PIN       14  // Bed
  821. #define FAN_PIN            16  // Fan  
  822.  
  823. #define TEMP_0_PIN          7  // Extruder
  824. #define TEMP_1_PIN          6  // Bed
  825.  
  826. #define SDPOWER            -1
  827. #define SDSS                20
  828. #define LED_PIN            -1
  829. #define PS_ON_PIN          -1
  830. #define KILL_PIN           -1
  831. #define ALARM_PIN          -1
  832.  
  833. #ifndef SDSUPPORT
  834. // these pins are defined in the SD library if building with SD support  
  835.   #define SCK_PIN          21
  836.   #define MISO_PIN         22
  837.   #define MOSI_PIN         23
  838. #endif
  839.  
  840. #endif
  841.  
  842. /****************************************************************************************
  843. * Printrboard Rev. B pin assingments (ATMEGA90USB1286)
  844. * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
  845. * See http://reprap.org/wiki/Printrboard for more info
  846. ****************************************************************************************/
  847. #if MOTHERBOARD == 9
  848. #define MOTHERBOARD 9
  849. #define KNOWN_BOARD 1
  850.  
  851.  
  852. #define X_STEP_PIN         28
  853. #define X_DIR_PIN          29
  854. #define X_ENABLE_PIN       19
  855. #define X_MIN_PIN          47
  856. #define X_MAX_PIN          -1
  857.  
  858. #define Y_STEP_PIN         30
  859. #define Y_DIR_PIN          31
  860. #define Y_ENABLE_PIN       18
  861. #define Y_MIN_PIN           20
  862. #define Y_MAX_PIN          -1
  863.  
  864. #define Z_STEP_PIN         32
  865. #define Z_DIR_PIN          33
  866. #define Z_ENABLE_PIN       17
  867. #define Z_MIN_PIN          36
  868. #define Z_MAX_PIN          -1
  869.  
  870. #define E_STEP_PIN         34
  871. #define E_DIR_PIN          35
  872. #define E_ENABLE_PIN       13
  873.  
  874. #define HEATER_0_PIN       15  // Extruder
  875. #define HEATER_1_PIN       14  // Bed
  876. #define FAN_PIN            16  // Fan
  877.  
  878. #define TEMP_0_PIN          1  // Extruder
  879. #define TEMP_1_PIN          0  // Bed
  880.  
  881. #define SDPOWER            -1
  882. #define SDSS                2
  883. #define LED_PIN            -1
  884. #define PS_ON_PIN          -1
  885. #define KILL_PIN           -1
  886.  
  887. #ifndef SDSUPPORT
  888. // these pins are defined in the SD library if building with SD support
  889.   #define SCK_PIN          21
  890.   #define MISO_PIN         22
  891.   #define MOSI_PIN         23
  892. #endif
  893.  
  894. #endif
  895.  
  896. #ifndef KNOWN_BOARD
  897. #error Unknown MOTHERBOARD value in configuration.h
  898. #endif
  899.  
  900.  
  901. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  902. 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};
  903.  
  904. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement