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.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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: <http://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. #ifdef CR10_TFT_PINMAP
  27. #ifndef __MARLIN_FIRMWARE__
  28. #error "This pin mapping requires Marlin."
  29. #endif
  30. #define CLCD_USE_SOFT_SPI
  31. #define CLCD_SOFT_SPI_SCLK LCD_PINS_D4 // PORTA1 Pin 6
  32. #define CLCD_SOFT_SPI_MOSI LCD_PINS_ENABLE // PORTC1 Pin 8
  33. #define CLCD_SPI_CS LCD_PINS_RS // PORTA3 Pin 7
  34. #define CLCD_SOFT_SPI_MISO 16 // PORTC0 BTN_ENC Pin 2
  35. #define CLCD_MOD_RESET 11 // PORTD3 BTN_EN1 Pin 3
  36. #define CLCD_AUX_0 10 // PORTD2 BTN_EN2 Pin 5
  37. #define CLCD_AUX_1 BEEPER_PIN // PORTA4 Pin 1
  38. #endif
  39. /**
  40. * The AlephObjects pinout for re-purposing the UltraLCD
  41. * connector EXP1 for software SPI (rev B, obsolete)
  42. */
  43. #ifdef AO_EXP1_DEPRECATED_PINMAP
  44. #ifndef __MARLIN_FIRMWARE__
  45. #error "This pin mapping requires Marlin."
  46. #endif
  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. #endif
  57. /**
  58. * AO_EXP1_PINMAP
  59. *
  60. * The AlephObjects mapping for re-purposing 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. #ifdef AO_EXP1_PINMAP
  79. #ifndef __MARLIN_FIRMWARE__
  80. #error "This pin mapping requires Marlin."
  81. #endif
  82. #define CLCD_MOD_RESET LCD_PINS_ENABLE
  83. #define CLCD_SPI_CS LCD_PINS_D4
  84. #define CLCD_USE_SOFT_SPI
  85. #define CLCD_SOFT_SPI_SCLK BTN_ENC
  86. #define CLCD_SOFT_SPI_MOSI LCD_PINS_D5
  87. #define CLCD_SOFT_SPI_MISO BEEPER_PIN
  88. #endif
  89. /**
  90. * AO_EXP2_PINMAP
  91. *
  92. * The AlephObjects mapping for re-purposing the UltraLCD
  93. * connector EXP2 for hardware SPI for display and SD card
  94. * or USB (rev C):
  95. *
  96. * EXP2: FTDI: SD -or- USB: ULTRA_LCD:
  97. * 1 MISO MISO MISO --> MISO
  98. * 2 SCLK SCLK SCLK --> SCLK
  99. * 3 PD_N - - --> BTN_EN2
  100. * 4 - CS_N CS_N --> SD_CSEL
  101. * 5 CS_N - - --> BTN_EN1
  102. * 6 MOSI MOSI MOSI --> MOSI
  103. * 7 - SD_DET INT --> SD_DET
  104. * 8 RESET - RESET --> RESET
  105. * 9 GND GND GND --> GND
  106. * 10 5V 5V 5V --> KILL [3]
  107. *
  108. * [1] This configuration is not compatible with the
  109. * EinsyRetro 1.1a because there is a level shifter
  110. * on MISO enabled by SD/USB chip select.
  111. *
  112. * [2] This configuration allows daisy-chaining of the
  113. * display and SD/USB on EXP2.
  114. *
  115. * [3] Archim Rambo provides 5V on this pin. On any other
  116. * board, divert this wire from the ribbon cable and
  117. * connect it to 5V at an endstop.
  118. */
  119. #ifdef AO_EXP2_PINMAP
  120. #ifndef __MARLIN_FIRMWARE__
  121. #error "This pin mapping requires Marlin."
  122. #endif
  123. #define CLCD_SPI_CS BTN_EN1
  124. #define CLCD_MOD_RESET BTN_EN2
  125. #endif