Re: [Emc-users] Parallel Port Problems

2018-10-31 Thread bari
Having the board in front of me would help or even a high res image.

http://linuxcnc.org/docs/2.6/html/hal/parallel_port.html

"The HAL driver supports the bidirectional port, and allows the user to
set the data group as either input or output. If configured as output, a
port provides a total of 12 outputs and 5 inputs. If configured as
input, it provides 4 outputs and 13 inputs.

In some parallel ports, the control group pins are open collectors,
which may also be driven low by an external gate. On a board with open
collector control pins, the x mode allows a more flexible mode with 8
outputs, and 9 inputs.

HAL and Open Collectors

HAL cannot automatically determine if the x mode bidirectional pins are
actually open collectors (OC). If they are not, they cannot be used as
inputs, and attempting to drive them LOW from an external source can
damage the hardware.

To determine whether your port has open collector pins, load hal_parport
in x mode. With no device attached, HAL should read the pin as TRUE.
Next, insert a 470 ohm resistor from one of the control pins to GND. If
the resulting voltage on the control pin is close to 0V, and HAL now
reads the pin as FALSE, then you have an OC port. If the resulting
voltage is far from 0V, or HAL does not read the pin as FALSE, then your
port cannot be used in x mode."


On 10/31/2018 09:13 PM, Chris Albertson wrote:
> So it is looking like the external resisters some how become disconnected
> when you swap out the operating system?   Interesting?
>
> No, seriously, the hard part about debugging is that all the documentation
> describe the INTENDED design and the way things SHOULD work.   The first
> step in debugging is to realized that "This is Impossible.  It can't be
> happening"
>
> The resisters reacting to which OS is running?  Impossible, I think.
>
> Last time I had to debug a 3D printer controler board I looked at the volts
> output by a microcontroller pin and said "that's impossible, I set it to
> "1" but I see a zero. Worse I set four pins to go up/down/up/down all
> together at about 1Hz and only 3 of them moved."Impossible?   Not if
> there is a solder defect on the PCB that grounded a pin and cause it to
> "blow".
>
> I think when you find something that is identifiablely impossible you are
> 60% of the way fixing it.
>
>
>
> On Wed, Oct 31, 2018 at 4:09 PM bari  wrote:
>
>> I just looked at the manual for the Moschip 9865 and there isn't any
>> mention of software select for the LPT signal pullups. It doesn't even
>> mention any being internally available.
>>
>> Looking at the reference schematic they show that external 4.7K ohm
>> resistors are to be used on all the LPT pins including 33 ohm series
>> resistors.
>>
>> I didn't see anything in the Moschip Linux driver source at the asix.com
>> website about the pullups.
>> https://www.asix.com.tw/products.php?op=pItemdetail=125;74;111
>>
>>
>> On 10/31/2018 05:12 PM, Chris Albertson wrote:
>>> On Wed, Oct 31, 2018 at 1:46 PM Todd Zuercher 
>> wrote:
 Gene,

 My problem isn't the breakout board per say.  It is that this wonky PCIe
 parallel port card isn't pulling up the input pins in Linux (it does in
 Windows).
>>> If it works in Windows it's obviously a software problem.   You need to
>>> look a the source code for the paraport driver in Linux.
>>>
>>> Try looking in the /proc/sys/dev/parport.  file system.If you
>> drill
>>> down you can see the list of modes the kernal THINKs the port suports.
>>  It
>>> might be the Kernal thinks the one you need is not suported.  The fix for
>>> this would go the driver.  But is your Kernal up to date, you don't want
>> to
>>> fix something that was allready fixed some months or years ago.
>>>
>>> Did the card need a special driver install in Windows?  If so then it
>>> mi=ust be non-standard.
>>>
>>>
>>
>>
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
>>
>



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Parallel Port Problems

2018-10-31 Thread Chris Albertson
So it is looking like the external resisters some how become disconnected
when you swap out the operating system?   Interesting?

