Advertisement
Rickybk

Pins.h

Feb 7th, 2016
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 20.83 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. #if MOTHERBOARD == 1
  101. #define KNOWN_BOARD 1
  102.  
  103. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
  104. #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  105. #endif
  106.  
  107. #define X_STEP_PIN         15
  108. #define X_DIR_PIN          18
  109. #define X_ENABLE_PIN       19
  110. #define X_MIN_PIN          20
  111. #define X_MAX_PIN          21
  112.  
  113. #define Y_STEP_PIN         23
  114. #define Y_DIR_PIN          22
  115. #define Y_ENABLE_PIN       19
  116. #define Y_MIN_PIN          25
  117. #define Y_MAX_PIN          26
  118.  
  119. #define Z_STEP_PIN         29
  120. #define Z_DIR_PIN          30
  121. #define Z_ENABLE_PIN       31
  122. #define Z_MIN_PIN           2
  123. #define Z_MAX_PIN           1
  124.  
  125. #define E_STEP_PIN         12
  126. #define E_DIR_PIN          16
  127. #define E_ENABLE_PIN        3
  128.  
  129. #define SDPOWER          -1
  130. #define SDSS          -1
  131. #define LED_PIN             0
  132. #define FAN_PIN            -1
  133. #define PS_ON_PIN          -1
  134. #define KILL_PIN           -1
  135. #define ALARM_PIN          -1
  136.  
  137. #define HEATER_0_PIN       14
  138. #define TEMP_0_PIN          4 //D27   // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  139.  
  140. /*  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)  */
  141.  
  142.  
  143.  
  144. #endif
  145.  
  146.  
  147. /****************************************************************************************
  148. * RepRap Motherboard  ****---NOOOOOO RS485/EXTRUDER CONTROLLER!!!!!!!!!!!!!!!!!---*******
  149. *
  150. ****************************************************************************************/
  151. #if MOTHERBOARD == 2
  152. #define KNOWN_BOARD 1
  153.  
  154. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
  155. #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  156. #endif
  157.  
  158. #define X_STEP_PIN      15
  159. #define X_DIR_PIN       18
  160. #define X_ENABLE_PIN    19
  161. #define X_MIN_PIN       20
  162. #define X_MAX_PIN       21
  163.  
  164. #define Y_STEP_PIN      23
  165. #define Y_DIR_PIN       22
  166. #define Y_ENABLE_PIN    24
  167. #define Y_MIN_PIN       25
  168. #define Y_MAX_PIN       26
  169.  
  170. #define Z_STEP_PINN     27
  171. #define Z_DIR_PINN      28
  172. #define Z_ENABLE_PIN    29
  173. #define Z_MIN_PIN       30
  174. #define Z_MAX_PIN       31
  175.  
  176. #define E_STEP_PIN      17
  177. #define E_DIR_PIN       16
  178. #define E_ENABLE_PIN    -1
  179.  
  180. #define SDPOWER          -1
  181. #define SDSS          4
  182. #define LED_PIN          0
  183.  
  184. #define SD_CARD_WRITE    2
  185. #define SD_CARD_DETECT   3
  186. #define SD_CARD_SELECT   4
  187.  
  188. //our RS485 pins
  189. #define TX_ENABLE_PIN   12
  190. #define RX_ENABLE_PIN   13
  191.  
  192. //pin for controlling the PSU.
  193. #define PS_ON_PIN       14
  194.  
  195. #define FAN_PIN         -1
  196. #define KILL_PIN        -1
  197. #define ALARM_PIN          -1
  198.  
  199. #define HEATER_0_PIN    -1
  200. #define TEMP_0_PIN      -1    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  201.  
  202.  
  203.  
  204.  
  205. #endif
  206.  
  207. /****************************************************************************************
  208. * Gen3 PLUS for RepRap Motherboard V1.2
  209. *
  210. ****************************************************************************************/
  211. #if MOTHERBOARD == 21
  212. #define KNOWN_BOARD 1
  213.  
  214. #ifndef __AVR_ATmega644P__
  215.     #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  216. #endif
  217.  
  218.  
  219. //x axis pins
  220. #define X_STEP_PIN      15
  221. #define X_DIR_PIN       18
  222. #define X_ENABLE_PIN    19
  223. #define X_MIN_PIN       20
  224. #define X_MAX_PIN       -1
  225.  
  226. //y axis pins
  227. #define Y_STEP_PIN      23
  228. #define Y_DIR_PIN       22
  229. #define Y_ENABLE_PIN    24
  230. #define Y_MIN_PIN       25
  231. #define Y_MAX_PIN       -1
  232.  
  233. //z axis pins
  234. #define Z_STEP_PIN      27
  235. #define Z_DIR_PIN       28
  236. #define Z_ENABLE_PIN    29
  237. #define Z_MIN_PIN       30
  238. #define Z_MAX_PIN       -1
  239.  
  240. #define E_DIR_PIN       21
  241. #define E_STEP_PIN  17
  242. #define E_ENABLE_PIN    13
  243.  
  244. //heaters
  245.  
  246. //pin for hot end heater
  247. #define HEATER_0_PIN    12
  248.  
  249. //Pin for heated bed heater
  250. #define HEATER_1_PIN     16
  251.  
  252.  
  253. //pin for debugging.
  254. #define DEBUG_PIN        -1
  255.  
  256. //SD card pin
  257.  
  258. #define SDSS          4
  259.  
  260. #define SDPOWER          -1
  261. #define FAN_PIN          -1
  262. #define TEMP_0_PIN        0
  263. #define TEMP_1_PIN        5
  264. #define LED_PIN          -1
  265.  
  266. //pin for controlling the PSU.
  267. #define PS_ON_PIN       14
  268.  
  269. #endif
  270.  
  271. /****************************************************************************************
  272. * Gen3  Monolithic Electronics
  273. *
  274. ****************************************************************************************/
  275. #if MOTHERBOARD == 22
  276. #define KNOWN_BOARD 1
  277.  
  278. #ifndef __AVR_ATmega644P__
  279.     #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  280. #endif
  281.  
  282. #define DEBUG_PIN 0
  283.  
  284.  
  285. // x axis
  286. #define X_STEP_PIN 15
  287. #define X_DIR_PIN 18
  288. #define X_MIN_PIN 20
  289. #define X_ENABLE_PIN 24 //actually uses Y_enable_pin
  290. #define X_MAX_PIN -1
  291.  
  292. // y axes
  293. #define Y_STEP_PIN 23
  294. #define Y_DIR_PIN 22
  295. #define Y_MIN_PIN 25
  296. #define Y_ENABLE_PIN 24 //shared with X_enable_pin
  297. #define Y_MAX_PIN -1
  298.  
  299. // z axes
  300. #define Z_STEP_PIN 27
  301. #define Z_DIR_PIN 28
  302. #define Z_MIN_PIN 30
  303. #define Z_ENABLE_PIN 29
  304. #define Z_MAX_PIN -1
  305.  
  306. //extruder pins
  307. #define E_STEP_PIN 12
  308. #define E_DIR_PIN 17
  309. #define E_ENABLE_PIN 3
  310. #define HEATER_0_PIN 16
  311. #define TEMP_0_PIN 0
  312.  
  313. #define FAN_PIN -1
  314.  
  315. //bed pins
  316. #define HEATER_1_PIN -1
  317. #define TEMP_1_PIN -1
  318.  
  319.  
  320. #define SDSS         -1
  321. #define SDPOWER          -1
  322. #define LED_PIN          -1
  323.  
  324. //pin for controlling the PSU.
  325. #define PS_ON_PIN       14
  326.  
  327. #endif
  328.  
  329.  
  330. /****************************************************************************************
  331. * Gen3 PLUS for TechZone Gen3 Remix Motherboard
  332. *
  333. ****************************************************************************************/
  334. #if MOTHERBOARD == 23
  335. #define KNOWN_BOARD 1
  336.  
  337. #ifndef __AVR_ATmega644P__
  338.     #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  339. #endif
  340.  
  341.  
  342. //x axis pins
  343. #define X_STEP_PIN      15
  344. #define X_DIR_PIN       18
  345. #define X_ENABLE_PIN    24 //same as E/Y_enable_pin
  346. #define X_MIN_PIN       20
  347. #define X_MAX_PIN       -1
  348.  
  349. //y axis pins
  350. #define Y_STEP_PIN      23
  351. #define Y_DIR_PIN       22
  352. #define Y_ENABLE_PIN    24 //same as E/X_enable_pin
  353. #define Y_MIN_PIN       25
  354. #define Y_MAX_PIN       -1
  355.  
  356. //z axis pins
  357. #define Z_STEP_PIN      27
  358. #define Z_DIR_PIN       28
  359. #define Z_ENABLE_PIN    29
  360. #define Z_MIN_PIN       30
  361. #define Z_MAX_PIN       -1
  362.  
  363. #define E_DIR_PIN        21
  364. #define E_STEP_PIN  19
  365. #define E_ENABLE_PIN    24 //same as X/Y_enable_pin
  366.  
  367. //heaters
  368.  
  369. //pin for hot end heater
  370. #define HEATER_0_PIN    16
  371.  
  372. //Pin for heated bed heater
  373. #define HEATER_1_PIN    17
  374.  
  375.  
  376. //pin for debugging.
  377. #define DEBUG_PIN        -1
  378.  
  379. //SD card pin
  380.  
  381. #define SDSS          4
  382.  
  383. #define SDPOWER          -1
  384. #define FAN_PIN          -1
  385. #define TEMP_0_PIN        0
  386. #define TEMP_1_PIN        5
  387. #define LED_PIN          -1
  388.  
  389. //pin for controlling the PSU.
  390. #define PS_ON_PIN       14
  391.  
  392. #endif
  393.  
  394.  
  395. /****************************************************************************************
  396. * Arduino Mega pin assignment
  397. *
  398. ****************************************************************************************/
  399. #if MOTHERBOARD == 33
  400. #define MOTHERBOARD 3
  401. #define RAMPS_V_1_3
  402. #endif
  403. #if MOTHERBOARD == 3
  404. #define KNOWN_BOARD 1
  405.  
  406. //////////////////FIX THIS//////////////
  407. #ifndef __AVR_ATmega1280__
  408.  #ifndef __AVR_ATmega2560__
  409.  #error Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  410.  #endif
  411. #endif
  412.  
  413. // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
  414. // #define RAMPS_V_1_3
  415. // #define RAMPS_V_1_0
  416.  
  417. #ifdef RAMPS_V_1_3
  418.  
  419. #define X_STEP_PIN         54
  420. #define X_DIR_PIN          55
  421. #define X_ENABLE_PIN       38
  422. #define X_MIN_PIN           3
  423. #define X_MAX_PIN          -1   //2 //Max endstops default to disabled "-1", set to commented value to enable.
  424.  
  425. #define Y_STEP_PIN         60
  426. #define Y_DIR_PIN          61
  427. #define Y_ENABLE_PIN       56
  428. #define Y_MIN_PIN          14
  429. #define Y_MAX_PIN          -1   //15
  430.  
  431. #define Z_STEP_PIN         46
  432. #define Z_DIR_PIN          48
  433. #define Z_ENABLE_PIN       62
  434. #define Z_MIN_PIN          18
  435. #define Z_MAX_PIN          -1   //19
  436.  
  437. #define E_STEP_PIN         26
  438. #define E_DIR_PIN          28
  439. #define E_ENABLE_PIN       24
  440.  
  441. #define E_1_STEP_PIN         36
  442. #define E_1_DIR_PIN          34
  443. #define E_1_ENABLE_PIN       30
  444.  
  445. #define SDPOWER            -1
  446. #define SDSS               53
  447. #define LED_PIN            13
  448. #define FAN_PIN            9
  449. #define PS_ON_PIN          12
  450. #define KILL_PIN           -1
  451. #define ALARM_PIN          -1
  452.  
  453. #define HEATER_0_PIN       10
  454. #define HEATER_1_PIN       8
  455. #define TEMP_0_PIN         13   // ANALOG NUMBERING
  456. #define TEMP_1_PIN         14   // ANALOG NUMBERING
  457. #define TEMP_2_PIN         15   // ANALOG NUMBERING
  458.  
  459. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default
  460.  
  461. #define X_STEP_PIN         26
  462. #define X_DIR_PIN          28
  463. #define X_ENABLE_PIN       24
  464. #define X_MIN_PIN           3
  465. #define X_MAX_PIN          -1    //2
  466.  
  467. #define Y_STEP_PIN         38
  468. #define Y_DIR_PIN          40
  469. #define Y_ENABLE_PIN       36
  470. #define Y_MIN_PIN          16
  471. #define Y_MAX_PIN          -1    //17
  472.  
  473. #define Z_STEP_PIN         44
  474. #define Z_DIR_PIN          46
  475. #define Z_ENABLE_PIN       42
  476. #define Z_MIN_PIN          18
  477. #define Z_MAX_PIN          -1    //19
  478.  
  479. #define E_STEP_PIN         32
  480. #define E_DIR_PIN          34
  481. #define E_ENABLE_PIN       30
  482.  
  483. #define SDPOWER            48
  484. #define SDSS               53
  485. #define LED_PIN            13
  486. #define PS_ON_PIN          -1
  487. #define KILL_PIN           -1
  488. #define ALARM_PIN          -1
  489.  
  490.  
  491. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  492.   #define HEATER_0_PIN     12    // RAMPS 1.0
  493.   #define HEATER_1_PIN     -1    // RAMPS 1.0
  494.   #define FAN_PIN          11    // RAMPS 1.0
  495.  
  496. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  497.   #define HEATER_0_PIN     10    // RAMPS 1.1
  498.   #define HEATER_1_PIN      8    // RAMPS 1.1
  499.   #define FAN_PIN           9    // RAMPS 1.1
  500. #endif
  501.  
  502. #define TEMP_0_PIN          2    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  503. #define TEMP_1_PIN          1    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  504. #endif
  505.  
  506. // SPI for Max6675 Thermocouple
  507.  
  508. #ifndef SDSUPPORT
  509. // these pins are defined in the SD library if building with SD support  
  510.   #define SCK_PIN          52
  511.   #define MISO_PIN         50
  512.   #define MOSI_PIN         51
  513.   #define MAX6675_SS       53
  514. #else
  515.   #define MAX6675_SS       49
  516. #endif
  517.  
  518.  
  519. #endif
  520. /****************************************************************************************
  521. * Duemilanove w/ ATMega328P pin assignment
  522. *
  523. ****************************************************************************************/
  524. #if MOTHERBOARD == 4
  525. #define KNOWN_BOARD 1
  526.  
  527. #ifndef __AVR_ATmega328P__
  528. #error Oops!  Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  529. #endif
  530.  
  531. #define X_STEP_PIN         19
  532. #define X_DIR_PIN          18
  533. #define X_ENABLE_PIN       -1
  534. #define X_MIN_PIN          17
  535. #define X_MAX_PIN          -1
  536.  
  537. #define Y_STEP_PIN         10
  538. #define Y_DIR_PIN           7
  539. #define Y_ENABLE_PIN       -1
  540. #define Y_MIN_PIN           8
  541. #define Y_MAX_PIN          -1
  542.  
  543. #define Z_STEP_PIN         13
  544. #define Z_DIR_PIN           3
  545. #define Z_ENABLE_PIN        2
  546. #define Z_MIN_PIN           4
  547. #define Z_MAX_PIN          -1
  548.  
  549. #define E_STEP_PIN         11
  550. #define E_DIR_PIN          12
  551. #define E_ENABLE_PIN       -1
  552.  
  553. #define SDPOWER          -1
  554. #define SDSS          -1
  555. #define LED_PIN            -1
  556. #define FAN_PIN             5
  557. #define PS_ON_PIN          -1
  558. #define KILL_PIN           -1
  559. #define ALARM_PIN          -1
  560.  
  561. #define HEATER_0_PIN        6
  562. #define TEMP_0_PIN          0    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  563.  
  564.  
  565. #endif
  566.  
  567. /****************************************************************************************
  568. * Gen6 pin assignment
  569. *
  570. ****************************************************************************************/
  571. #if MOTHERBOARD == 5
  572. #define KNOWN_BOARD 1
  573.  
  574. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
  575.     #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  576. #endif
  577.  
  578. //x axis pins
  579.     #define X_STEP_PIN      15
  580.     #define X_DIR_PIN       18
  581.     #define X_ENABLE_PIN    19
  582.     #define X_MIN_PIN       20
  583.     #define X_MAX_PIN       -1
  584.    
  585.     //y axis pins
  586.     #define Y_STEP_PIN      23
  587.     #define Y_DIR_PIN       22
  588.     #define Y_ENABLE_PIN    24
  589.     #define Y_MIN_PIN       25
  590.     #define Y_MAX_PIN       -1
  591.    
  592.     //z axis pins
  593.     #define Z_STEP_PIN      27
  594.     #define Z_DIR_PIN       28
  595.     #define Z_ENABLE_PIN    29
  596.     #define Z_MIN_PIN       30
  597.     #define Z_MAX_PIN       -1
  598.    
  599.     //extruder pins
  600.     #define E_STEP_PIN      4     //Edited @ EJE Electronics 20100715
  601.     #define E_DIR_PIN       2     //Edited @ EJE Electronics 20100715
  602.     #define E_ENABLE_PIN    3     //Added @ EJE Electronics 20100715
  603.     #define TEMP_0_PIN      5     //changed @ rkoeppl 20110410
  604.     #define HEATER_0_PIN    14    //changed @ rkoeppl 20110410
  605.     #define HEATER_1_PIN    -1    //changed @ rkoeppl 20110410
  606.    
  607.    
  608.     #define SDPOWER          -1
  609.     #define SDSS          17
  610.     #define LED_PIN         -1    //changed @ rkoeppl 20110410
  611.     #define TEMP_1_PIN      -1    //changed @ rkoeppl 20110410
  612.     #define FAN_PIN         -1    //changed @ rkoeppl 20110410
  613.     #define PS_ON_PIN       -1    //changed @ rkoeppl 20110410
  614.     //our pin for debugging.
  615.    
  616.     #define DEBUG_PIN        0
  617.    
  618.     //our RS485 pins
  619.     #define TX_ENABLE_PIN   12
  620.     #define RX_ENABLE_PIN   13
  621.  
  622. #endif
  623. /****************************************************************************************
  624. * Sanguinololu pin assignment
  625. *
  626. ****************************************************************************************/
  627. #if MOTHERBOARD == 62
  628. #define MOTHERBOARD 6
  629. #define SANGUINOLOLU_V_1_2
  630. #endif
  631. #if MOTHERBOARD == 6
  632. #define KNOWN_BOARD 1
  633. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
  634. #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  635. #endif
  636.  
  637. #define X_STEP_PIN         15
  638. #define X_DIR_PIN          21
  639. #define X_MIN_PIN          18
  640. #define X_MAX_PIN           -2
  641.  
  642. #define Y_STEP_PIN         22
  643. #define Y_DIR_PIN          23
  644. #define Y_MIN_PIN          19
  645. #define Y_MAX_PIN          -1
  646.  
  647. #define Z_STEP_PIN         3
  648. #define Z_DIR_PIN          2
  649. #define Z_MIN_PIN          20
  650. #define Z_MAX_PIN          -1
  651.  
  652. #define E_STEP_PIN         1
  653. #define E_DIR_PIN          0
  654.  
  655. #define LED_PIN            -1
  656.  
  657. #define FAN_PIN            -1
  658.  
  659. #define PS_ON_PIN          -1
  660. #define KILL_PIN           -1
  661. #define ALARM_PIN          -1
  662.  
  663. #define HEATER_0_PIN       13 // (extruder)
  664.  
  665. #ifdef SANGUINOLOLU_V_1_2
  666.  
  667. #define HEATER_1_PIN       12 // (bed)
  668. #define X_ENABLE_PIN       14
  669. #define Y_ENABLE_PIN       14
  670. #define Z_ENABLE_PIN       26
  671. #define E_ENABLE_PIN       14
  672.  
  673. #else
  674.  
  675. #define HEATER_1_PIN       14  // (bed)
  676. #define X_ENABLE_PIN       -1
  677. #define Y_ENABLE_PIN       -1
  678. #define Z_ENABLE_PIN       -1
  679. #define E_ENABLE_PIN       -1
  680.  
  681. #endif
  682.  
  683. #define TEMP_0_PIN          7   // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  684. #define TEMP_1_PIN          6   // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  685. #define SDPOWER          -1
  686. #define SDSS          31
  687.  
  688. #endif
  689.  
  690. /****************************************************************************************
  691. * Teensylu 0.7 pin assingments (ATMEGA90USB)
  692. * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
  693. ****************************************************************************************/
  694. #if MOTHERBOARD == 8
  695. #define MOTHERBOARD 8
  696. #define KNOWN_BOARD 1
  697.  
  698.  
  699. #define X_STEP_PIN          0  
  700. #define X_DIR_PIN           1  
  701. #define X_ENABLE_PIN       39
  702. #define X_MIN_PIN          13
  703. #define X_MAX_PIN          -1    
  704.  
  705. #define Y_STEP_PIN          2  
  706. #define Y_DIR_PIN           3
  707. #define Y_ENABLE_PIN       38
  708. #define Y_MIN_PIN          14
  709. #define Y_MAX_PIN          -1    
  710.  
  711. #define Z_STEP_PIN          4
  712. #define Z_DIR_PIN           5
  713. #define Z_ENABLE_PIN       23
  714. #define Z_MIN_PIN          15
  715. #define Z_MAX_PIN          -1    
  716.  
  717. #define E_STEP_PIN          6  
  718. #define E_DIR_PIN           7
  719. #define E_ENABLE_PIN       19
  720.  
  721.  
  722.  
  723. #define HEATER_0_PIN       21  // Extruder
  724. #define HEATER_1_PIN       20  // Bed
  725. #define FAN_PIN            22  // Fan  
  726.  
  727. #define TEMP_0_PIN          7  // Extruder
  728. #define TEMP_1_PIN          6  // Bed
  729.  
  730. #define SDPOWER            -1
  731. #define SDSS                8
  732. #define LED_PIN            -1
  733. #define PS_ON_PIN          -1
  734. #define KILL_PIN           -1
  735. #define ALARM_PIN          -1
  736.  
  737. #ifndef SDSUPPORT
  738. // these pins are defined in the SD library if building with SD support  
  739.   #define SCK_PIN           9
  740.   #define MISO_PIN         11
  741.   #define MOSI_PIN         10
  742. #endif
  743.  
  744. #endif
  745.  
  746. #ifndef KNOWN_BOARD
  747. #error Unknown MOTHERBOARD value in configuration.h
  748. #endif
  749.  
  750.  
  751. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  752. 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};
  753.  
  754. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement