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 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.