Hi everyone,
A little while back I retrofitted my Boxford 125 TCL lathe to convert it from requiring a BBC Micro to using a PC with Mach 3. I used a parallel breakout board from CNC4PC and a processor board of my own design that uses a PIC to interface to the front-panel of the lathe as well as the spindle control with the PC using Modbus over USB.
I wrote up some of the details on my website at http://www.fieldofcows.com/blog. Since then I've had a number of enquiries about the Modbus part of the project and people requesting the firmware source code.
I've finally got around to tidying up the source code to the point where I'm happy for people to download and use it. I've also started a project to build a standalone USB Modbus I/O board. Although I haven't yet built it (I hope to in the next couple of weeks) I believe it should work correctly. The circuit and firmware both work under simulation in Proteus.
The interface uses a PIC 18F4550 which has on-chip support for USB. I've used the Microchip USB stack to create a USB CDC serial port device for the Modbus comms. The firmware supports both RTU and ASCII protocols (selectable at compile time). The source code is written in C and is compiled using the Microchip C for PIC18 compiler.
If anyone is interested in taking a look or building one then have a look at my webpage at http://www.fieldofcows.com/index.php...dbus_Interface. I'd be very interested in your comments, fixes and suggestions for improvements.
Please be aware that I'm not an electronics engineer so the circuit may be flawed in ways I don't understand. I am a software engineer though so the firmware should be perfect .