CrazyPrinterMan

Untitled

Sep 15th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.55 KB | None | 0 0
  1. Displaylist.h
  2.  
  3.  
  4. #if FEATURE_CONTROLLER == CONTROLLER_RADDS
  5. #undef SDSS
  6. #define SDSS 10
  7. #undef SPI_PIN
  8. #define SPI_PIN 77
  9. #undef SPI_CHAN
  10. #define SPI_CHAN 0
  11. #define UI_HAS_KEYS 1
  12. #define UI_HAS_BACK_KEY 1
  13. #define UI_DISPLAY_TYPE DISPLAY_4BIT
  14. #define UI_DISPLAY_CHARSET 1
  15. #define BEEPER_TYPE 1
  16. #define UI_COLS 20
  17. #define UI_ROWS 4
  18. #undef BEEPER_PIN
  19. #define BEEPER_PIN 41
  20. #define UI_DISPLAY_RS_PIN 42
  21. #define UI_DISPLAY_RW_PIN -1
  22. #define UI_DISPLAY_ENABLE_PIN 43
  23. #define UI_DISPLAY_D0_PIN 44
  24. #define UI_DISPLAY_D1_PIN 45
  25. #define UI_DISPLAY_D2_PIN 46
  26. #define UI_DISPLAY_D3_PIN 47
  27. #define UI_DISPLAY_D4_PIN 44
  28. #define UI_DISPLAY_D5_PIN 45
  29. #define UI_DISPLAY_D6_PIN 46
  30. #define UI_DISPLAY_D7_PIN 47
  31. #define UI_ENCODER_A 50
  32. #define UI_ENCODER_B 52
  33. #define UI_ENCODER_CLICK 48
  34. #define UI_RESET_PIN -1
  35. #define UI_DELAYPERCHAR 50
  36. #define UI_INVERT_MENU_DIRECTION 0
  37. #define UI_BUTTON_BACK 71
  38. #ifdef UI_MAIN
  39. void uiInitKeys() {
  40. UI_KEYS_INIT_CLICKENCODER_LOW(UI_ENCODER_A, UI_ENCODER_B); // click encoder on pins 47 and 45. Phase is connected with gnd for signals.
  41. UI_KEYS_INIT_BUTTON_LOW(UI_ENCODER_CLICK); // push button, connects gnd to pin
  42. UI_KEYS_INIT_BUTTON_LOW(UI_BUTTON_BACK);
  43. }
  44. void uiCheckKeys(uint16_t &action) {
  45. UI_KEYS_CLICKENCODER_LOW(UI_ENCODER_A, UI_ENCODER_B); // click encoder on pins 47 and 45. Phase is connected with gnd for signals.
  46. UI_KEYS_BUTTON_LOW(UI_ENCODER_CLICK, UI_ACTION_OK); // push button, connects gnd to pin
  47. UI_KEYS_BUTTON_LOW(UI_BUTTON_BACK, UI_ACTION_BACK);
  48. }
  49. inline void uiCheckSlowEncoder() {}
  50. void uiCheckSlowKeys(uint16_t &action) {}
  51. #endif
  52. #endif // Controller 7
  53.  
  54.  
  55. ----------------------------------------------------------------------------------------------------------------------------------
  56.  
  57. #elif MOTHERBOARD == 402 // RADDS
  58.  
  59. #undef SDCARDDETECT
  60. #define SDCARDDETECT 14 // sd card detect as shown on drawing
  61. //#undef SDSS
  62. //#define SDSS 4
  63. //#define SPI_PIN 87
  64. //#define SPI_CHAN 1
  65. /*#define SDSS 10
  66. #undef SPI_PIN
  67. #define SPI_PIN 77
  68. #undef SPI_CHAN
  69. #define SPI_CHAN 0
  70.  
  71. #undef SDSUPPORT
  72. #define SDSUPPORT 0 // sd card does not work reliable due to spi sharing
  73. */
  74.  
  75. #undef BEEPER_PIN
  76. #define BEEPER_PIN 41
  77. // Hardware SPI creates artifacts on display, so we use software SPI
  78. #undef U8GLIB_ST7565_NHD_C2832_HW_SPI
  79. #define U8GLIB_ST7565_NHD_C2832_SW_SPI
  80. // MOSI 43
  81. #define UI_DISPLAY_ENABLE_PIN 31
  82. //#define UI_DISPLAY_ENABLE_PIN 75
  83. //76 // SCK pin
  84. #define UI_DISPLAY_D4_PIN 33 //44
  85. // Display A0 => LCD RS
  86. #define UI_DISPLAY_D5_PIN 42
  87. // Display CS => CS0 //4 //10
  88. #define UI_DISPLAY_RS_PIN 35 //10
  89. #define UI_ENCODER_A 50
  90. #define UI_ENCODER_B 52
  91. #define UI_ENCODER_CLICK 48
  92. #define UI_RESET_PIN -1
  93. #define RED_BLUE_STATUS_LEDS
  94. // PWM2 Pin
  95. #define RED_STATUS_LED 6
  96. // PWM1 Pin
  97. #define BLUE_STATUS_LED 5
  98.  
  99.  
  100. ======================================================================================================================================
  101. ======================================================================================================================================
  102.  
  103. Pins.h
  104.  
  105.  
  106.  
  107. // RADDS Board
  108. // http://www.dr-henschke.de/RADDS_due.html
  109. #if MOTHERBOARD == 402
  110. #ifndef __SAM3X8E__
  111. #error Oops! Make sure you have 'Arduino Due' selected from the 'Tools -> Boards' menu.
  112. #endif
  113.  
  114. #define KNOWN_BOARD
  115. #define CPU_ARCH ARCH_ARM
  116. /*****************************************************************
  117. * Arduino Due Pin Assignments
  118. ******************************************************************/
  119.  
  120. #define ORIG_X_STEP_PIN 24
  121. #define ORIG_X_DIR_PIN 23
  122. #define ORIG_X_MIN_PIN 28
  123. #define ORIG_X_MAX_PIN 34
  124. #define ORIG_X_ENABLE_PIN 26
  125.  
  126. #define ORIG_Y_STEP_PIN 17
  127. #define ORIG_Y_DIR_PIN 16
  128. #define ORIG_Y_MIN_PIN 30
  129. #define ORIG_Y_MAX_PIN 36
  130. #define ORIG_Y_ENABLE_PIN 22
  131.  
  132. #define ORIG_Z_STEP_PIN 2
  133. #define ORIG_Z_DIR_PIN 3
  134. #define ORIG_Z_MIN_PIN 32
  135. #define ORIG_Z_MAX_PIN 38
  136. #define ORIG_Z_ENABLE_PIN 15
  137.  
  138. // Note that on the Due pin A0 on the board is channel 2 on the ARM chip
  139. #define HEATER_0_PIN 13
  140. // Due analog pin #54
  141. #define TEMP_0_PIN 7
  142. #define HEATER_1_PIN 7
  143. #define TEMP_1_PIN 3
  144. // Due analog pin #58
  145. #define HEATER_2_PIN 12
  146. // Due analog pin #55
  147. #define TEMP_2_PIN 6
  148. #define HEATER_3_PIN 11
  149. // Due analog pin #56
  150. #define TEMP_3_PIN 5
  151. // Due analog pin #57
  152. #define TEMP_4_PIN 4
  153.  
  154. // Due analog pin #59 = A5 -> AD 2
  155. #define THERMOCOUPLE_0_PIN 2
  156. // There are no more analog pins freely available.
  157. // You can use direction and enable pin from extruder 0 socket as they are also
  158. // analog pins. Then you need to move the stepper driver to a different socket.
  159.  
  160. // Direction pin of extruder 0
  161. #define THERMOCOUPLE_1_PIN 1
  162. // Step pin of extruder 0
  163. #define THERMOCOUPLE_2_PIN 0
  164. // Enable pin of extruder 0
  165. #define THERMOCOUPLE_3_PIN 10
  166.  
  167. #define ORIG_E0_STEP_PIN 61
  168. #define ORIG_E0_DIR_PIN 60
  169. #define ORIG_E0_ENABLE_PIN 62
  170.  
  171. #define ORIG_E1_STEP_PIN 64
  172. #define ORIG_E1_DIR_PIN 63
  173. #define ORIG_E1_ENABLE_PIN 65
  174.  
  175. #define ORIG_E2_STEP_PIN 51
  176. #define ORIG_E2_DIR_PIN 53
  177. #define ORIG_E2_ENABLE_PIN 49
  178.  
  179. // Extra driver on extension board
  180. // Might require pin 66 high for some drivers!
  181. #define ORIG_E3_STEP_PIN 35
  182. #define ORIG_E3_DIR_PIN 33
  183. #define ORIG_E3_ENABLE_PIN 37
  184.  
  185. // Extra driver on extension port
  186. // Might require pin 25 high for some drivers!
  187. #define ORIG_E4_STEP_PIN 29
  188. #define ORIG_E4_DIR_PIN 27
  189. #define ORIG_E4_ENABLE_PIN 31
  190.  
  191. #define ORIG_E5_STEP_PIN 67
  192. #define ORIG_E5_DIR_PIN 66
  193. #define ORIG_E5_ENABLE_PIN 68
  194.  
  195.  
  196. #define EXTENSION_BOARD_MS1 67
  197. #define EXTENSION_BOARD_MS2 68
  198. #define EXTENSION_BOARD_MS3 69
  199. // 66 -> not connected
  200. // 25 -> not connected
  201. // To set microstepping on startup set START_GCODE to e.g.
  202. // "M42 P67 S255\nM42 P68 S255\nM42 P69 S255"
  203.  
  204. #define SDSUPPORT 1
  205. #define SDPOWER -1
  206. // 4,10,52 if using HW SPI.
  207. #define SDSS 4
  208. #define ORIG_SDCARDDETECT 14
  209. #define SDCARDDETECTINVERTED 0
  210. #define LED_PIN -1
  211. #define ORIG_FAN_PIN 9
  212. #define ORIG_FAN2_PIN 8
  213. #define ORIG_PS_ON_PIN 40
  214. #define KILL_PIN -1
  215. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  216.  
  217. // 20 or 70
  218. #define SDA_PIN 20
  219. // 21 or 71
  220. #define SCL_PIN 21
  221.  
  222. // Servo pins: 5,6 und 39
  223.  
  224. #define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
  225. #define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
  226. #define E2_PINS ORIG_E2_STEP_PIN,ORIG_E2_DIR_PIN,ORIG_E2_ENABLE_PIN,
  227. #define E3_PINS ORIG_E3_STEP_PIN,ORIG_E3_DIR_PIN,ORIG_E3_ENABLE_PIN,
  228. #define E4_PINS ORIG_E4_STEP_PIN,ORIG_E4_DIR_PIN,ORIG_E4_ENABLE_PIN,
  229. #define E5_PINS ORIG_E5_STEP_PIN,ORIG_E5_DIR_PIN,ORIG_E5_ENABLE_PIN,
  230.  
  231. #define TWI_CLOCK_FREQ 400000
  232. // see eeprom device data sheet for the following values these are for 24xx256
  233. #define EEPROM_SERIAL_ADDR 0x50 // 7 bit i2c address (without R/W bit)
  234. #define EEPROM_PAGE_SIZE 64 // page write buffer size
  235. #define EEPROM_PAGE_WRITE_TIME 7 // page write time in milliseconds (docs say 5ms but that is too short)
  236. // specify size of eeprom address register
  237. // TWI_MMR_IADRSZ_1_BYTE for 1 byte, or TWI_MMR_IADRSZ_2_BYTE for 2 byte
  238. #define EEPROM_ADDRSZ_BYTES TWI_MMR_IADRSZ_2_BYTE
  239. #define EEPROM_AVAILABLE 1
  240. #endif
Add Comment
Please, Sign In to add comment