No, seriously, the hard part about debugging is that all the documentation
describe the INTENDED design and the way things SHOULD work.   The first
step in debugging is to realized that "This is Impossible.  It can't be
happening"

The resisters reacting to which OS is running?  Impossible, I think.

Last time I had to debug a 3D printer controler board I looked at the volts
output by a microcontroller pin and said "that's impossible, I set it to
"1" but I see a zero. Worse I set four pins to go up/down/up/down all
together at about 1Hz and only 3 of them moved."Impossible?   Not if
there is a solder defect on the PCB that grounded a pin and cause it to
"blow".

I think when you find something that is identifiablely impossible you are
60% of the way fixing it.



On Wed, Oct 31, 2018 at 4:09 PM bari  wrote:

> I just looked at the manual for the Moschip 9865 and there isn't any
> mention of software select for the LPT signal pullups. It doesn't even
> mention any being internally available.
>
> Looking at the reference schematic they show that external 4.7K ohm
> resistors are to be used on all the LPT pins including 33 ohm series
> resistors.
>
> I didn't see anything in the Moschip Linux driver source at the asix.com
> website about the pullups.
> https://www.asix.com.tw/products.php?op=pItemdetail=125;74;111
>
>
> On 10/31/2018 05:12 PM, Chris Albertson wrote:
> > On Wed, Oct 31, 2018 at 1:46 PM Todd Zuercher 
> wrote:
> >
> >> Gene,
> >>
> >> My problem isn't the breakout board per say.  It is that this wonky PCIe
> >> parallel port card isn't pulling up the input pins in Linux (it does in
> >> Windows).
> >
> > If it works in Windows it's obviously a software problem.   You need to
> > look a the source code for the paraport driver in Linux.
> >
> > Try looking in the /proc/sys/dev/parport.  file system.If you
> drill
> > down you can see the list of modes the kernal THINKs the port suports.
>  It
> > might be the Kernal thinks the one you need is not suported.  The fix for
> > this would go the driver.  But is your Kernal up to date, you don't want
> to
> > fix something that was allready fixed some months or years ago.
> >
> > Did the card need a special driver install in Windows?  If so then it
> > mi=ust be non-standard.
> >
> >
>
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>


-- 

Chris Albertson
Redondo Beach, California

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Parallel Port Problems

2018-10-31 Thread bari
I just looked at the manual for the Moschip 9865 and there isn't any
mention of software select for the LPT signal pullups. It doesn't even
mention any being internally available.

Looking at the reference schematic they show that external 4.7K ohm
resistors are to be used on all the LPT pins including 33 ohm series
resistors.

I didn't see anything in the Moschip Linux driver source at the asix.com
website about the pullups.
https://www.asix.com.tw/products.php?op=pItemdetail=125;74;111


On 10/31/2018 05:12 PM, Chris Albertson wrote:
> On Wed, Oct 31, 2018 at 1:46 PM Todd Zuercher  wrote:
>
>> Gene,
>>
>> My problem isn't the breakout board per say.  It is that this wonky PCIe
>> parallel port card isn't pulling up the input pins in Linux (it does in
>> Windows).
>
> If it works in Windows it's obviously a software problem.   You need to
> look a the source code for the paraport driver in Linux.
>
> Try looking in the /proc/sys/dev/parport.  file system.If you drill
> down you can see the list of modes the kernal THINKs the port suports.   It
> might be the Kernal thinks the one you need is not suported.  The fix for
> this would go the driver.  But is your Kernal up to date, you don't want to
> fix something that was allready fixed some months or years ago.
>
> Did the card need a special driver install in Windows?  If so then it
> mi=ust be non-standard.
>
>



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Parallel Port Problems

2018-10-31 Thread Todd Zuercher
Gene,

My problem isn't the breakout board per say.  It is that this wonky PCIe 
parallel port card isn't pulling up the input pins in Linux (it does in 
Windows).

