From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 12:02:35 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6F5A16A415 for ; Sat, 16 Dec 2006 12:02:35 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9D2E43C9F for ; Sat, 16 Dec 2006 12:02:34 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id kBGC2TmX022493; Sat, 16 Dec 2006 13:02:29 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id kBGC2FVh097040 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 16 Dec 2006 13:02:19 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id kBGC2FeO091644; Sat, 16 Dec 2006 13:02:15 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id kBGC2EOo091643; Sat, 16 Dec 2006 13:02:14 +0100 (CET) (envelope-from ticso) Date: Sat, 16 Dec 2006 13:02:13 +0100 From: Bernd Walter To: "Daniel O'Connor" Message-ID: <20061216120213.GI75351@cicely12.cicely.de> References: <200612161112.52611.doconnor@gsoft.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200612161112.52611.doconnor@gsoft.com.au> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: Mr CW , freebsd-hackers@freebsd.org Subject: Re: Capturing Parallel Port Data X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 12:02:35 -0000 On Sat, Dec 16, 2006 at 11:12:44AM +1030, Daniel O'Connor wrote: > On Saturday 16 December 2006 10:24, Mr CW wrote: > > Thank you for the pointers. It sounds like reading data back from the > > parallel port is not a common thing to do, although I thought parallel port > > projects might have done this. Then I realized that most PIC programmers, > > parallel port displays, etc. usually only receive data, not send it back to > > the computer... > > It is pretty easy to read data in a GPIO kind of fashion - you can set the > data direction (PCD) to input and then use PPIGDATA. However for what you > want the each byte of the data stream is marked by a STROBE pulse and AFAIK > there isn't a preexisting way to handle this. Well - the hardware is made to write and in some fashion to read data from a printer, not to simulate one. Using it for a self defined protocol is something else. > > I'm still looking into this, so any other suggestions are very welcome. > > If it was me I'd use a microcontroller (eg AVR) to turn the parallel data into > a serial stream and read it in to a PC's serial port. However we already make > PCBs and write microcontroller code at work.. > > Actually maybe something like this would do what you want > http://www.bb-elec.com/product.asp?SKU=232SPS2 > > I think then you could just plug it into the FreeBSD box and log the stuff > coming from the serial port. I did something like this on a C64 to scan lpt data from a PC and pass it to a serial (IEC-Bus) commodore printer. Well, it's been a very long time since then, but I asume something like the FT245BM (http://www.ftdichip.com) should do. The FT245BM is a generic parallel to USB device Interface. It's handshake features on the parallel side should match the requirements to simulate a printer - maybe with some 74ls. The other side is USB device and supported by our uftdi driver. The driver handles it as an virtual RS232 port. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de