From owner-freebsd-hackers Sun Oct 27 16:38: 2 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D49937B401 for ; Sun, 27 Oct 2002 16:38:01 -0800 (PST) Received: from blackbox.yayproductions.com (h-66-166-17-53.SNVACAID.covad.net [66.166.17.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00D9943E8A for ; Sun, 27 Oct 2002 16:37:59 -0800 (PST) (envelope-from davek@saturn5.com) Received: from localhost (davek@localhost) by blackbox.yayproductions.com (8.11.6/8.11.3) with ESMTP id g9S0VkG01095 for ; Sun, 27 Oct 2002 16:31:46 -0800 (PST) (envelope-from davek@saturn5.com) X-Authentication-Warning: blackbox.yayproductions.com: davek owned process doing -bs Date: Sun, 27 Oct 2002 16:31:46 -0800 (PST) From: David Nicholas Kayal X-X-Sender: davek@blackbox.yayproductions.com To: freebsd-hackers@freebsd.org Subject: Programming the Parallel Port using ppi. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I've updated the program to read as thus: #include #include #include #include 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