-
Notifications
You must be signed in to change notification settings - Fork 43
/
mks_tinybee_1_0_map.h
124 lines (100 loc) · 3.62 KB
/
mks_tinybee_1_0_map.h
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/*
mks_tinybee_1_0_map.h - An embedded CNC Controller with rs274/ngc (g-code) support
Driver code for ESP32
Part of grblHAL
Copyright (c) 2022 Ennio Sesana
Copyright (c) 2023 Terje Io (added SD card, ModBus and MPG options)
Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Grbl is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/
#define BOARD_NAME "MKS Tinybee V1.0"
#define BOARD_URL "https://github.com/makerbase-mks/MKS-TinyBee"
#define USE_I2S_OUT
#define I2S_OUT_PIN_BASE 64
#define I2S_SPINDLE
#define I2S_COOLANT
// timer definitions
#define STEP_TIMER_GROUP TIMER_GROUP_0
#define STEP_TIMER_INDEX TIMER_0
#define I2S_OUT_BCK GPIO_NUM_25
#define I2S_OUT_WS GPIO_NUM_26
#define I2S_OUT_DATA GPIO_NUM_27
#define X_STEP_PIN I2SO(1)
#define X_DIRECTION_PIN I2SO(2)
#define X_ENABLE_PIN I2SO(0)
#define X_LIMIT_PIN GPIO_NUM_33
#define Y_STEP_PIN I2SO(4)
#define Y_DIRECTION_PIN I2SO(5)
#define Y_ENABLE_PIN I2SO(3)
#define Y_LIMIT_PIN GPIO_NUM_32
#define Z_STEP_PIN I2SO(7)
#define Z_DIRECTION_PIN I2SO(8)
#define Z_ENABLE_PIN I2SO(6)
#define Z_LIMIT_PIN GPIO_NUM_22
#if N_ABC_MOTORS >= 1
#define M3_AVAILABLE // E0
#define M3_STEP_PIN I2SO(10)
#define M3_DIRECTION_PIN I2SO(11)
#define M3_ENABLE_PIN I2SO(9)
#if SDCARD_ENABLE
#define M4_LIMIT_PIN GPIO_NUM_12 // EXP2
#else
#define M3_LIMIT_PIN GPIO_NUM_19 // EXP2
#endif
#endif
#if N_ABC_MOTORS >= 2
#define M4_AVAILABLE // E1
#define M4_STEP_PIN I2SO(13)
#define M4_DIRECTION_PIN I2SO(14)
#define M4_ENABLE_PIN I2SO(12)
#if SDCARD_ENABLE
#define M4_LIMIT_PIN GPIO_NUM_14 // EXP2
#else
#define M4_LIMIT_PIN GPIO_NUM_18 // EXP2
#endif
#endif
// Define spindle enable and spindle direction output pins.
#define I2S_SPINDLE 1
#define SPINDLEPWMPIN GPIO_NUM_2
#define SPINDLE_ENABLE_PIN I2SO(17) // HE0
#define SPINDLE_DIRECTION_PIN I2SO(18) // HE1
// Define flood and mist coolant enable output pins.
#define I2S_COOLANT 1
#define COOLANT_FLOOD_PIN I2SO(19) // FAN1
#define COOLANT_MIST_PIN I2SO(20) // FAN2
// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
#define CYCLE_START_PIN GPIO_NUM_36 // TH1
#define FEED_HOLD_PIN GPIO_NUM_34 // TH2
//#define RESET_PIN (use board hardware)
#if SAFETY_DOOR_ENABLE
#define SAFETY_DOOR_PIN GPIO_NUM_39 // TB
#endif
// Define probe switch input pin.
#if PROBE_ENABLE
#define PROBE_PIN GPIO_NUM_35 // MT_DET
#endif
#if MODBUS_ENABLE
#define UART2_RX_PIN GPIO_NUM_16 // EXP_1
#define UART2_TX_PIN GPIO_NUM_17 // EXP_1
#if RS485_DIR_ENABLE
#define MODBUS_DIRECTION_PIN GPIO_NUM_13 // EXP_1
#endif
#endif
#if MPG_MODE_ENABLE
#define UART2_RX_PIN GPIO_NUM_16 // EXP_1
#define MPG_ENABLE_PIN GPIO_NUM_13 // EXP_1
#endif
#if SDCARD_ENABLE
#define PIN_NUM_MISO GPIO_NUM_19
#define PIN_NUM_MOSI GPIO_NUM_23
#define PIN_NUM_CLK GPIO_NUM_18
#define PIN_NUM_CS GPIO_NUM_5
#endif