Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge lcd #62

Open
wants to merge 13 commits into
base: edge
Choose a base branch
from
2 changes: 1 addition & 1 deletion grbl/config.h → grbl_lcd/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@

// Inverts the spindle enable pin from low-disabled/high-enabled to low-enabled/high-disabled. Useful
// for some pre-built electronic boards.
// #define INVERT_SPINDLE_ENABLE_PIN // Default disabled. Uncomment to enable.
#define INVERT_SPINDLE_ENABLE_PIN // Default disabled. Uncomment to enable.

// Inverts the selected coolant pin from low-disabled/high-enabled to low-enabled/high-disabled. Useful
// for some pre-built electronic boards.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions grbl/print.h → grbl_lcd/cprint.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef print_h
#define print_h
#ifndef cprint_h
#define cprint_h


void printString(const char *s);
Expand Down
82 changes: 77 additions & 5 deletions grbl/cpu_map.h → grbl_lcd/cpu_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,18 @@
#define CONTROL_DDR DDRK
#define CONTROL_PIN PINK
#define CONTROL_PORT PORTK
#define CONTROL_RESET_BIT 0 // MEGA2560 Analog Pin 8
#define CONTROL_FEED_HOLD_BIT 1 // MEGA2560 Analog Pin 9
#define CONTROL_CYCLE_START_BIT 2 // MEGA2560 Analog Pin 10
#define CONTROL_SAFETY_DOOR_BIT 3 // MEGA2560 Analog Pin 11
#define CONTROL_RESET_BIT 0 // MEGA2560 Analog Pin 8
#define CONTROL_FEED_HOLD_BIT 1 // MEGA2560 Analog Pin 9
#define CONTROL_CYCLE_START_BIT 2 // MEGA2560 Analog Pin 10
#define CONTROL_SAFETY_DOOR_BIT 3 // MEGA2560 Analog Pin 11
#define CONTROL_HOME_BIT 4 // MEGA2560 Analog Pin 12
#define CONTROL_FEED_BIT 5 // MEGA2560 Analog Pin 13
#define CONTROL_SET_SPINDLE_BIT 6 // MEGA2560 Analog Pin 14
#define CONTROL_INT PCIE2 // Pin change interrupt enable pin
#define CONTROL_INT_vect PCINT2_vect
#define CONTROL_PCMSK PCMSK2 // Pin change interrupt register
#define CONTROL_MASK ((1<<CONTROL_RESET_BIT)|(1<<CONTROL_FEED_HOLD_BIT)|(1<<CONTROL_CYCLE_START_BIT)|(1<<CONTROL_SAFETY_DOOR_BIT))
// #define CONTROL_MASK ((1<<CONTROL_RESET_BIT)|(1<<CONTROL_FEED_HOLD_BIT)|(1<<CONTROL_CYCLE_START_BIT)|(1<<CONTROL_SAFETY_DOOR_BIT))
#define CONTROL_MASK ((1<<CONTROL_RESET_BIT)|(1<<CONTROL_FEED_HOLD_BIT)|(1<<CONTROL_CYCLE_START_BIT)|(1<<CONTROL_SAFETY_DOOR_BIT)|(1<<CONTROL_HOME_BIT)|(1<<CONTROL_FEED_BIT)|(1<<CONTROL_SET_SPINDLE_BIT)) //added

// Define probe switch input pin.
#define PROBE_DDR DDRK
Expand Down Expand Up @@ -129,6 +133,74 @@
#define SPINDLE_PWM_DDR DDRH
#define SPINDLE_PWM_PORT PORTH
#define SPINDLE_PWM_BIT 4 // MEGA2560 Digital Pin 7


#define xUpPin 47 //45 //
#define xDownPin 46 //44 //
#define yUpPin 45 //43 //
#define yDownPin 44 //42 //
#define zUpPin 43 //41 //
#define zDownPin 42 //40 //
#define xySetPin 41 //39 //
#define zSetPin 40 //38 //
#define zHometPin 38 //36 //
#define xyHomePin 39 //36 //

#define StepSetPin 37 //37 //
#define goXyPin 36 //36 // home

/*
#define encoderX_Pin A12
#define encoderY_Pin A13
#define encoderXaPin A0
#define encoderXbPin A1
#define encoderYaPin A2
#define encoderYbPin A3
*/

#define encoderXaPin 53
#define encoderXbPin 52
#define encoderYaPin 51
#define encoderYbPin 50
#define encoderSetX0 49
#define encoderSetY0 48

#define lcd_rs A0
#define lcd_en A1
#define lcd_d4 A2
#define lcd_d5 A3
#define lcd_d6 A4
#define lcd_d7 A5


/*
* pins used for LCD
* rs = 53, 52
* rw = 52, 50
* en = 51, 48
* d4 = 50, 46
* d5 = 49, 44
* d6 = 48, 42
* d7 = 47; 40
*
* pins used by grbl
* step pulse X = 24
* step pulse Y = 25
* step pilse Z = 26
* direction X = 30
* direction Y = 31
* direction Z = 32
* reset = A8
* hold = A9
* start = A10
* door = A11
* probe = A15
*
* added
* home = A12
* feed = A13
* spindle on/off = A14
*/

#endif

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ For advanced users:
Copyright (c) 2015 Sungeun K. Jeon
Released under the MIT-license. See license.txt for details.
***********************************************************************/

#include <LiquidCrystal.h>
#include <grbl.h>

// Do not alter this file!
File renamed without changes.
File renamed without changes.
5 changes: 4 additions & 1 deletion grbl/grbl.h → grbl_lcd/grbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#ifndef grbl_h
#define grbl_h


// Grbl versioning system
#define GRBL_VERSION "1.1f"
#define GRBL_VERSION_BUILD "20170802"
Expand All @@ -37,6 +38,7 @@
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <Arduino.h>

// Define the Grbl system include files. NOTE: Do not alter organization.
#include "config.h"
Expand All @@ -52,7 +54,7 @@
#include "limits.h"
#include "motion_control.h"
#include "planner.h"
#include "print.h"
#include "cprint.h"
#include "probe.h"
#include "protocol.h"
#include "report.h"
Expand All @@ -61,6 +63,7 @@
#include "stepper.h"
#include "jog.h"
#include "sleep.h"
#include "lcd.h"

// ---------------------------------------------------------------------------------------
// COMPILE-TIME ERROR CHECKING OF DEFINE VALUES:
Expand Down
File renamed without changes.
File renamed without changes.
Loading