On Thursday 28 October 2021 23:59:00 Peter C. Wallace wrote: > On Fri, 29 Oct 2021, Ralph Stirling wrote: > > Date: Fri, 29 Oct 2021 03:18:40 +0000 > > From: Ralph Stirling <ralph.stirl...@wallawalla.edu> > > Reply-To: "Enhanced Machine Controller (EMC)" > > <emc-users@lists.sourceforge.net> > > To: "emc-users@lists.sourceforge.net" > > <emc-users@lists.sourceforge.net> Subject: Re: [Emc-users] Mesa 7i90 > > as remote sserial > > > > Am I once again trying for something untested? > > Is it possible to use a 7i90hd as a high speed > > sserial remote (2.5Mb, not the 115kb) with > > configurations other than straight gpio? > > > > Thanks, > > -- Ralph > > The FPGA firmware can be created easily enough but the I/O > needs to be supported by writing code, I think the current > code supports just GPIO and 3 MPG encoders. Also with full > encoders and PWM you would need to use the expanded sserial > interface on the host FPGA (224 bits rather than normal > Sserials 96 bits max) and likely drop some encoder features > Peter, my pi is using 4 encoders and 4 stepgens right now. Not all of these work, its a damaged by noise 7i90HD using the much faster SPI. I moved to use a different stepgen each time the noise blew a pin. From the init:
Found file(REL): ./hm2-7i90-stepper.hal Note: Using POSIX realtime hm2: loading Mesa HostMot2 driver version 0.15 hm2_rpspi: Platform: Raspberry Pi 4 Model B Rev 1.1 hm2_rpspi: Base address 0xfe000000 size 0x01800000 hm2_rpspi: Mapped peripherals from 0xfe000000 (size 0x01800000) to gpio:0x0xb4300000, spi:0x0xb4304000, aux:0x0xb4315000 hm2_rpspi: SPI0/CE0 clock rate: 41666000/25000000 Hz, VPU clock rate: 500000000 Hz hm2_rpspi: SPI0/CE0 write clock rate calculated: 41666666 Hz (clkdiv=12) hm2_rpspi: SPI0/CE0 read clock rate calculated: 25000000 Hz (clkdiv=20) hm2_rpspi: SPI0/CE0 Valid cookie matched hm2_rpspi: SPI0/CE0 Base: hm2_7i90.0 hm2/hm2_7i90.0: Low Level init 0.15 hm2/hm2_7i90.0: MD 2: 3x IOPort v0: accepted, using 3 hm2/hm2_7i90.0: MD 0: 1x Hostmot2 DPLL v0: accepted, using 1 hm2/hm2_7i90.0: MD 1: 1x Watchdog v0: accepted, using 1 hm2/hm2_7i90.0: MD 3: 4x Encoder v2: accepted, using 4 hm2/hm2_7i90.0: MD 4: 2x PWMGen v0: accepted, using 1 hm2/hm2_7i90.0: MD 5: 4x StepGen v2: accepted, using 4 hm2/hm2_7i90.0: MD 6: 1x LED v0: accepted, using 1 hm2/hm2_7i90.0: 72 I/O Pins used: hm2/hm2_7i90.0: IO Pin 000 (P1-01): StepGen #0, pin Step (Output) hm2/hm2_7i90.0: IO Pin 001 (P1-03): StepGen #0, pin Direction (Output) hm2/hm2_7i90.0: IO Pin 002 (P1-05): StepGen #1, pin Step (Output) hm2/hm2_7i90.0: IO Pin 003 (P1-07): StepGen #1, pin Direction (Output) hm2/hm2_7i90.0: IO Pin 004 (P1-09): Encoder #0, pin A (Input) hm2/hm2_7i90.0: IO Pin 005 (P1-11): Encoder #2, pin A (Input) hm2/hm2_7i90.0: IO Pin 006 (P1-13): Encoder #0, pin B (Input) hm2/hm2_7i90.0: IO Pin 007 (P1-15): Encoder #2, pin B (Input) hm2/hm2_7i90.0: IO Pin 008 (P1-17): Encoder #0, pin Index (Input) hm2/hm2_7i90.0: IO Pin 009 (P1-19): Encoder #2, pin Index (Input) hm2/hm2_7i90.0: IO Pin 010 (P1-21): Encoder #1, pin A (Input) hm2/hm2_7i90.0: IO Pin 011 (P1-23): Encoder #3, pin A (Input) hm2/hm2_7i90.0: IO Pin 012 (P1-25): Encoder #1, pin B (Input) hm2/hm2_7i90.0: IO Pin 013 (P1-27): Encoder #3, pin B (Input) hm2/hm2_7i90.0: IO Pin 014 (P1-29): Encoder #1, pin Index (Input) hm2/hm2_7i90.0: IO Pin 015 (P1-31): Encoder #3, pin Index (Input) hm2/hm2_7i90.0: IO Pin 016 (P1-33): StepGen #2, pin Step (Output) hm2/hm2_7i90.0: IO Pin 017 (P1-35): StepGen #2, pin Direction (Output) hm2/hm2_7i90.0: IO Pin 018 (P1-37): StepGen #3, pin Step (Output) hm2/hm2_7i90.0: IO Pin 019 (P1-39): StepGen #3, pin Direction (Output) hm2/hm2_7i90.0: IO Pin 020 (P1-41): PWMGen #0, pin Out0 (PWM or Up) (Output) hm2/hm2_7i90.0: IO Pin 021 (P1-43): PWMGen #0, pin Out1 (Dir or Down) (Output) [... snip gpio list ending at IO Pin 71] I'm also using quite a few gpio pins from the top down, but probably have 30 gpio pins unused as yet. Auto Tool changers if I ever build one, auto lube, both coolants, etc all have gpio's available to get it done on one card yet. I am under the impression that more than 1 7i90HD could be used as the SPI interface is rather open ended, with more than one channel/card per pi being possible. But someone will need to rewrite the rpspi.ko code. The pi4b has, I believe, enough bandwitdh to support at least two cards, possibly more. Note the baud rates above. According to the scope there is time enough between packets now that two cards could be managed easily. Note that SPI is lots faster. At a 41,666666 baud rate write to the 7i90 and a 25,000000 baud rate reading back from the 7i90, many times faster than the 2.5 megabaud sseriel does. Presently the actual use is 3 encoders and 2 stepgens with a pwmgen running the bi-di spindle thru a spinx1 and vfd. One encoder watchng the spindle, 2 watching $20 hand dials from MPJA.com so I have hand controls just as if the cranks from 1950 were still there. > > ________________________________________ > > From: Ralph Stirling > > Sent: Sunday, October 24, 2021 11:11 AM > > To: emc-users@lists.sourceforge.net > > Subject: Mesa 7i90 as remote sserial > > > > I'm interested in using the 7i90hd as an sserial remote, > > but am having trouble pulling all the pieces together to > > build a configuration. I will ultimately need four servo > > channels (encoder and pwm), three MPG channels, and > > a bunch of discrete i/o. I may split this up into two or > > three 7i90 ssremotes for the cleanest system organization, > > but one sample config should give me enough information > > to make the others. In addition to making the bitstream, I > > need to make a hal file, and haven't seen quite enough > > documentation to do that either. > > > > Thanks again, > > -- Ralph > > > > > > _______________________________________________ > > Emc-users mailing list > > Emc-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/emc-users > > Peter Wallace > Mesa Electronics > > (\__/) > (='.'=) This is Bunny. Copy and paste bunny into your > (")_(") signature to help him gain world domination. > > > > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users Cheers, Gene Heskett. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene> _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users