Allow other boards with other pin assignments#1193
注释
|
你的意思是能够改变引出线,就像许多 mach3 分线板一样?我认为您可以简单地使用文本文件中所做的更改重新编译 grbl,它会做同样的事情。
|
|
是的,这就是我所做的,但我认为对于像我这样遇到相同问题的人来说,为不同的板保留多个 cpumap 文件,然后在编译前在定义中选择所需的文件会更容易。..只是一个想法 |
|
您已经可以编辑/添加引脚映射到 cpu_map.h,然后更改 config.h 中的以下行以使用所需的引脚映射。: |
|
Cool, thats an even better way than what I did.. plus I just thought it would be good to implement some boards into the main grbl codebase to have a couple officially supported boards. Other thing, kinda related: Are the pin numbers somehow bit-shifted around? I don´t get the way how some of the pins are assigned.. for example the pwm’d spindle pin, which should be on arduino 11, right? from cpu_map.h: // Define spindle enable and spindle direction output pins.
#define SPINDLE_ENABLE_DDR DDRB
#define SPINDLE_ENABLE_PORT PORTB
// Z Limit pin and spindle PWM/enable pin swapped to access hardware PWM on Pin 11.
#ifdef VARIABLE_SPINDLE
#ifdef USE_SPINDLE_DIR_AS_ENABLE_PIN
// If enabled, spindle direction pin now used as spindle enable, while PWM remains on D11.
#define SPINDLE_ENABLE_BIT 5 // Uno Digital Pin 13 (NOTE: D13 can't be pulled-high input due to LED.)
#else
#define SPINDLE_ENABLE_BIT 3 // Uno Digital Pin 11
#endif
pins 3 and 5 have been assigned to Y_STEP_BIT and Z_STEP_BIT some lines above this code. I don´t get it.. sorry |
|
@yellobello same bit number different port |
|
I see a big problem if you want to use a shield with the step and dir pin located on different Ports (like ramps, for example). If I don’t go wrong Grbl wants all the pin of the same type on the same port. |
|
@yellobello the grbl pinout has been optimised to get the highest practical performance, and as @duronebis says changing that is not trivial. And for someone like @chamnit it is a support nightmare as there is no way he could test and retest all the user-submitted pin mappings. But being open source, you are completely free to make these changes yourself, and even publish them for others. Also note that there is no obvious mapping between Arduino pin numbering and port names/bits (or IC pins for that matter). Check out one of the great pin-out diagrams like http://www.pighixxx.com/test/portfolio-items/uno/ which shows all the gory detail. |
|
仅供参考,基于 Grbl 的项目包括具有硬件抽象的多个引脚分配。但这不包括 328p Uno。只有 Mega、ARM 或任何具有足够内存和闪存的微处理器。我不会支持端口,但有兴趣为社区维护特定端口的用户。 |


你好,
来自 marlin 的印刷世界,我对 grbl 很陌生。
我买了一块瓷板,我做的第一件事就是将它升级到最新的 grbl 版本,
结果发现这些人使用的引脚映射与 grbl 为官方盾牌所做的不同。
既然我现在已经让它与 grbl 一起工作,我想为什么不问问你们是否可以允许 grbl master 作为不同板的一个选项,就像 marlin 对许多板所做的那样。
但问题可能是我猜该板不是开源硬件。
顺便说一句,我说的是“Laseraxe”板。