grblHAL / RP2040

grblHAL driver for RP2040 (Pi Pico)
Other
103 stars 44 forks source link

PIO step/dir shift register improvement + support of 8 motors #24

Open Volksolive opened 2 years ago

Volksolive commented 2 years ago

@terjeio, as discussed in the other discussion, here is the .zip with 6 modified files:

I have created a test mapping (test_8axis_map.h) The grbl->config.h needs to be changed to N_AXIS 8 (or needs to be redefined in the mapping ?) The pin mapping follows the pico_cnc board which I have updated 'map.h' to work with the new PIO code.

PIO 8 Axis.zip

I have tested with my DSO the signals for 4 motors config and 8 motors config, the signals looks good. If you are willing to test on your shift register test rig that would be nice otherwise is there anybody with a Pico_CNC willing to test?

andrewmarles commented 2 years ago

I have a pico board that can optionally take a 2nd shift register, I will see if I can find some time to test this.

Volksolive commented 2 years ago

@terjeio I have finally received my Pico CNC board and will start testing my code on it. I have one question though, where should I declare that the board has 4 axis? Should that be in grbl/config.h? If that's the case, wouldn't it be better to declare it in my_machine.h instead? or in the board mapping?

terjeio commented 2 years ago

Should that be in grbl/config.h?

Yes. Or in CMakeLists.txt - many symbols in the core are guarded by #ifndef ... #endif to allow them beeing set from the compiler command line.

If that's the case, wouldn't it be better to declare it in my_machine.h instead? or in the board mapping?

IMO no and no. I do not want the core to reference symbols defined in the driver code.