I am an absolute NooB with respect to the Arduino IDE and C programming, but I have been building projects using the AVR family of uControllers since the 90's.....of course, everything I have done has been in Assembler.....What I actually "need" I could have done in an afternoon writing ASM, but what I really **want** is to try and use GRBL and the Arduino IDE...so I am a week into trying to load a completely un-modified "sketch" to a mega2560 board....
What I am working with:
Brand New SainSmart Mega2560 R3 with the ATMEGA16U USB chip (as opposed to the more readily available CH340G USB Chips...there were a few posts about compatibility issues of GRBL with the CH340G USB chips, so I ordered some of the SainSmart boards in an effort to minimize potential problems...)
Arduino IDE Version 1.6.9 (fresh install)
Latest "verified" Version of GRBL9f2560 from GitHub
I have the GRBL library installed in the folder with the rest of the Arduino libraries, and it shows up in the Arduino IDE "Library List" (I don't have any other GRBL libraries installed anywhere else).
I started a "New Sketch" in the Arduino IDE, Selected the Atmega2560 and included the GRBL library (as per the GRBL wiki instructions...) I then compiled the sketch (it compiles w/o warnings) , but I have not been able to upload it to the Mega2560 board via the Arduino IDE....either via the boot loader or with a programmer.....However, I have been able to use the "Export Compiled Binary" feature in the Arduino IDE to create a hex file that flashes without a problem using extreme burner and an AVRASP....so there is that....
In theory the GRBL firmware is flashed to the ATMEGA2560 soldered on the Arduino Mega2560 board sitting in front of me and I should be able to use a terminal interface to begin setting up my parameters....I can use extreme burner to verify the hex file flashed to the 2560 matches the hex file created by the Arduino IDE....but I am getting no response from the 2560.....On ReSet, It is suppose to send:
but I get nothing.....Likewise when I send "$$<cr>" it is suppose to respond with a list of the various commands....but it doesn't....I have verified this with several terminal interfaces and a DSO.....the cmd makes it all the way to Rx0.....but nothing comes out of Tx0....So I have obviously failed to do something....
As proof-of-concept I have used the same compiling/exporting/flashing with extreme burner process with the "Example Program" Blink.....it works as expected. The only thing I can think of is that there is no "actual code" in the "Sketch" ....aside from comments there is only the following:
In the "Blink" example there are a few actual instructions invoking the included library functions.....Am I missing something as simple as "calling" some function in the GRBL library?
Any thoughts or advice would be appreciated.
Fish
What I am working with:
Brand New SainSmart Mega2560 R3 with the ATMEGA16U USB chip (as opposed to the more readily available CH340G USB Chips...there were a few posts about compatibility issues of GRBL with the CH340G USB chips, so I ordered some of the SainSmart boards in an effort to minimize potential problems...)
Arduino IDE Version 1.6.9 (fresh install)
Latest "verified" Version of GRBL9f2560 from GitHub
I have the GRBL library installed in the folder with the rest of the Arduino libraries, and it shows up in the Arduino IDE "Library List" (I don't have any other GRBL libraries installed anywhere else).
I started a "New Sketch" in the Arduino IDE, Selected the Atmega2560 and included the GRBL library (as per the GRBL wiki instructions...) I then compiled the sketch (it compiles w/o warnings) , but I have not been able to upload it to the Mega2560 board via the Arduino IDE....either via the boot loader or with a programmer.....However, I have been able to use the "Export Compiled Binary" feature in the Arduino IDE to create a hex file that flashes without a problem using extreme burner and an AVRASP....so there is that....
In theory the GRBL firmware is flashed to the ATMEGA2560 soldered on the Arduino Mega2560 board sitting in front of me and I should be able to use a terminal interface to begin setting up my parameters....I can use extreme burner to verify the hex file flashed to the 2560 matches the hex file created by the Arduino IDE....but I am getting no response from the 2560.....On ReSet, It is suppose to send:
Code:
Grbl vX.Xx ['$' for help]
but I get nothing.....Likewise when I send "$$<cr>" it is suppose to respond with a list of the various commands....but it doesn't....I have verified this with several terminal interfaces and a DSO.....the cmd makes it all the way to Rx0.....but nothing comes out of Tx0....So I have obviously failed to do something....
As proof-of-concept I have used the same compiling/exporting/flashing with extreme burner process with the "Example Program" Blink.....it works as expected. The only thing I can think of is that there is no "actual code" in the "Sketch" ....aside from comments there is only the following:
Code:
#include <main.h>
void setup(){
main();
}
void loop(){}
In the "Blink" example there are a few actual instructions invoking the included library functions.....Am I missing something as simple as "calling" some function in the GRBL library?
Any thoughts or advice would be appreciated.
Fish