7I90HD via EPP parallel port

More
27 Feb 2017 00:06 #88647 by phillc54
phillc54 created the topic: 7I90HD via EPP parallel port
I have a 7I90HD and am trying to connect it to a EPP parallel port.

phill@jessie-64:~$ lspci -vv
shows the following:
Warning: Spoiler! [ Click to expand ]


after:
phill@jessie-64:~$ halrun
halcmd: loadrt hostmot2
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
halcmd:

I try:
halcmd: loadrt hm2_7i90 ioaddr=0xdc00 config="num_encoders=-1 num_stepgens=-1"
which gives:
Warning: Spoiler! [ Click to expand ]


I then try:
halcmd: loadrt hm2_7i90 ioaddr=0xd880 config="num_encoders=-1 num_stepgens=-1"
which gives:
Warning: Spoiler! [ Click to expand ]


These show slightly different errors from rtapi_app_main but both fail.

Can anyone shed any light on this for me.

Cheers, Phill.
More
27 Feb 2017 00:31 #88649 by PCW
PCW replied the topic: 7I90HD via EPP parallel port
AFAIK most if not all MOSCHIP parallel port chips have a broken EPP implementation
so will work fine for normal LinuxCNC SPP use but fail if you try to connect to a EPP
peripheral. Best choice for using a 7I90 in parallel port mode is a on board parallel port
Next choice would be a known good PCI/PCIE parallel port card, for example Oxsemi 952 based cards
The following user(s) said Thank You: phillc54
More
07 Mar 2017 07:22 #89124 by phillc54
phillc54 replied the topic: 7I90HD via EPP parallel port
I got hold of a card with a Oxford PCIe952 chip and still cannot connect to the 7i90.

I have tried both addresses.

Warning: Spoiler! [ Click to expand ]


I noticed that the first line of lspci -vv mentions [ECP]

Does this mean that I somehow need to switch the card to EPP mode?
More
07 Mar 2017 15:10 #89137 by PCW
PCW replied the topic: 7I90HD via EPP parallel port
It looks like the I/O high address is not correct (I would expect it to chose base +0x400 automatically)
The I/O high address is needed to change the mode
More
08 Mar 2017 05:57 #89190 by phillc54
phillc54 replied the topic: 7I90HD via EPP parallel port
If I specify ioaddr_hi=0xe000 it makes no difference to the result, it still looks at 0xd880...

I also tried ioaddr_hi=0 as per the man page and got the same result.

Warning: Spoiler! [ Click to expand ]
More
09 Mar 2017 01:16 #89229 by phillc54
phillc54 replied the topic: 7I90HD via EPP parallel port
It appears to work if I add epp_wide=0 to the loadrt line (why did I not try that before???).

It loads then lists the pins and show pin and show param seem to give the correct output.

I have only done this remotely so when I get home this evening I will connect some I/O up and test it out.
More
09 Mar 2017 06:47 #89238 by phillc54
phillc54 replied the topic: 7I90HD via EPP parallel port
Another roadblock...

loading the card gives what appears to me to be success:

Warning: Spoiler! [ Click to expand ]


I do show pin and both the user leds appear:
hm2_7i90.0.led.CR01
hm2_7i90.0.led.CR02

Both the user leds are off.

I do getp hm2_7i90.0.led.CR01 and it returns FALSE.

I do getp hm2_7i90.0.led.CR02 and it returns FALSE.

I do setp hm2_7i90.0.led.CR01 1 and setp hm2_7i90.0.led.CR02 1.

Both the leds stay off. :-(

I do getp hm2_7i90.0.led.CR01 and it returns TRUE.

I do getp hm2_7i90.0.led.CR02 and it returns TRUE.

What am I doing wrong???
More
09 Mar 2017 14:25 #89255 by PCW
PCW replied the topic: 7I90HD via EPP parallel port
Those commands will do no actual communication with the 7I90 card as
you have not setup a thread and addf-ed the 7I90 read and write functions
to that thread

At this point its probably better to have an actual hal file
The following user(s) said Thank You: phillc54
More
10 Mar 2017 14:42 - 10 Mar 2017 14:42 #89331 by andypugh
andypugh replied the topic: 7I90HD via EPP parallel port

phillc54 wrote: I do setp hm2_7i90.0.led.CR01 1 and setp hm2_7i90.0.led.CR02 1.
Both the leds stay off. :-(


You need to setup and start the realtime theads for anything to happen on the board.
loadrt threads
addf hm2_7i90.0.read   thread1
addf hm2_7i90.0.write   thread1
start
Is how you do that in a halrun command line session.
Last Edit: 10 Mar 2017 14:42 by andypugh.
The following user(s) said Thank You: PKM, phillc54
More
10 Mar 2017 21:47 #89377 by phillc54
phillc54 replied the topic: 7I90HD via EPP parallel port
Thank you guys, its amazing how things just work when you do them the correct way.
Moderators: PCWjmelson
Time to create page: 0.086 seconds
Powered by Kunena Forum