Hello everybody,

I will continue here... I tested the epp parallel port mode and i can read and 
write data. Now i also tried to write the address but nothing happens, The 
strobe signal doesn't change its state.

I also tried to set the wait signal to 0 and monitor the data_strobe (pin14) 
and address_strobe (pin 17) signal with oscilloscope after i executed a simple 
code (please see below). If i monitor the address_strobe signal nothing 
happens, but if i monitor the data_strobe signal, i can see the pause between 
the two read32() command.

The parallel port pins i fine (not burned), i can control them using ptest.hal.

Any idea what could be wrong? Does anybody have a simple code (executable) that 
send the data using address_write/address_read so that i can test my hardware?

Regards
Klemen


// simple code
 EPP_ADDR(0);
 EPP_ADDR(1);
 EPP_ADDR(2);
 EPP_ADDR(3);
 datain = read32(); // or write32(dataout)
 EPP_ADDR(0);
 EPP_ADDR(1);
 EPP_ADDR(2);
 EPP_ADDR(3);
datain = read32(); // or write32(dataout)

--------------
static inline void EPP_ADDR(int w) {
    outb(w, ioaddr+3);
}

static inline __u32 read32(void) {
    return inl(ioaddr+4);
}

 




________________________________
 From: Klemen Dovrtel <[email protected]>
To: Jon Elson <[email protected]>; Enhanced Machine Controller (EMC) 
<[email protected]> 
Sent: Thursday, January 31, 2013 8:24 AM
Subject: Re: [Emc-users] EPP data transfers
 
I tried the pcisetup and this solved the problem for the motherboard parallel 
port, now it seems it works fine (i can see the strobe signal changing). The 
frequency of transfer id 1B/12us (quite slow). But I could not set the pci 
parralel port card to epp mode (I have the NetMos NM9805CV pci card). I will 
try some other pci parallel port card. Thank you for your help :)

BTW: how did you compile the pcisetup.c. I tried to compile the code, but i get 
the "undefined reference to `outb'" error. I did try to add the -O, -O2 gcc 
directive as described in man outb, but it did not help. Can you please show 
your makefile compiler instructions for this.

Best Regards
Klemen



________________________________
From: Jon Elson <[email protected]>
To: Klemen Dovrtel <[email protected]>; Enhanced Machine Controller 
(EMC) <[email protected]> 
Sent: Wednesday, January 30, 2013 4:15 AM
Subject: Re: [Emc-users] EPP data transfers

Klemen Dovrtel wrote:
>
> --------------------- HAL file ----------------
>
> loadrt threads name1=base-thread period1=2000000 name2=servo-thread 
> period2=20000000 # ns
>  
It will probably be MUCH easier to test this in user mode.  You need
root privileges and can open access to the parallel port with the
iopl(3) kernel service.  You may also need to use something like my
pcisetup program to put the port into EPP mode.  Even though it is set
to this mode in the BIOS, it may not actually be in EPP mode on a lot
of motherboards.  This program is at
http://pico-systems.com/codes/pcisetup
You can also find the source code in the same directory.
Most of the LinuxCNC drivers for EPP devices do this (writing 0x80 to the
I/O register 0x402 higher than the parallel port base register) to
enable EPP mode.

Jon
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to