On 5/10/2017 11:17 AM, Alexey Volkov wrote:
> As well, I would need a 2-nd encoder for MPG, this is the reason I have been 
> using 4x7i76. Any another configuration would do the task as well where I can 
> have hardware PWM generators?
> Needed: 2-3 steppers, 2 encoders (spindle and MPG), 1 PWM, 10-12 GPIO's.
> 
> Best regards,
> Alexey
> 
> On Wednesday, 10 May 2017 09:03:41 UTC-7, Alexey Volkov wrote:
> 
>     Hello
> 
>     I am using DE0-Nano-SoC with DB25 board, with mesa SOCFPGA firmware
>     7i76_7i76_7i76_7i76.
>     I do not have mesa 7i76 boards and connecting speppers, spindle control 
> and
>     encoders directly to the DB25 adapter.
>     I successfully set up and run 3 stepper generators, 1 encoder on P2 of the
>     DB25. Works very well, I was able to run STEP/DIR up to 500kHz rate.
>     I also tried to add PWN generators, declaring them same way as for 
> steppers:
>     "pwmgens=1", it goes thru,  but I do not see them in HAL and if I try to
>     call for the pwm generator machinekit complains what the PIN does not 
> exist.
>     Just wondering: Was PWMGEN implemented at all in SOCFPGA and if it was how
>     to use one.

Yes, PWMGEN is in the SOCFPGA firmware, but there are none enabled in
the configuration you're using.

>     Do I have to use custom build firmware to be able to use "hardware" PWM
>     generators?

Yes, you are going to need a new FPGA configuration file with the
features you want enabled.  Do you have a pinout you would like to use?

I gave a presentation on customizing the FPGA configuration at the
recent meetup, but unless you're familiar with VHDL and compiling FPGA
firmware (or want to learn) it's probably easier all around if I make
a new PIN file for you.

>     I was able to use software PWMGEN, but it is working very slow 
> (~0.5-1kHz).

Software PWMGEN is useful for things like heaters, but not for
anything fast.  However you could probably use a software encoder
component for your MPG, but if you've got the FPGA you might as well
use it!  :)

-- 
Charles Steinkuehler
[email protected]

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to