7I90HD via EPP parallel port

More
9 years 8 months ago #88647 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 to join the conversation.

More
9 years 8 months ago #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

Please Log in to join the conversation.

More
9 years 7 months ago #89124 by phillc54
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 to join the conversation.

More
9 years 7 months ago #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 to join the conversation.

More
9 years 7 months ago #89190 by phillc54
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 to join the conversation.

More
9 years 7 months ago #89229 by phillc54
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 to join the conversation.

More
9 years 7 months ago #89238 by phillc54
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 to join the conversation.

More
9 years 7 months ago #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

Please Log in to join the conversation.

More
9 years 7 months ago #89331 by andypugh

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

Please Log in to join the conversation.

More
9 years 7 months ago #89377 by phillc54
Thank you guys, its amazing how things just work when you do them the correct way.

Please Log in to join the conversation.

Time to create page: 0.682 seconds
Powered by Kunena Forum