I have tried various ways, ie using inb() and also /dev/parport0 ioctl calls, but it is way too slow. I can sample an approx 2MHz squarewave on 15.3. I also tried a RT kernel, but it made no difference. Oddly enough does an old 32-bit PC with 11.2 fare much better, or almost 7MHz. Any ideas why.?
Background: I have a need to sample about 64-128k worth of parallell data for later analysis.
Tried this:
mode = IEEE1284_MODE_ECP; port = open( "/dev/parport0", O_RDWR );
ioctl( port, PPCLAIM, NULL );
ioctl( port, PPNEGOT, &mode ); // You need to pass pointers to integers!
ioctl( port, PPDATADIR, &dir);
while (i < MAX_SIZE && more == 1)
{
ioctl( port, PPRDATA , &c ); // read "data" Register
if(temp_data != c)
{
data* = c;
temp_data = c;
++i;
}
}
and this:
iopl (3); // unlimited I/O access permission, nessesary above the 0x3ff limit e. g. at 0x9800=38912
setpriority(PRIO_PROCESS, 0, 100);
// Put in handler to let us catch Ctrl-C
//
signal(SIGINT, INThandler);
while (i < MAX_SIZE && more == 1)
{
c = inb (port);
if(temp_data != c)
{
data* = c;
temp_data = c;
++i;
}
}
**