Make baud rate user-configurable.

This commit is contained in:
Markus Hitter 2011-03-20 02:07:51 +01:00
parent 1214646ca8
commit 8b78c2a498
5 changed files with 35 additions and 13 deletions

View File

@ -108,7 +108,6 @@ undefine if you don't want to use them
* * * *
\***************************************************************************/ \***************************************************************************/
/* /*
acceleration, reprap style. acceleration, reprap style.
Each movement starts at the speed of the previous command and accelerates or decelerates linearly to reach target speed at the end of the movement. Each movement starts at the speed of the previous command and accelerates or decelerates linearly to reach target speed at the end of the movement.
@ -127,7 +126,6 @@ undefine if you don't want to use them
// valid range = 1 to 8,000,000; 500,000 is a good starting point // valid range = 1 to 8,000,000; 500,000 is a good starting point
#define ACCELERATION_STEEPNESS 500000 #define ACCELERATION_STEEPNESS 500000
/* /*
temporal step algorithm temporal step algorithm
This algorithm causes the timer to fire when any axis needs to step, instead of synchronising to the axis with the most steps ala bresenham. This algorithm causes the timer to fire when any axis needs to step, instead of synchronising to the axis with the most steps ala bresenham.
@ -254,6 +252,7 @@ DEFINE_TEMP_SENSOR(noheater, TT_INTERCOM, 0)
// DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, 1) // DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, 1)
/***************************************************************************\ /***************************************************************************\
* * * *
* 5. HEATERS * * 5. HEATERS *
@ -307,6 +306,8 @@ DEFINE_TEMP_SENSOR(noheater, TT_INTERCOM, 0)
// #define HEATER_BED HEATER_bed // #define HEATER_BED HEATER_bed
// #define HEATER_FAN HEATER_fan // #define HEATER_FAN HEATER_fan
/***************************************************************************\ /***************************************************************************\
* * * *
* 6. COMMUNICATION OPTIONS * * 6. COMMUNICATION OPTIONS *
@ -323,6 +324,11 @@ DEFINE_TEMP_SENSOR(noheater, TT_INTERCOM, 0)
#define REPRAP_HOST_COMPATIBILITY 20100806 #define REPRAP_HOST_COMPATIBILITY 20100806
// #define REPRAP_HOST_COMPATIBILITY <date of next RepRap Host compatibility break> // #define REPRAP_HOST_COMPATIBILITY <date of next RepRap Host compatibility break>
/*
Baud rate for the connection to the host. Usually 115200, other common values are 19200, 38400 or 57600.
*/
#define BAUD 115200
/* /*
Xon/Xoff flow control. Xon/Xoff flow control.
Redundant when using RepRap Host for sending GCode, but mandatory when sending GCode files with a plain terminal emulator, like GtkTerm (Linux), CoolTerm (Mac) or HyperTerminal (Windows). Redundant when using RepRap Host for sending GCode, but mandatory when sending GCode files with a plain terminal emulator, like GtkTerm (Linux), CoolTerm (Mac) or HyperTerminal (Windows).

View File

@ -111,14 +111,12 @@ undefine if you don't want to use them
* * * *
\***************************************************************************/ \***************************************************************************/
/* /*
acceleration, reprap style. acceleration, reprap style.
Each movement starts at the speed of the previous command and accelerates or decelerates linearly to reach target speed at the end of the movement. Each movement starts at the speed of the previous command and accelerates or decelerates linearly to reach target speed at the end of the movement.
*/ */
// #define ACCELERATION_REPRAP // #define ACCELERATION_REPRAP
/* /*
acceleration and deceleration ramping. acceleration and deceleration ramping.
Each movement starts at (almost) no speed, linearly accelerates to target speed and decelerates just in time to smoothly stop at the target. alternative to ACCELERATION_REPRAP Each movement starts at (almost) no speed, linearly accelerates to target speed and decelerates just in time to smoothly stop at the target. alternative to ACCELERATION_REPRAP
@ -130,7 +128,6 @@ undefine if you don't want to use them
// valid range = 1 to 8,000,000; 500,000 is a good starting point // valid range = 1 to 8,000,000; 500,000 is a good starting point
#define ACCELERATION_STEEPNESS 500000 #define ACCELERATION_STEEPNESS 500000
/* /*
temporal step algorithm temporal step algorithm
This algorithm causes the timer to fire when any axis needs to step, instead of synchronising to the axis with the most steps ala bresenham. This algorithm causes the timer to fire when any axis needs to step, instead of synchronising to the axis with the most steps ala bresenham.
@ -207,6 +204,7 @@ undefine if you don't want to use them
//#define E_INVERT_DIR //#define E_INVERT_DIR
/***************************************************************************\ /***************************************************************************\
* * * *
* 4. TEMPERATURE SENSORS * * 4. TEMPERATURE SENSORS *
@ -252,6 +250,7 @@ undefine if you don't want to use them
DEFINE_TEMP_SENSOR(extruder, TT_THERMISTOR, PINA5) DEFINE_TEMP_SENSOR(extruder, TT_THERMISTOR, PINA5)
/***************************************************************************\ /***************************************************************************\
* * * *
* 5. HEATERS * * 5. HEATERS *
@ -298,6 +297,8 @@ DEFINE_HEATER(extruder, PORTD, PIND6, OCR2B)
// #define HEATER_BED HEATER_bed // #define HEATER_BED HEATER_bed
// #define HEATER_FAN HEATER_fan // #define HEATER_FAN HEATER_fan
/***************************************************************************\ /***************************************************************************\
* * * *
* 6. COMMUNICATION OPTIONS * * 6. COMMUNICATION OPTIONS *
@ -314,6 +315,11 @@ DEFINE_HEATER(extruder, PORTD, PIND6, OCR2B)
#define REPRAP_HOST_COMPATIBILITY 20100806 #define REPRAP_HOST_COMPATIBILITY 20100806
// #define REPRAP_HOST_COMPATIBILITY <date of next RepRap Host compatibility break> // #define REPRAP_HOST_COMPATIBILITY <date of next RepRap Host compatibility break>
/*
Baud rate for the connection to the host. Usually 115200, other common values are 19200, 38400 or 57600.
*/
#define BAUD 115200
/* /*
Xon/Xoff flow control. Xon/Xoff flow control.
Redundant when using RepRap Host for sending GCode, but mandatory when sending GCode files with a plain terminal emulator, like GtkTerm (Linux), CoolTerm (Mac) or HyperTerminal (Windows). Redundant when using RepRap Host for sending GCode, but mandatory when sending GCode files with a plain terminal emulator, like GtkTerm (Linux), CoolTerm (Mac) or HyperTerminal (Windows).

View File

@ -92,6 +92,7 @@ undefine if you don't want to use them
#define Z_MAX 140.0 #define Z_MAX 140.0
/***************************************************************************\ /***************************************************************************\
* * * *
* 2. ACCELERATION * * 2. ACCELERATION *
@ -102,14 +103,12 @@ undefine if you don't want to use them
* * * *
\***************************************************************************/ \***************************************************************************/
/* /*
acceleration, reprap style. acceleration, reprap style.
Each movement starts at the speed of the previous command and accelerates or decelerates linearly to reach target speed at the end of the movement. Each movement starts at the speed of the previous command and accelerates or decelerates linearly to reach target speed at the end of the movement.
*/ */
// #define ACCELERATION_REPRAP // #define ACCELERATION_REPRAP
/* /*
acceleration and deceleration ramping. acceleration and deceleration ramping.
Each movement starts at (almost) no speed, linearly accelerates to target speed and decelerates just in time to smoothly stop at the target. alternative to ACCELERATION_REPRAP Each movement starts at (almost) no speed, linearly accelerates to target speed and decelerates just in time to smoothly stop at the target. alternative to ACCELERATION_REPRAP
@ -121,7 +120,6 @@ undefine if you don't want to use them
// valid range = 1 to 8,000,000; 500,000 is a good starting point // valid range = 1 to 8,000,000; 500,000 is a good starting point
#define ACCELERATION_STEEPNESS 500000 #define ACCELERATION_STEEPNESS 500000
/* /*
temporal step algorithm temporal step algorithm
This algorithm causes the timer to fire when any axis needs to step, instead of synchronising to the axis with the most steps ala bresenham. This algorithm causes the timer to fire when any axis needs to step, instead of synchronising to the axis with the most steps ala bresenham.
@ -280,6 +278,7 @@ DEFINE_TEMP_SENSOR(extruder, TT_THERMISTOR, 0)
// DEFINE_TEMP_SENSOR(noheater, TT_THERMISTOR, 1) // DEFINE_TEMP_SENSOR(noheater, TT_THERMISTOR, 1)
/***************************************************************************\ /***************************************************************************\
* * * *
* 5. HEATERS * * 5. HEATERS *
@ -330,6 +329,8 @@ DEFINE_HEATER(bed, PORTB, PINB4, OCR0B)
#define HEATER_BED HEATER_bed #define HEATER_BED HEATER_bed
// #define HEATER_FAN HEATER_fan // #define HEATER_FAN HEATER_fan
/***************************************************************************\ /***************************************************************************\
* * * *
* 6. COMMUNICATION OPTIONS * * 6. COMMUNICATION OPTIONS *
@ -346,6 +347,11 @@ DEFINE_HEATER(bed, PORTB, PINB4, OCR0B)
#define REPRAP_HOST_COMPATIBILITY 20100806 #define REPRAP_HOST_COMPATIBILITY 20100806
// #define REPRAP_HOST_COMPATIBILITY <date of next RepRap Host compatibility break> // #define REPRAP_HOST_COMPATIBILITY <date of next RepRap Host compatibility break>
/*
Baud rate for the connection to the host. Usually 115200, other common values are 19200, 38400 or 57600.
*/
#define BAUD 115200
/* /*
Xon/Xoff flow control. Xon/Xoff flow control.
Redundant when using RepRap Host for sending GCode, but mandatory when sending GCode files with a plain terminal emulator, like GtkTerm (Linux), CoolTerm (Mac) or HyperTerminal (Windows). Redundant when using RepRap Host for sending GCode, but mandatory when sending GCode files with a plain terminal emulator, like GtkTerm (Linux), CoolTerm (Mac) or HyperTerminal (Windows).

View File

@ -111,14 +111,12 @@ undefine if you don't want to use them
* * * *
\***************************************************************************/ \***************************************************************************/
/* /*
acceleration, reprap style. acceleration, reprap style.
Each movement starts at the speed of the previous command and accelerates or decelerates linearly to reach target speed at the end of the movement. Each movement starts at the speed of the previous command and accelerates or decelerates linearly to reach target speed at the end of the movement.
*/ */
#define ACCELERATION_REPRAP #define ACCELERATION_REPRAP
/* /*
acceleration and deceleration ramping. acceleration and deceleration ramping.
Each movement starts at (almost) no speed, linearly accelerates to target speed and decelerates just in time to smoothly stop at the target. alternative to ACCELERATION_REPRAP Each movement starts at (almost) no speed, linearly accelerates to target speed and decelerates just in time to smoothly stop at the target. alternative to ACCELERATION_REPRAP
@ -130,7 +128,6 @@ undefine if you don't want to use them
// valid range = 1 to 8,000,000; 500,000 is a good starting point // valid range = 1 to 8,000,000; 500,000 is a good starting point
#define ACCELERATION_STEEPNESS 500000 #define ACCELERATION_STEEPNESS 500000
/* /*
temporal step algorithm temporal step algorithm
This algorithm causes the timer to fire when any axis needs to step, instead of synchronising to the axis with the most steps ala bresenham. This algorithm causes the timer to fire when any axis needs to step, instead of synchronising to the axis with the most steps ala bresenham.
@ -258,6 +255,7 @@ DEFINE_TEMP_SENSOR(extruder, TT_THERMISTOR, AIO2_PIN)
DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO1_PIN) DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO1_PIN)
/***************************************************************************\ /***************************************************************************\
* * * *
* 5. HEATERS * * 5. HEATERS *
@ -309,6 +307,8 @@ DEFINE_HEATER(fan, PORTH, PINH6, OCR2B)
#define HEATER_BED HEATER_bed #define HEATER_BED HEATER_bed
// #define HEATER_FAN HEATER_fan // #define HEATER_FAN HEATER_fan
/***************************************************************************\ /***************************************************************************\
* * * *
* 6. COMMUNICATION OPTIONS * * 6. COMMUNICATION OPTIONS *
@ -325,6 +325,11 @@ DEFINE_HEATER(fan, PORTH, PINH6, OCR2B)
#define REPRAP_HOST_COMPATIBILITY 20100806 #define REPRAP_HOST_COMPATIBILITY 20100806
// #define REPRAP_HOST_COMPATIBILITY <date of next RepRap Host compatibility break> // #define REPRAP_HOST_COMPATIBILITY <date of next RepRap Host compatibility break>
/*
Baud rate for the connection to the host. Usually 115200, other common values are 19200, 38400 or 57600.
*/
#define BAUD 115200
/* /*
Xon/Xoff flow control. Xon/Xoff flow control.
Redundant when using RepRap Host for sending GCode, but mandatory when sending GCode files with a plain terminal emulator, like GtkTerm (Linux), CoolTerm (Mac) or HyperTerminal (Windows). Redundant when using RepRap Host for sending GCode, but mandatory when sending GCode files with a plain terminal emulator, like GtkTerm (Linux), CoolTerm (Mac) or HyperTerminal (Windows).

View File

@ -2,11 +2,10 @@
#include <avr/interrupt.h> #include <avr/interrupt.h>
#include "config.h" // for XONXOFF #include "config.h"
#include "arduino.h" #include "arduino.h"
#define BUFSIZE 64 #define BUFSIZE 64
#define BAUD 115200
#define ASCII_XOFF 19 #define ASCII_XOFF 19
#define ASCII_XON 17 #define ASCII_XON 17