I can make this breakout board work by adding a 3.3 or 5v pullup to the 
parallel port side of the opto (I've tested it and I know that does work.)  I'm 
asking here if anyone has a clue what it might take to make the parallel port 
work as it should in Linux? (like it does in Windows)  So that I won't have to 
add the pull ups or buy a different breakout board.

Todd Zuercher
P. Graham Dunn Inc.
630 Henry Street 
Dalton, Ohio 44618
Phone:  (330)828-2105ext. 2031

-Original Message-
From: Gene Heskett  
Sent: Wednesday, October 31, 2018 1:49 PM
To: emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] Parallel Port Problems

On Wednesday 31 October 2018 10:13:51 Todd Zuercher wrote:

> I am trying to use a PCIe duel parallel port card and I'm having some 
> trouble with it.  It uses a Moschip 9865 according to lspci-v. I have
> 2 different breakout boards, one is a CNC4PC C10 board and it works 
> perfectly fine with this parallel port card.  The other one is one of 
> those cheap 5 axis boards targeted for Mach3.
>
Step one step up the rickety ladder that parport BoB's an replace that one with 
a Sainsmart. It has nice solid outputs w/o any opto's to screw you with making 
pwm-generators non-linear as hell, and if you have really high resolution 
encoders, the opto's in the 5 inputs are easy to trace and bypass. Well worth 
the extra 5 bucks USD.

> My problem seems to be that with Linuxcnc this parallel port card 
> defaults to a mode where none of the input pins (10,11,12,13,15) are 
> pulled up internally.  That isn't a problem with the C10 because it 
> has it's own pull ups for all the inputs.  But it is a problem on the 
> cheap board which has no pull ups on those pins.  The outputs all seem 
> to work fine.

My stuff all has pullups, but I believe the Sainsmart has its own pullups. I'm 
rigged so output true = logic 0 for everything.

> It isn't that this parallel port card can't pull up those pins.  When 
> I test the port in Windows it does pull up the input pins up to 3.3v, 
> and the cheap breakout will work there.  So there must be some magic 
> setting that can make it work.  Does anyone have a clue what it might 
> be and how to use it in Linuxcnc?

You might have to use the in-not signal from your interface card if it has such 
a critter. 
>
> I also can't seem to make the card work in X mode in Linuxcnc, which 
> makes me think that It isn't using SPP and is defaulting to EPP or ECP 
> modes.  Is there a way to try to force a parallel port into SPP mode?
> (I ask this hoping that forcing the ports into SPP will make the 
> inputs pull up.)
>
> I did see on the forum that some have worked around this problem 
> simply by adding pull ups to input pins on these cheap breakout 
> boards.  But since this parallel port is in fact capable of pulling up 
> those pins in Windows, I was hoping a way could be found to do it in 
> Linux, and thus avoid having to get out the soldering iron.
>
> Todd Zuercher
> P. Graham Dunn Inc.<http://www.pgrahamdunn.com/index.php>
> 630 Henry Street
> Dalton, Ohio 44618
> Phone:  (330)828-2105ext. 2031
>
>
> ___
> 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)
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


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Parallel Port Problems

2018-10-31 Thread Gene Heskett
On Wednesday 31 October 2018 10:13:51 Todd Zuercher wrote:

> I am trying to use a PCIe duel parallel port card and I'm having some
> trouble with it.  It uses a Moschip 9865 according to lspci-v. I have
> 2 different breakout boards, one is a CNC4PC C10 board and it works
> perfectly fine with this parallel port card.  The other one is one of
> those cheap 5 axis boards targeted for Mach3.
>
Step one step up the rickety ladder that parport BoB's an replace that 
one with a Sainsmart. It has nice solid outputs w/o any opto's to screw 
you with making pwm-generators non-linear as hell, and if you have 
really high resolution encoders, the opto's in the 5 inputs are easy to 
trace and bypass. Well worth the extra 5 bucks USD.

> My problem seems to be that with Linuxcnc this parallel port card
> defaults to a mode where none of the input pins (10,11,12,13,15) are
> pulled up internally.  That isn't a problem with the C10 because it
> has it's own pull ups for all the inputs.  But it is a problem on the
> cheap board which has no pull ups on those pins.  The outputs all seem
> to work fine.

