Thanks Charles!

OK so I'm looking at this again, so to cable the DE0 to the G540 for X
AXIS stepper control:

x step is I/O 02 which is GPIO_0[14] or pin 17 J1B2 J1-2 pin 2
x dir is I/O 04 which is GPIO_0[12] or pin 15 J1B4 J1-4 pin 3

So I connect pin 2+3 on the DE0 to pin 2+3 on the G540 DB25?

Assuming that's correct, is it easy enough for me to just go in to
machinekit and jog the X stepper?

On 24 February 2018 at 00:53, Charles Steinkuehler
<char...@steinkuehler.net> wrote:
> On 2/23/2018 7:29 AM, Charles Steinkuehler wrote:
>> On 2/22/2018 9:41 PM, Richard Thornton wrote:
>>
>>> With this config which pins would I use for GPIO, GPIO_1 (LCD, relay,
>>> VFD, pendant, limits, T.O.P)?
>>
>> Whichever pins you need.  Any pin can be an I/O pin.
>
> Just a warning that the pin numbering can be a bit confusing if you're
> not using one of my breakout boards (and just going by the DB25 pin
> numbers listed in the PIN_ file).  You have to follow a fairly long
> chain to figure out exactly what hm2 pin is connected to a particular
> physical pin:
>
> * Everything starts with the PIN_* file which specifies what functions
> are mapped to which pins.  The pins are listed in "hostmot2" order,
> lowest to highest (the hostmot2 instance exports an array of pins to
> the top-level
>
> https://github.com/machinekit/mksocfpga/blob/master/HW/hm2/config/DE0_Nano_SoC_DB25/PIN_G540_G540_GPIO_GPIO.vhd#L111-L130
>
> * The iobits signals get mapped to specific GPIO_0 and GPIO_1 signals
> in the top-level VHD file to make routing to the DB25 connector easy:
>
> https://github.com/machinekit/mksocfpga/blob/master/HW/hm2/config/DE0_Nano_SoC_DB25/PIN_G540_G540_GPIO_GPIO.vhd#L113-L129
>
> * You then need to look up the physical header pin that particular
> GPIO signals is routed to on the DE0-Nano (via the schematic or the
> reference manual):
>
> http://www.terasic.com.tw/attachment/archive/941/DE0-Nano-SoC_User_manual_rev.C1.pdf
>
> * Then you need to follow that signal from the pin header to the DB25
> connector on the DE0-Nano_DB25 break-out board:
>
> https://github.com/cdsteinkuehler/bobc_hardware/blob/CRAMPS/DE0-Nano_DB25/DE0-Nano_DB25.pdf
>
>
> So, for example:
>
> * hostmot2 I/O signal 0 is specified as a GPIO pin in the PIN_ file
> (it has no secondary function defined).
>
> * iobits(0) is mapped to GPIO_0(16) in DE0_Nano_SoC_DB25.vhd
>
> * GPIIO_0(16) is on pin 19 of the pin header per the user manual
>
> * P1 pin 19 on the breakout board connects to J1B0 which becomes J1-0
> (after the bus translator) and is connected to P2 pin 1
>
> Easy-Peasy!  ;-)
>
> --
> Charles Steinkuehler
> char...@steinkuehler.net
>
> --
> website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
> https://github.com/machinekit
> ---
> You received this message because you are subscribed to a topic in the Google 
> Groups "Machinekit" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/machinekit/Qj7VFVrRiYo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> machinekit+unsubscr...@googlegroups.com.
> Visit this group at https://groups.google.com/group/machinekit.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to