LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

More
2 years 2 months ago #307325 by meister
i had done a major update, but i just compared one with an old version and everything looks good.
Unfortunately I can't tell you what the problem might be at the moment :(
The following user(s) said Thank You: Mecanix

Please Log in or Create an account to join the conversation.

More
2 years 2 months ago #307327 by Mecanix
PIN 13 (x_pulse) is NOT working on my FPGA. w t f

If I swap pins and place the step on PIN 14, I'm getting steps (!!). Told you the problem was at my end, but I'll have to keep you responsible for this one - guilty!! You picked those random pins ;)

In all seriousness, something's not right with PIN13. Let's hope it's just hardware (bad soldering) and not gowin's internals or their place/routing compiler. Yikes. See? That's why I wanted to test ALL PINS on that thing before sending out some PCB work... don't trust - verify!
The following user(s) said Thank You: meister

Please Log in or Create an account to join the conversation.

More
2 years 2 months ago #307328 by meister
if you are playing around anyway, you can also set the enable bits of the stepdir instances to 1 in rio.v
Code:
assign PINOUT_STEPDIR11_STEP = PINOUT_STEPDIR11_STEP_RAW; assign PINOUT_STEPDIR11_DIR = PINOUT_STEPDIR11_DIR_RAW; wire PINOUT_STEPDIR11_STEP_RAW; wire PINOUT_STEPDIR11_DIR_RAW; wire UNUSED_PIN_STEPDIR11_EN; stepdir stepdir11 ( .clk(sysclk), .step(PINOUT_STEPDIR11_STEP_RAW), .dir(PINOUT_STEPDIR11_DIR_RAW), .en(UNUSED_PIN_STEPDIR11_EN), .velocity(VAROUT32_STEPDIR11_VELOCITY), .enable(1), .position(VARIN32_STEPDIR11_POSITION) );

but if that works, something is wrong with the connection and the board is in ERROR state
The following user(s) said Thank You: Mecanix

Please Log in or Create an account to join the conversation.

More
2 years 2 months ago - 2 years 2 months ago #307340 by Mecanix
Quick update:

Changed all the pinouts to the ones that works. So far PIN13 and PIN15 are persistently HIGH. As if they were physically shorted but they aren't (good soldering). Just putting this out there, to be aware.

So far got stepgen, spindle pwm, spindle encoder & index, and home switches. [TESTED]. Everything that makes up for the essentials!! Super happy about that.

Those screwed-up pins are discouraging me though. But I'm not coming down to any cynical conclusion yet. I'll have a look in their datasheet again and see if I can find any reason for those being HIGH on crack...
Last edit: 2 years 2 months ago by Mecanix.
The following user(s) said Thank You: meister

Please Log in or Create an account to join the conversation.

More
2 years 2 months ago #307345 by meister
On the TangNano9k, 13&15 are LED's and they work fine

Please Log in or Create an account to join the conversation.

More
2 years 2 months ago - 2 years 2 months ago #307349 by epineh
Thanks for the earlier reply meister, regarding using extra pins on your Tangoboard, I downloaded the datasheet for the nano 9K and that also cleared up a few things.

I was thinking, since you are already using SPI for your expansion IO boards, would it be feasible to use a hardware quadrature decoder chip, or something along the lines of DigitalChicken's OctoQuad code running on a Pi-Pico? Basically it will read 8 high speed quadrature signals (1MHZ) and convert each to a 32 bit position value per encoder that the controller calls for via SPI when the servo loop is required to be updated.

The idea is to have a dedicated expansion board for this, with 8 RJ45 connectors, associated line receivers and the decoding hardware. I know closed loop to LinuxCNC isn't everybody's cup of tea but you could also use it for spindle encoders, MPG's etc.

Cheers.
Russell.
Last edit: 2 years 2 months ago by epineh.

Please Log in or Create an account to join the conversation.

Time to create page: 0.462 seconds
Powered by Kunena Forum