blob: 0e31f04b51354158a30514adb9cc9b4eea444b47 (
plain)
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
/****************************************************************************************
* Here's where you define the overall electronics setup for your machine.
****************************************************************************************/
//
// CHOOSE WHICH MOTHERBOARD YOU'RE USING:
//
//#define REPRAP_MOTHERBOARD_VERSION_1_0
//#define REPRAP_MOTHERBOARD_VERSION_1_1
#define REPRAP_MOTHERBOARD_VERSION_1_2
//
// CHOOSE WHICH FAMILY OF STEPPER DRIVER YOU'RE USING:
//
//#define STEPPER_DRIVER_VERSION_1_X
#define STEPPER_DRIVER_VERSION_2_X
//
// CHOOSE WHICH FAMILY OF OPTO ENDSTOP YOU'RE USING:
//
//#define OPTO_ENDSTOP_1_X
#define OPTO_ENDSTOP_2_X
#define PACKET_TIMEOUT 1000
#define HOST_SERIAL_SPEED 38400
#define SLAVE_SERIAL_SPEED 38400
//uncomment to enable debugging functions
#define ENABLE_DEBUG 1
#define ENABLE_COMMS_DEBUG 1
//#define SCAN_TOOLS_ON_STARTUP
/****************************************************************************************
* Sanguino Pin Assignment
****************************************************************************************/
//these are the pins for the v1.0 Motherboard.
#ifdef REPRAP_MOTHERBOARD_VERSION_1_0
//x axis pins
#define X_STEP_PIN 15
#define X_DIR_PIN 18
#define X_ENABLE_PIN 19
#define X_MIN_PIN 20
#define X_MAX_PIN 21
//y axis pins
#define Y_STEP_PIN 23
#define Y_DIR_PIN 22
#define Y_ENABLE_PIN 19
#define Y_MIN_PIN 25
#define Y_MAX_PIN 26
//z axis pins
#define Z_STEP_PIN 29
#define Z_DIR_PIN 30
#define Z_ENABLE_PIN 31
#define Z_MIN_PIN 1
#define Z_MAX_PIN 2
//our pin for debugging.
#define DEBUG_PIN 0
//our SD card pins
#define SD_CARD_SELECT 4
#define SD_CARD_WRITE 28
#define SD_CARD_DETECT 24
//our RS485 pins
#define RX_ENABLE_PIN 13
#define TX_ENABLE_PIN 12
#endif
//these are the pins for the v1.1 Motherboard.
#if defined(REPRAP_MOTHERBOARD_VERSION_1_1) || defined(REPRAP_MOTHERBOARD_VERSION_1_2)
//x axis pins
#define X_STEP_PIN 15
#define X_DIR_PIN 18
#define X_ENABLE_PIN 19
#define X_MIN_PIN 20
#define X_MAX_PIN 21
//y axis pins
#define Y_STEP_PIN 23
#define Y_DIR_PIN 22
#define Y_ENABLE_PIN 24
#define Y_MIN_PIN 25
#define Y_MAX_PIN 26
//z axis pins
#define Z_STEP_PIN 27
#define Z_DIR_PIN 28
#define Z_ENABLE_PIN 29
#define Z_MIN_PIN 30
#define Z_MAX_PIN 31
//our pin for debugging.
#define DEBUG_PIN 0
//our SD card pins
#define SD_CARD_WRITE 2
#define SD_CARD_DETECT 3
#define SD_CARD_SELECT 4
//our RS485 pins
#define TX_ENABLE_PIN 12
#define RX_ENABLE_PIN 13
//pin for controlling the PSU.
#define PS_ON_PIN 14
#endif
/****************************************************************************************
* Stepper Driver Behaviour Definition
****************************************************************************************/
//do we want a step delay (ie: length of pulse in microseconds) comment out to disable.
#define STEP_DELAY 1
#ifdef STEPPER_DRIVER_VERSION_1_X
#define STEPPER_ENABLE 1
#define STEPPER_DISABLE 0
#endif
#ifdef STEPPER_DRIVER_VERSION_2_X
#define STEPPER_ENABLE 0
#define STEPPER_DISABLE 1
#endif
/****************************************************************************************
* Opto Endstop Behaviour Definition
****************************************************************************************/
#ifdef OPTO_ENDSTOP_1_X
#define SENSORS_INVERTING 0
#endif
#ifdef OPTO_ENDSTOP_2_X
#define SENSORS_INVERTING 1
#endif
/****************************************************************************************
* Various Buffer Size Declarations
****************************************************************************************/
//we store all queueable commands in one big giant buffer.
// Explicitly allocate memory at compile time for buffer.
#define COMMAND_BUFFER_SIZE 256
#define POINT_QUEUE_SIZE 32
#define POINT_SIZE 16 // 4 + 4 + 4 + 4 = 16
#define MAX_PACKET_LENGTH 32
|