My stuff all has pullups, but I believe the Sainsmart has its own 
pullups. I'm rigged so output true = logic 0 for everything.

> It isn't that this parallel port card can't pull up those pins.  When
> I test the port in Windows it does pull up the input pins up to 3.3v,
> and the cheap breakout will work there.  So there must be some magic
> setting that can make it work.  Does anyone have a clue what it might
> be and how to use it in Linuxcnc?

You might have to use the in-not signal from your interface card if it 
has such a critter. 
>
> I also can't seem to make the card work in X mode in Linuxcnc, which
> makes me think that It isn't using SPP and is defaulting to EPP or ECP
> modes.  Is there a way to try to force a parallel port into SPP mode? 
> (I ask this hoping that forcing the ports into SPP will make the
> inputs pull up.)
>
> I did see on the forum that some have worked around this problem
> simply by adding pull ups to input pins on these cheap breakout
> boards.  But since this parallel port is in fact capable of pulling up
> those pins in Windows, I was hoping a way could be found to do it in
> Linux, and thus avoid having to get out the soldering iron.
>
> Todd Zuercher
> P. Graham Dunn Inc.
> 630 Henry Street
> Dalton, Ohio 44618
> Phone:  (330)828-2105ext. 2031
>
>
> ___
> 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)
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Parallel Port Problems

2007-12-24 Thread John Thornton
On 23 Dec 2007 at 8:45, [EMAIL PROTECTED] wrote:

Rayh and Emory,

Yes it's a standard pc with an onboard parallel port. 
I have it configed as out with 0x0378 out.

The bios choices I have are Normal, Bi-Dir, EPP, ECP...

Normal is where it was set.
Bi-Dir no change
EPP 1.7 pin 1 works... 8, 9, 14, 16 don't the rest are ok
EPP 1.9 pin 1 works... 8, 9, 14, 16 don't the rest are ok
ECP pin 1 works... 8, 9, 14, 16 don't the rest are ok

I tried to invert pins 8, 9, 14, 16 but no change. I've ordered some
parallel port cards and will disable the onboard one I think.

Thanks
John

 These suggestions may be irrelevant, John.  I've not had a full dose
 of coffee.  
 
 Is the bios for this parport set to spp or out?
 Have you tried inverting these pins using HAL's parport parameters?
 
 I seem to remember that a couple of the pins you list were considered
 inverted in hardware but that diagram seems to have gone away.  From
 the current HAL User Manual it sounds like HAL takes account of pins
 that were inverted in hardware.
 
 Also long ago we had to use external pull-up or pull-down resistors to
 create a well behaved parport.
 
 Rayh 
 
 Did you try the .hal equivalent of explicitly configuring the parport
 like: loadrt hal_parport cfg=0x0378 out? And as Rayh said, you might
 need resistors. Is it a standard desktop PC with on-board parport?
 
 Keep us posted,
 Emory
 

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Parallel Port Problems

2007-12-20 Thread Ray Henry

These suggestions may be irrelevant, John.  I've not had a full dose of
coffee.  

Is the bios for this parport set to spp or out?
Have you tried inverting these pins using HAL's parport parameters?

I seem to remember that a couple of the pins you list were considered
inverted in hardware but that diagram seems to have gone away.  From the
current HAL User Manual it sounds like HAL takes account of pins that
were inverted in hardware.

Also long ago we had to use external pull-up or pull-down resistors to
create a well behaved parport.

Rayh 



On Thu, 2007-12-20 at 06:41 -0600, John Thornton wrote:
 I have a CNC4PC parallel port breakout board connected to my parallel port 
 via a 
 parallel port cable. When testing all the outputs in EMC2 via the HAL command 
 setp parport.0.pin-nn-out (all unlinked first) pins 1, 8, 9, 14 and 16 do not 
 come on.
 
 Does this look like some kind of pattern or something? Any ideas?
 
 All the other pins in and out work as expected.
 
 Thanks
 John


