My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pin_mappings.h 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /******************
  2. * pin_mappings.h *
  3. ******************/
  4. /****************************************************************************
  5. * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
  6. * *
  7. * This program is free software: you can redistribute it and/or modify *
  8. * it under the terms of the GNU General Public License as published by *
  9. * the Free Software Foundation, either version 3 of the License, or *
  10. * (at your option) any later version. *
  11. * *
  12. * This program is distributed in the hope that it will be useful, *
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  15. * GNU General Public License for more details. *
  16. * *
  17. * To view a copy of the GNU General Public License, go to the following *
  18. * location: <https://www.gnu.org/licenses/>. *
  19. ****************************************************************************/
  20. #pragma once
  21. /* This file defines mappings from the ULTRA_LCD pins functions to new
  22. * functions for the FTDI display. These mappings allows any board that
  23. * support ULTRA_LCD via EXP1 and EXP2 connectors to use FTDI modules
  24. * without adding new pin definitions to the board.
  25. */
  26. #include "../../../inc/MarlinConfig.h"
  27. #if ENABLED(F6_TFT_PINMAP) // FYSETC F6 - ATmega2560
  28. #define CLCD_SPI_CS 33
  29. #define CLCD_MOD_RESET 31
  30. #elif ENABLED(S6_TFT_PINMAP) // FYSETC S6 - STM32F4
  31. #define CLCD_SPI_CS PC7
  32. #define CLCD_MOD_RESET PC6
  33. #elif ENABLED(CR10_TFT_PINMAP) // FYSETC S6 - STM32F4 - with TOUCH_UI_ULTIPANEL
  34. #define CLCD_USE_SOFT_SPI
  35. #define CLCD_SOFT_SPI_SCLK LCD_PINS_D4 // PORTA1 Pin 6
  36. #define CLCD_SOFT_SPI_MOSI LCD_PINS_ENABLE // PORTC1 Pin 8
  37. #define CLCD_SPI_CS LCD_PINS_RS // PORTA3 Pin 7
  38. #define CLCD_SOFT_SPI_MISO 16 // PORTC0 BTN_ENC Pin 2
  39. #define CLCD_MOD_RESET 11 // PORTD3 BTN_EN1 Pin 3
  40. #define CLCD_AUX_0 10 // PORTD2 BTN_EN2 Pin 5
  41. #define CLCD_AUX_1 BEEPER_PIN // PORTA4 Pin 1
  42. #elif ENABLED(AO_EXP1_DEPRECATED_PINMAP)
  43. /**
  44. * This LulzBot pinout re-purposes the UltraLCD
  45. * connector EXP1 for Software SPI (rev B, obsolete)
  46. */
  47. #define CLCD_MOD_RESET LCD_PINS_D4
  48. #define CLCD_SPI_CS LCD_PINS_D5
  49. #define CLCD_AUX_0 LCD_PINS_ENABLE
  50. #define CLCD_AUX_1 BTN_ENC
  51. #define CLCD_AUX_2 BEEPER_PIN
  52. #define CLCD_USE_SOFT_SPI
  53. #define CLCD_SOFT_SPI_SCLK LCD_PINS_D7
  54. #define CLCD_SOFT_SPI_MOSI LCD_PINS_D6
  55. #define CLCD_SOFT_SPI_MISO LCD_PINS_RS
  56. #elif ENABLED(AO_EXP1_PINMAP)
  57. /**
  58. * AO_EXP1_PINMAP with TOUCH_UI_ULTIPANEL
  59. *
  60. * This LulzBot mapping re-purposes the UltraLCD
  61. * connector EXP1 for Software SPI for display (rev C):
  62. *
  63. * EXP2: FTDI: SD -or- USB [1]: ULTRA_LCD:
  64. * 1 MISO MISO MISO --> BEEPER
  65. * 2 SCLK SCLK SCLK --> BTN_ENC
  66. * 3 PD_N - - --> LCDE
  67. * 4 - CS_N CS_N --> LCDRS
  68. * 5 CS_N - - --> LCD4
  69. * 6 MOSI MOSI MOSI --> LCD5
  70. * 7 - SD_DET INT --> LCD6
  71. * 8 RESET - RESET --> LCD4
  72. * 9 GND GND GND --> GND
  73. * 10 5V 5V 5V --> 5V
  74. *
  75. * [1] At the moment, Marlin does not support SD or USB
  76. * functionality over software SPI.
  77. */
  78. #define CLCD_MOD_RESET LCD_PINS_ENABLE
  79. #define CLCD_SPI_CS LCD_PINS_D4
  80. #define CLCD_USE_SOFT_SPI
  81. #define CLCD_SOFT_SPI_SCLK BTN_ENC
  82. #define CLCD_SOFT_SPI_MOSI LCD_PINS_D5
  83. #define CLCD_SOFT_SPI_MISO BEEPER_PIN
  84. #elif ENABLED(AO_EXP2_PINMAP)
  85. /**
  86. * AO_EXP2_PINMAP with TOUCH_UI_ULTIPANEL
  87. *
  88. * The LulzBot mapping for re-purposing the UltraLCD
  89. * connector EXP2 for hardware SPI for display and SD card
  90. * or USB (rev C):
  91. *
  92. * EXP2: FTDI: SD -or- USB: ULTRA_LCD:
  93. * 1 MISO MISO MISO --> MISO
  94. * 2 SCLK SCLK SCLK --> SCLK
  95. * 3 PD_N - - --> BTN_EN2
  96. * 4 - CS_N CS_N --> SD_CSEL
  97. * 5 CS_N - - --> BTN_EN1
  98. * 6 MOSI MOSI MOSI --> MOSI
  99. * 7 - SD_DET INT --> SD_DET
  100. * 8 RESET - RESET --> RESET
  101. * 9 GND GND GND --> GND
  102. * 10 5V 5V 5V --> KILL [3]
  103. *
  104. * [1] This configuration allows daisy-chaining of the
  105. * display and SD/FD on EXP2, except for [2]
  106. *
  107. * [2] The Ultimachine Einsy boards have a level shifter
  108. * on MISO enabled by SD_CSEL chip select, hence it
  109. * is not possible to run both the display and the
  110. * SD/FD on EXP2.
  111. *
  112. * [3] Archim Rambo provides 5V on this pin. On any other
  113. * board, divert this wire from the ribbon cable and
  114. * connect it to 5V at an endstop.
  115. */
  116. #define CLCD_SPI_CS BTN_EN1
  117. #define CLCD_MOD_RESET BTN_EN2
  118. #if MB(EINSY_RAMBO, EINSY_RETRO) && DISABLED(SDSUPPORT)
  119. #define CLCD_SPI_EXTRA_CS SDSS
  120. #endif
  121. #endif