- Posts: 804
- Thank you received: 502
Remora - Rpi Software Stepping Using External Microcontroller via SPI
3 years 5 months ago - 3 years 5 months ago #270774
by meister
Replied by meister on topic Remora - Rpi Software Stepping Using External Microcontroller via SPI
If someone want to play with
github.com/multigcs/Remora-FPGA
Working on Olimex ICE40HX8K-EVB and TinyFPGA-BX5Mhz Step-Clock is no problem for the hardware
Last edit: 3 years 5 months ago by meister.
The following user(s) said Thank You: cakeslob
Please Log in or Create an account to join the conversation.
3 years 5 months ago #270875
by meister
Replied by meister on topic Remora - Rpi Software Stepping Using External Microcontroller via SPI
Please Log in or Create an account to join the conversation.
3 years 5 months ago #270900
by scotta
Replied by scotta on topic Remora - Rpi Software Stepping Using External Microcontroller via SPI
That's so cool. Well done!
Is the FPGA code using the DDS step generation algorithm?
Is the FPGA code using the DDS step generation algorithm?
Please Log in or Create an account to join the conversation.
3 years 5 months ago #270907
by meister
Replied by meister on topic Remora - Rpi Software Stepping Using External Microcontroller via SPI
Thanks,
no i'm using clock generators and counters,
it's like one Hardware-Timer/Counter for each joint on normal Microcontroller's.
no i'm using clock generators and counters,
it's like one Hardware-Timer/Counter for each joint on normal Microcontroller's.
Code:
module stepgen
(
input clk,
input signed [31:0] jointFreqCmd,
output signed [31:0] jointFeedback,
output DIR,
output STP
);
assign DIR = (jointFreqCmd > 0);
reg [31:0] jointCounter = 32'd0;
reg [31:0] jointFreqCmdAbs = 32'd0;
reg signed [31:0] jointFeedbackMem = 32'd0;
reg step = 0;
assign STP = step;
assign jointFeedback = jointFeedbackMem;
always @ (posedge clk) begin
if (DIR) begin
jointFreqCmdAbs = jointFreqCmd / 2;
end else begin
jointFreqCmdAbs = -jointFreqCmd / 2;
end
jointCounter <= jointCounter + 1;
if (jointFreqCmd != 0) begin
if (jointCounter >= jointFreqCmdAbs) begin
step <= ~step;
jointCounter <= 32'b0;
if (step) begin
if (DIR) begin
jointFeedbackMem = jointFeedbackMem + 1;
end else begin
jointFeedbackMem = jointFeedbackMem - 1;
end
end
end
end
end
endmodule
Please Log in or Create an account to join the conversation.
3 years 5 months ago #271434
by cakeslob
Ok, I got it goin so far if you wanna test it out a bit. The serial output it good so at least. It uses the 26pin header for spi and serial, i only tested serial today.
Doesnt work with bootloader yet, so load it via DFU
I put a firmware.bin and basic config.txt
I was about to test it more, but it doesnt look like I can use my A4988/DRV8825 drivers. Keep in mind spi stepper driver things arent supported in remora, so you probably need to use 2209 or external drivers or something like fysetc fancy 5160 things. Unless those spi ones configure some other way, I dont know to much about them.
github.com/cakeslob/Remora/tree/mbedos6_spiderking
Replied by cakeslob on topic Remora - Rpi Software Stepping Using External Microcontroller via SPI
Just dropping in to say hi to Cakeslob and let him know I'm looking forward to seeing progress on the linuxCNC front with regular 3d printer control boards!
In particular I am hoping to use the Spider King board!
Ok, I got it goin so far if you wanna test it out a bit. The serial output it good so at least. It uses the 26pin header for spi and serial, i only tested serial today.
Doesnt work with bootloader yet, so load it via DFU
I put a firmware.bin and basic config.txt
I was about to test it more, but it doesnt look like I can use my A4988/DRV8825 drivers. Keep in mind spi stepper driver things arent supported in remora, so you probably need to use 2209 or external drivers or something like fysetc fancy 5160 things. Unless those spi ones configure some other way, I dont know to much about them.
github.com/cakeslob/Remora/tree/mbedos6_spiderking
Please Log in or Create an account to join the conversation.
3 years 5 months ago #272223
by meister
Replied by meister on topic Remora - Rpi Software Stepping Using External Microcontroller via SPI
Maybe something for you:
github.com/multigcs/LinuxCNC-RIO/tree/ma...Bridge/ESP32-PoE-ISO
So you can use SPI Boards via UDP
I use this to connect my FPGA to Ethernet at the moment,
should work directly with the Remora-nvem component.
github.com/multigcs/LinuxCNC-RIO/tree/ma...Bridge/ESP32-PoE-ISO
So you can use SPI Boards via UDP
I use this to connect my FPGA to Ethernet at the moment,
should work directly with the Remora-nvem component.
Please Log in or Create an account to join the conversation.
Time to create page: 0.101 seconds