On Tue, Sep 14, 2021, 3:44 PM Gene Heskett <[email protected]> wrote:

> On Tuesday 14 September 2021 15:36:49 John Figie wrote:
>
> > So I am still curious if connecting some device to a Mesa Anything I/O
> > board such as the 7I80 using SPI is easy or difficult to do.
> >
> > I see that there was some work proposed for a SPI sub-driver for
> > hostmot2
> > <http://wiki.linuxcnc.org/cgi-bin/wiki.pl?SPI_Sub-Driver_For_Hostmot2>
> > but maybe not much has changed since this was added to the wiki.
> >
> > my understanding is that this would work for some SPI communications
> > between a card like a 7I80 and some device. The driver would allow a
> > user to configure the SPI comms for the number of SPI channels and the
> > amount of data frames transferred with each request.
> >
> > I see that some I/O boards already use SPI communications, along with
> > discrete I/O such as the 7I65. So I suppose one could make a device
> > that uses the SPI interface and pretends to be the DACs from a 7I65,
> > but that would be kind of limited as the communications is probably
> > just output only.
> >
> No, your info, and the wiki are out of date, its 2 way using the rpspi.ko
> driver since about 4 years back up the log and in my case. a 7i90HD
> card, buffered and protected by a trio of 7i42TA's which in addition to
> gobbling up noise that can destroy the fpga in the 7i90HD, supplies
> those ultra handy little green screw terminals to wire it all up with.
>
Yes I saw the rpspi to 7I90 but that is not what I was asking about. I
could be wrong but isn't the proposed spi sub driver referring to an spi
interface between an anything I/O card and some device? By device I mean
some I/O device like a servo drive or an ADC or whatever and there could be
multiple SPI interfaces available. I am not using a rp4 but maybe I should
be. I am using a PC but I did add another NIC so I have several Ethernet
ports and I want just a single Ethernet port as my interface to my machine
I/O.

