Note; for proper speed enhancement, see serial-dma branch instead, which is where the fun stuff happens! This branch contains a major bugfix for the original serial communication on the smoothie chm-t code, that corrupts data if tx and rx are going on at the same time. This bug can be seen in all serial speeds, but I suspect it is (mostly?) hidden when enabling the serial confirmation fix in openPnP. Because of this, for now I'll leave this branch alone.
In order to benefit from higher thoughput and hardware flow control, you will need to modify your control board. The changes needed can be defined in two; one for the actual hardware flow control, and one for increased bitrate. The latter needs the former to be useful.
This fork is meant to also work without the hardware board changes, but it has not been tested much by me.
Both 36 and 48 models share the same control board, with a little difference; the 48 has a native rs422 interface populated, whereas the 36 has rs232.
Since we are going to change the 48 into rs232, we need to add the missing components to do so;
With this change, you will no longer have the extra rs232 for debug available, if this is important for you. If if is, the debug could instead be moved to the rs422 interface.
Note that the only thing you need to do, if you want to revert back to rs422, is to move the resistor back to position R132.
In config.default there are two relevant lines; one for specifying the baudrate you wish to run, and one setting for enabling RTS/CTS hardware flow control.
In OpenPnP you will need to select RTS/CTS flow control, and uncheck the "Confirmation Flow Control" since we will not need it any more.
Not all USB-RS232 adapters are good (and even the good ones can be configured differenctly) so it is strongly suggested to test everything once you are done, by connecting a serial comm's program and issue some tests. The author of this fork are using gtkcomm under linux, adding a 'macro' sending out a string "M115\nM114\nM115\nM114\nM115\nM114\n" (which will work on the orignial fw as well), or "M444\nM444\nM444\nM444\nM444\nM444\nM444\nM444\n" (not in other firmwares), which will result in a respons of 'U' and 'z' which are binary 0x55 and 0x5a. By putting the M-commands in a macro a good comms's program will send them rather rapidly, during also receiving the first results. Check the result carefully for missed out response, or wrong respons characters. Repeat a few times.
A picture of the patch
Currently the serial is interrupt driven, so the actual throughput will be less than the selected baud rate. e.d. for 576000 baud the actual throughput is around 500 kbps. The idea is to enable DMA on the rx, but probably not on tx, since the tx is pacing the main loop, which we need to keep in sync with anyways.
To build, follow normal smoothie build process to get setup. Then checkout chmt branch and rebuild.
Smoothie is a free, opensource, high performance G-code interpreter and CNC controller written in Object-Oriented C++ for the LPC17xx micro-controller ( ARM Cortex M3 architecture ). It will run on a mBed, a LPCXpresso, a SmoothieBoard, R2C2 or any other LPC17xx-based board. The motion control part is a port of the awesome grbl.
Documentation can be found here : [[http://smoothieware.org/]]
NOTE it is not necessary to build Smoothie yourself unless you want to. prebuilt binaries are available here: [[http://triffid-hunter.no-ip.info/Smoothie.html|Nightly builds]] and here: [[https://github.com/Smoothieware/Smoothieware/blob/edge/FirmwareBin/firmware.bin?raw=true|recent stable build]]
These are the quick steps to get Smoothie dependencies installed on your computer:
Follow this guide... [[http://smoothieware.org/compiling-smoothie]]
In short... From a shell, switch into the root Smoothie project directory and run: {{{ make clean make all }}}
To upload you can do
{{{ make upload }}}
if you have dfu-util installed.
Alternatively copy the file LPC1768/main.bin to the sdcard calling it firmware.bin and reset.
Please follow this guide [[https://github.com/Smoothieware/Smoothieware/blob/edge/ISSUE_TEMPLATE.md]]
Please take a look at :
Contributions very welcome !
The Smoothie firmware is free software developed by volunteers. If you find this software useful, want to say thanks and encourage development, please consider a [[https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=9QDYFXXBPM6Y6&lc=US&item_name=Smoothieware%20development¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted|Donation]]
Smoothieware is released under the GNU GPL v3, which you can find at http://www.gnu.org/licenses/gpl-3.0.en.html