Hi,
I am a total newbie on FPGA, I have purchased a Logi-PI and an Arduino CNC board and want to initially implement 4 x NCOs to control the stepper motors, with the Raspberry Pi handling all the high level stuff and the FPGA doing all the time critical control.
Initially I will use DRV8825 StepSticks with the CNC board to learn more about FPGA and once that is working I need to migrate to TMC2130 SilentStepSticks which require SPI to set up each of these individually.
So far I have tried a number of the Apps from the repo and they all work, I have also watched quite a number of youtube videos and am very slowly learning how VHDL / Verilog work, it has been a long time since I played around at the gate level!
Ideally the NCO can generate a pulse duration that can be set, rather than a duty cycle.
I will also need to consider how an end-stop for a stepper motor would interact with the NCO to freeze the STEP pulse generation (could be a simple AND gate on the output of the NCO).
Has anyone done this before (don't want to reinvent the wheel) and/or does anyone have any pointers / advice / code that I can try to increase my understanding of how to achieve this.
Note: I am a contributor to the
http://www.smoothieware.org project and in the long term want to port Smoothie to Raspberry Pi + Logo-Pi + customer driver board.
Cheers
Douglas
Comments
Sounds like a nice project. In terms of interacting between the FPGA and Rpi I would recommend getting familiar with the logi-wishbone project. It is the simplest way to communicate expand the use of many number of peripherals such as your stepper drivers. You can examine the code to see how you "wrap" and address your peripherals to send and receive commands.
It sounds like you will be using external discrete drivers, but in case you are interested hamster has some code and is a great resource if you have specific questions to the implementation.
http://hamsterworks.co.nz/mediawiki/index.php/Stepper
Hope this helps.