Programming the Parallel Port using ppi.

2002-10-27 Thread David Nicholas Kayal
I've updated the program to read as thus: #include stdio.h #include dev/ppbus/ppi.h #include dev/ppbus/ppbconf.h #include fcntl.h int main() { int fd; u_int8_tval; fd = open(/dev/ppi0, O_RDWR); val = 0xff; while(1) { ioctl(fd, PPISDATA, val);

Re: Programming the Parallel Port using ppi.

2002-10-27 Thread David Nicholas Kayal
Shouldn't 0xff result in 5v outputs? On Sun, 27 Oct 2002, Greg Shenaut wrote: In message [EMAIL PROTECTED], David Nicholas Kayal cleopede: val = 0xff; For this kind of testing, it is sometimes useful to use a value like 0xaa or 0x55, and probe the adjacent lines--don't forget that if

Re: Programming the Parallel Port using ppi.

2002-10-27 Thread David Nicholas Kayal
I don't have a printer, so I am not sure. On Sun, 27 Oct 2002, Greg Shenaut wrote: In message [EMAIL PROTECTED], David Nicholas Kayal cleopede: Shouldn't 0xff result in 5v outputs? Sure, but in general you may get more information by using an alternating bit pattern (aa/55), that's all.

Re: Programming the Parallel Port using ppi.

2002-10-27 Thread M. Warner Losh
In message: [EMAIL PROTECTED] David Nicholas Kayal [EMAIL PROTECTED] writes: : Shouldn't 0xff result in 5v outputs? Depends on of the pins are negative logic, now doesn't it :-) And most Parallel ports I've measured clock in at about 3.3V. Warner To Unsubscribe: send mail to [EMAIL

Re: Programming the Parallel Port using ppi.

2002-10-27 Thread Matthew Dillon
:Depends on of the pins are negative logic, now doesn't it :-) : :And most Parallel ports I've measured clock in at about 3.3V. : :Warner That sounds about right. I found a web page with the circuit for a TTL output. http://www.play-hookey.com/digital/electronics/ttl_gates.html If

Re: Programming the Parallel Port using ppi.

2002-10-27 Thread Brian Dean
On Sun, Oct 27, 2002 at 04:31:46PM -0800, David Nicholas Kayal wrote: #include stdio.h #include dev/ppbus/ppi.h #include dev/ppbus/ppbconf.h #include fcntl.h int main() { int fd; u_int8_tval; fd = open(/dev/ppi0, O_RDWR); val = 0xff; while(1) {