Arduino Code for the M034 stepper motor driver of the LEPP neutron switch
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.

82 lines
2.8 KiB

2 years ago
2 years ago
2 years ago
2 years ago
  1. /*
  2. * Pin Definitins for ST Nucleo-F429ZI 144 Pin
  3. * Created by brucker 21.03.2023
  4. */
  5. #ifndef M034_PIN_DEFINITIONS_H
  6. #define M034_PIN_DEFINITIONS_H
  7. // Pin Numbers: Nucleo Pin Name // Nucleo Connector Pin, STM32 Pin, Function
  8. // Pin definitions
  9. // I2C
  10. int const PIN_I2C_SDA = D20; // CN7:4, PB9
  11. int const PIN_I2C_SCL = D21; // CN7:2, PB8
  12. // SPI1 (Arduino compatible)
  13. int const PIN_SPI_1_MOSI = D11; // CN7:14, PA7
  14. int const PIN_SPI_1_MISO = D12; // CN7:12, PA6
  15. int const PIN_SPI_1_CLK = D13; // CN7:10, PA5
  16. int const PIN_SPI_1_SS = D10; // CN7:16, PD14
  17. // SPI3
  18. int const PIN_SPI_3_MOSI = PB5_ALT1;// CN7:13, PB5, D22
  19. int const PIN_SPI_3_MISO = PB4_ALT1;// CN7:19, PB4, D25
  20. int const PIN_SPI_3_CLK = PB3_ALT1; // CN7:15, PB3, D23
  21. int const PIN_SPI_3_SS = D24; // CN7:17, PA4
  22. // SPI4
  23. int const PIN_SPI_4_MOSI = D59; // CN9:20, PE6
  24. int const PIN_SPI_4_MISO = D58; // CN9:18, PE5
  25. int const PIN_SPI_4_CLK = D39; // CN10:26, PE12
  26. int const PIN_SPI_4_SS = D57; // CN9:16, PE4
  27. // SPI5
  28. int const PIN_SPI_5_MOSI = D63; // CN9:28, PF9
  29. int const PIN_SPI_5_MISO = D61; // CN9:24, PF8
  30. int const PIN_SPI_5_CLK = D62; // CN9:26, PF7
  31. // Pin definitions for the X-NUCLEO-IHM03A1
  32. int const PIN_STEPPER_FLAG = D2; // CN10:12, PF15
  33. int const PIN_STEPPER_BUSY = D4; // CN10:8, PF14
  34. int const PIN_STEPPER_RESET = D8; // CN7:20, PF12
  35. int const PIN_STEPPER_STEP_CLK = D9;// CN7:18, PD15, SPI1
  36. int const PIN_STEPPER_SPI_SS = D10; // CN7:16, PD14, SPI1
  37. // naming scheme of stepper motor library
  38. int const nBUSY_PIN = D4;
  39. int const nSTBY_nRESET_PIN = D8;
  40. int const STCK_PIN = D9;
  41. int const nCS_PIN = D10;
  42. // RGB-LED
  43. int const PIN_RGB_LED_R = D6; // CN10:4, PE9
  44. int const PIN_RGB_LED_G = D5; // CN10:6, PE11
  45. int const PIN_RGB_LED_B = D3; // CN10:10, PE13
  46. // Optical UART
  47. int const PIN_OPTICAL_RX = D0; // CN10:16, PG9, USART6
  48. int const PIN_OPTICAL_TX = D1; // CN10:14, PG14, USART6
  49. // Push button for position controll
  50. int const PIN_BUTTON_POS1 = A6; // CN10:7, PB1
  51. int const PIN_BUTTON_POS2 = A7; // CN10:9, PC2
  52. int const PIN_BUTTON_POS3 = A8; // CN10:11, PF4
  53. // TTL input on Lemo for position controll
  54. int const PIN_LEMO_POS1 = D70; // CN9:17, PF2
  55. int const PIN_LEMO_POS2 = A5; // CN9:11, PF10
  56. int const PIN_LEMO_POS3 = A4; // CN9:9, PF5
  57. // TTL output on Lemo for Ready Signal when Positioning finished
  58. int const PIN_LEMO_READY = A3; //CN9:7, PF3
  59. // ADC inputs
  60. int const PIN_ADC_5V = A1; // CN9:3, PC0
  61. int const PIN_ADV_VIN = A2; // CN9:5, PC3
  62. int const PIN_ADC_I_M = A0; // CN9:1, PA3
  63. // old for Version 0
  64. /*
  65. // TTL input on Lemo for position controll
  66. int const PIN_POS1 = A3; // CN9:7, PF3
  67. int const PIN_POS2 = A4; // CN9:9, PF5
  68. int const PIN_POS3 = A5; // CN9:11, PF10
  69. */
  70. #endif //M034_PIN_DEFINITIONS_H