7I90HD via EPP parallel port

  • phillc54
  • phillc54's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
27 Feb 2017 00:06 #88647 by phillc54
7I90HD via EPP parallel port was created by phillc54
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!


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!


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


These show slightly different errors from rtapi_app_main but both fail.

Can anyone shed any light on this for me.

Cheers, Phill.

Please Log in or Create an account to join the conversation.

More
27 Feb 2017 00:31 #88649 by PCW
Replied by PCW on 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

Please Log in or Create an account to join the conversation.

  • phillc54
  • phillc54's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
07 Mar 2017 07:22 #89124 by phillc54
Replied by phillc54 on 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!


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?

Please Log in or Create an account to join the conversation.

More
07 Mar 2017 15:10 #89137 by PCW
Replied by PCW on 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

Please Log in or Create an account to join the conversation.

  • phillc54
  • phillc54's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
08 Mar 2017 05:57 #89190 by phillc54
Replied by phillc54 on 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!

Please Log in or Create an account to join the conversation.

  • phillc54
  • phillc54's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
09 Mar 2017 01:16 #89229 by phillc54
Replied by phillc54 on 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.

Please Log in or Create an account to join the conversation.

  • phillc54
  • phillc54's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
09 Mar 2017 06:47 #89238 by phillc54
Replied by phillc54 on topic 7I90HD via EPP parallel port
Another roadblock...

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

Warning: Spoiler!


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

Please Log in or Create an account to join the conversation.

More
09 Mar 2017 14:25 #89255 by PCW
Replied by PCW on 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

Please Log in or Create an account to join the conversation.

More
10 Mar 2017 14:42 - 10 Mar 2017 14:42 #89331 by andypugh
Replied by andypugh on topic 7I90HD via EPP parallel port

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

Please Log in or Create an account to join the conversation.

  • phillc54
  • phillc54's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
10 Mar 2017 21:47 #89377 by phillc54
Replied by phillc54 on topic 7I90HD via EPP parallel port
Thank you guys, its amazing how things just work when you do them the correct way.

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.082 seconds
Powered by Kunena Forum