Professional Documents
Culture Documents
Configure $I Hardware Values
Configure $I Hardware Values
---------------------------------------------------------
Note to tinkerers:
Grbl stores machine-specific hardware configuration information in non-volatile
EEPROM. This allows the firmware update tool to automatically determine which
firmware is compatible with a specific Ghost Gunner machine. This information is
never modified (e.g. by firmware update, $RST=_, etc). The only way to change
these values is by following the instructions below.
---------------------------------------------------------
Background:
DDcut's firmware update tool determines which firmware is compatible with a
specific GG unit by sending "$I" and then parsing Grbl's response. Example Grbl
response:
[grbl:1.1h GG:3A PCB:3B YMD:20200308]
---------------------------------------------------------
'VFD:' (No longer used). The original GG3 firmware included this field to
determine which VFD firmware was installed. However, knowing which 'VFD' firmware
version is installed isn't important, as DDcut's update tool always just loads the
latest firmware version.
HOW TO MODIFY: Send "$94=HW_VERSION" (see "Determining HW_VERSION" below).
Due to Grbl's underlying single-byte storage structure - and the 328p's extremely
limited memory space - the 'HW_VERSION' value stores both the major and minor
version characters in a single byte of memory. The memory format is:
Top three MSBs = major version. The 3-bit binary value is converted to a decimal
number.
Examples:
0b010xxxxx = '2' (e.g. major version 2)
0b011xxxxx = '3' (e.g. major version 3)
0b100xxxxx = '4' (e.g. major version 4)
...
0b110xxxxx = '6' (e.g. major version 6)
0b111xxxxx = Major version value not assigned.
To combine these two values, logically OR the major+minor versions, then convert to
decimal, and send that result.
Example: You want to set the mechanical hardware version to '3B' (i.e. you want $I
to return 'GG:3B').
Using the above description, the major revision '3' is 0b011xxxxx,
whereas the minor revision 'B' is 0bxxx00001.
ORing these numbers together yields 0b01100001,
which is equal to 97d.
Therefor, to set the mechanical hardware version to '3B', we send the command
'$90=97'
Yeah, it sucks that we can't just send "$GG=3B"; that would have required a ton of
additional work, and there almost certainly wasn't enough memory to do so anyway...
when I started this feature I had 2 bytes of flash storage free...
---------------------------------------------------------