Date: Sun, 27 Oct 2002 16:31:46 -0800 (PST) From: David Nicholas Kayal <davek@saturn5.com> To: freebsd-hackers@freebsd.org Subject: Programming the Parallel Port using ppi. Message-ID: <Pine.BSF.4.44.0210271631090.1093-100000@blackbox.yayproductions.com>
next in thread | raw e-mail | index | archive | help
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_t val; fd = open("/dev/ppi0", O_RDWR); val = 0xff; while(1) { ioctl(fd, PPISDATA, &val); ioctl(fd, PPIGCTRL, &val); val |= STROBE; ioctl(fd, PPISCTRL, &val); val &= ~STROBE; ioctl(fd, PPISCTRL, &val); } } I have tried to test the output of pins 2 through 9, with a voltmeter, using pin 25 as the ground pin. Nothing registered. I tried again to use the LED, but that did not register anything as well. I am thinking of putting a 1k ohm resister on the positive side of the LED. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.44.0210271631090.1093-100000>