Hello to all,
I'm using libieee1284 0.1.6 for accessing the parallel port.
My configuration is:
FJS D1192 ATX Board
SuSE Linux 8.0 with 2.4.18-64GB-MPS Kernel.
#include <stdlib.h>
#include <stdlib.h>
#include <ieee1284.h>
#include <time.h>
int main()
{
struct parport_list device_list;
struct parport *device;
int i, result;
time_t t;
time_t t_kill;
printf("Searching ports...\n");
ieee1284_find_ports( &device_list, 0 );
printf("Selecting port...\n");
if (device_list.portc>0) device = *(device_list.portv);
else
{
printf("Failure...\n");
return -1;
};
printf((*device).name);
printf("\n");
printf("Opening device..\n");
result = ieee1284_open(
device,
CAP1284_RAW,
NULL
);
if (result!=E1284_OK)
{
printf("Failure...\n");
return -1;
};
time(&t);
t_kill=t+60;
printf("Sending Data...\n");
while(t<t_kill)
{
time(&t);
ieee1284_write_data( device, 120);
};
printf("Data sent...\n");
ieee1284_close(device);
return 0;
};
It runs pretty good, while you don't care what the parport does. While
you are running in superuser mode, the program doesn't produce any
error messages.
So I tried to measure the voltages at the parport, but I didn't get nice
values:
Pin 1: /Strobe = 3.5 V ( should be ? )
Pin 2: Data 0 = 0 V ( should be 5 V )
Pin 3: Data 1 = 0 V ( should be 5 V )
Pin 4: Data 2 = 3.5 V ( should be 5 V )
Pin 5: Data 3 = 0 V ( should be 5 V )
Pin 6: Data 4 = 0 V ( should be 5 V )
Pin 7: Data 5 = 0 V ( should be 5 V )
Pin 8: Data 6 = 0 V ( should be 5 V )
Pin 9: Data 7 = 0 V ( should be 5 V )
Pin A: Acknowledge = 3.5 V ( should be ? )
Pin B: Busy = 3.5 V ( should be ?)
Pin C: Paper End = 3.5 V ( should be ? )
Pin D:Select = 3.5 V ( should be ?)
and so on ( rest is ground ).
Seems to be that there is an error.
Who can help me?
Thanks Philipp Vollmer
PS: If the libieee1284 version is too old please tell me. I'm sorry but
don't have such big pipe as I could download anything more than
one or two times ( 28k ).
-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2b29 : Thu Aug 22 2002 - 06:24:30 EDT