-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Parallel Port Problems

2007-12-20 Thread Emory Smith
Amen on the coffee. Still on first cup.

Did you try the .hal equivalent of explicitly configuring the parport like:
loadrt hal_parport cfg=0x0378 out?
And as Rayh said, you might need resistors.
Is it a standard desktop PC with on-board parport?

Keep us posted,
Emory

On Dec 20, 2007 7:54 AM, Ray Henry [EMAIL PROTECTED] wrote:

 These suggestions may be irrelevant, John.  I've not had a full dose of
 coffee.

 Is the bios for this parport set to spp or out?
 Have you tried inverting these pins using HAL's parport parameters?

 I seem to remember that a couple of the pins you list were considered
 inverted in hardware but that diagram seems to have gone away.  From the
 current HAL User Manual it sounds like HAL takes account of pins that
 were inverted in hardware.

 Also long ago we had to use external pull-up or pull-down resistors to
 create a well behaved parport.

 Rayh




 On Thu, 2007-12-20 at 06:41 -0600, John Thornton wrote:
  I have a CNC4PC parallel port breakout board connected to my parallel port 
  via a
  parallel port cable. When testing all the outputs in EMC2 via the HAL 
  command
  setp parport.0.pin-nn-out (all unlinked first) pins 1, 8, 9, 14 and 16 do 
  not come on.
 
  Does this look like some kind of pattern or something? Any ideas?
 
  All the other pins in and out work as expected.
 
  Thanks
  John


 -
 SF.Net email is sponsored by:
 Check out the new SourceForge.net Marketplace.
 It's the best place to buy or sell services
 for just about anything Open Source.
 http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users




-- 
Emory Smith
[EMAIL PROTECTED]
http://defoliants.googlepages.com

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Parallel port problems

2007-10-09 Thread Paul Pierce


 I could not source enough current from my Parallel port for my
 controll card to drive my stepper motor, so today, i added a new PCI
 parallel port card.

Some information on the wiki:

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?NetMos

Thanks Chris.

My problem is that even when i try to address my old parallel port 0x0378 - i 
get an error when i try to start EMC. I have tried addresses 0x0278 and 0x03BC 
and still i get an error. I don't know why i cannot access my old parallel 
port. This is the same even when i remove the PCI Parallel port card and just 
address the on-boar parallel port.

The debug line says:
insmod: error inserting 'usr/realtime-2.6.15-magma/modules/emc/ hal_parport.ko'
:-1 device or resource busy.




  ___ 
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good  
http://uk.promotions.yahoo.com/forgood/environment.html-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Parallel port problems

2007-10-09 Thread Alex Joni
Hi Paul,

can you give us the output of 'lsmod' from before starting emc2?

Maybe you can join #emc on irc.freenode.net (would be faster than exchanging 
emails every couple of days)

Regards,
Alex


- Original Message - 
From: Paul Pierce
To: emc-users@lists.sourceforge.net
Sent: Tuesday, October 09, 2007 12:10 PM
Subject: Re: [Emc-users] Parallel port problems




 I could not source enough current from my Parallel port for my
 controll card to drive my stepper motor, so today, i added a new PCI
 parallel port card.

Some information on the wiki:

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?NetMos

Thanks Chris.

My problem is that even when i try to address my old parallel port 0x0378 - 
i get an error when i try to start EMC. I have tried addresses 0x0278 and 
0x03BC and still i get an error. I don't know why i cannot access my old 
parallel port. This is the same even when i remove the PCI Parallel port 
card and just address the on-boar parallel port.

The debug line says:
insmod: error inserting 'usr/realtime-2.6.15-magma/modules/emc/ 
hal_parport.ko'
:-1 device or resource busy.




For ideas on reducing your carbon footprint visit Yahoo! For Good this 
month.



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users




No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.488 / Virus Database: 269.14.5/1058 - Release Date: 10/8/2007 
4:54 PM 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users