>
> My rpi4 is sending 32 bit packets to the 7i90 over an spi bus at about 41
> megabaud, and getting data back from the 7i90HD at 25 megabaud. The rpi3
> before it did the same. Doing it with the 7i90HD, my rpi4's ethernet
> port is still free, so that pi is just another address on my home
> private network, which is NATted from my internet address, so I can
> carve steel with a converted 1950 vintage Sheldon lathe and browse the
> world with firefox at the same time if I want to. I could do that with a
> pi3b but you could hear the lathe stumble a bit now and then.
>
> > But what about the 7I46? Is that I/O card supported by LinuxCNC in
> > some way? How are the SPI ports configured?
>
> Don't know anything about the 7i46, you'll have to ask Peter C. Wallace,
> who I think is reading these lists.
>
> > Is there still interest in the SPI sub-diver for hosmot2? Has the
> > community moved on to better ways to interface to other devices?
>
> The rpspi.ko driver, by a Swedish Uni prof named Bertho Stultans, was
> contributed to LinuxCNC several years ago, and has been updated at least
> twice since. It Just Works if you follow the cabling instructions.
> Effectively the spi disappears and all ypu see at lcnc launch is the
> cards registration, which looks like this:
>
> hm2_rpspi: ERROR: Failed to execute '/sbin/rmmod spi_bcm2835'
> 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)
> hm2/hm2_7i90.0:     IO Pin 022 (P1-45): IOPort
> hm2/hm2_7i90.0:     IO Pin 023 (P1-47): IOPort
> hm2/hm2_7i90.0:     IO Pin 024 (P2-01): IOPort
> hm2/hm2_7i90.0:     IO Pin 025 (P2-03): IOPort
> hm2/hm2_7i90.0:     IO Pin 026 (P2-05): IOPort
> hm2/hm2_7i90.0:     IO Pin 027 (P2-07): IOPort
> hm2/hm2_7i90.0:     IO Pin 028 (P2-09): IOPort
> hm2/hm2_7i90.0:     IO Pin 029 (P2-11): IOPort
> hm2/hm2_7i90.0:     IO Pin 030 (P2-13): IOPort
> hm2/hm2_7i90.0:     IO Pin 031 (P2-15): IOPort
> hm2/hm2_7i90.0:     IO Pin 032 (P2-17): IOPort
> hm2/hm2_7i90.0:     IO Pin 033 (P2-19): IOPort
> hm2/hm2_7i90.0:     IO Pin 034 (P2-21): IOPort
> hm2/hm2_7i90.0:     IO Pin 035 (P2-23): IOPort
> hm2/hm2_7i90.0:     IO Pin 036 (P2-25): IOPort
> hm2/hm2_7i90.0:     IO Pin 037 (P2-27): IOPort
> hm2/hm2_7i90.0:     IO Pin 038 (P2-29): IOPort
> hm2/hm2_7i90.0:     IO Pin 039 (P2-31): IOPort
> hm2/hm2_7i90.0:     IO Pin 040 (P2-33): IOPort
> hm2/hm2_7i90.0:     IO Pin 041 (P2-35): IOPort
> hm2/hm2_7i90.0:     IO Pin 042 (P2-37): IOPort
> hm2/hm2_7i90.0:     IO Pin 043 (P2-39): IOPort
> hm2/hm2_7i90.0:     IO Pin 044 (P2-41): IOPort
> hm2/hm2_7i90.0:     IO Pin 045 (P2-43): IOPort
> hm2/hm2_7i90.0:     IO Pin 046 (P2-45): IOPort
> hm2/hm2_7i90.0:     IO Pin 047 (P2-47): IOPort
> hm2/hm2_7i90.0:     IO Pin 048 (P3-01): IOPort
> hm2/hm2_7i90.0:     IO Pin 049 (P3-03): IOPort
> hm2/hm2_7i90.0:     IO Pin 050 (P3-05): IOPort
> hm2/hm2_7i90.0:     IO Pin 051 (P3-07): IOPort
> hm2/hm2_7i90.0:     IO Pin 052 (P3-09): IOPort
> hm2/hm2_7i90.0:     IO Pin 053 (P3-11): IOPort
> hm2/hm2_7i90.0:     IO Pin 054 (P3-13): IOPort
> hm2/hm2_7i90.0:     IO Pin 055 (P3-15): IOPort
> hm2/hm2_7i90.0:     IO Pin 056 (P3-17): IOPort
> hm2/hm2_7i90.0:     IO Pin 057 (P3-19): IOPort
> hm2/hm2_7i90.0:     IO Pin 058 (P3-21): IOPort
> hm2/hm2_7i90.0:     IO Pin 059 (P3-23): IOPort
> hm2/hm2_7i90.0:     IO Pin 060 (P3-25): IOPort
> hm2/hm2_7i90.0:     IO Pin 061 (P3-27): IOPort
> hm2/hm2_7i90.0:     IO Pin 062 (P3-29): IOPort
> hm2/hm2_7i90.0:     IO Pin 063 (P3-31): IOPort
> hm2/hm2_7i90.0:     IO Pin 064 (P3-33): IOPort
> hm2/hm2_7i90.0:     IO Pin 065 (P3-35): IOPort
> hm2/hm2_7i90.0:     IO Pin 066 (P3-37): IOPort
> hm2/hm2_7i90.0:     IO Pin 067 (P3-39): IOPort
> hm2/hm2_7i90.0:     IO Pin 068 (P3-41): IOPort
> hm2/hm2_7i90.0:     IO Pin 069 (P3-43): IOPort
> hm2/hm2_7i90.0:     IO Pin 070 (P3-45): IOPort
> hm2/hm2_7i90.0:     IO Pin 071 (P3-47): IOPort
> hm2/hm2_7i90.0: registered
> MOTION: setting Traj cycle time to 1000000 nsecs
> MOTION: setting Servo cycle time to 1000000 nsecs
> note: MAXV     max: 2.000 units/sec 120.000 units/min
> note: LJOG     max: 2.000 units/sec 120.000 units/min
> note: LJOG default: 1.350 units/sec 81.000 units/min
> note: jog_order='ZX'
> note: jog_invert={'X'}
>
>
> > Yes I know that the distance that SPI works over is limited, but on
> > the other hand it is a pretty simple interface and the data rates can
> > easily be 10Mbits/sec if limited to short distances like 10 - 20 cm.
>
> My data cable is about 1.6". I mounted the r-pi upside down so its a
> straight shot from the 44pin pi header to the 26 pin socket on the
> 7i90HD. No cable twists needed.
>
> > Regards,
> >
> > John Figie
> >
> > _______________________________________________
> > Emc-users mailing list
> > [email protected]
> > 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)
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to