Re: Using the serial port for GPIO.
On 5/13/06, Dave Johnson <[EMAIL PROTECTED]> wrote: Note that I've found that most modern PCs provide very poor voltages on the parallel port ... Heck, many modern PCs don't eve provide a parallel port. :) Anyone here know if those USB<->parallel converters can be (ab)used like the classic PC parallel port? I don't have any need for it, and don't expect to, but I'm curious. :) -- Ben ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Using the serial port for GPIO.
Scott Garman writes: > Tom Buskey wrote: > > People usually use the parallel port for this kind of stuff. 8 outputs > > and at least 5 inputs. More inputs are possible w/ the newer > > bidirectional ports. > > > > parpin on sourceforge lets you work on individual pins. There's tons of > > info on using the parallel port for digital I/O out there. > > Thanks Tom, this is extremely useful and exactly what I'm looking for > for some of the I/O I'll be doing! > /dev/parport0 is your friend. No kernel work needed. I use that for controlling my LCD screen at work. See http://centerclick.org/lcd/ Note that I've found that most modern PCs provide very poor voltages on the parallel port (but still within the TTL ranges). I've even seen different voltages on the Data and Status Pins on the same port!. Don't expect to draw very much current from it either. After much frustration I ended up adding some octal line drivers with a very wide input range between the pport and device to boost everything to acceptable levels. -- Dave ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Using the serial port for GPIO.
Tom Buskey wrote: People usually use the parallel port for this kind of stuff. 8 outputs and at least 5 inputs. More inputs are possible w/ the newer bidirectional ports. parpin on sourceforge lets you work on individual pins. There's tons of info on using the parallel port for digital I/O out there. Thanks Tom, this is extremely useful and exactly what I'm looking for for some of the I/O I'll be doing! Scott -- Scott Garman sgarman at iname dot com ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Using the serial port for GPIO.
In addition to the other fine answers already given... On 5/12/06, Scott Garman <[EMAIL PROTECTED]> wrote: Has anyone here ever used the Linux serial port drivers as general purpose I/O? Yes. But not me. :) Many UPSes use DSR, CD, CTS, etc., as signals for power failure, low battery, etc. They don't actually use RS-232 at all. (Others do actually send serial data.) The software that monitors UPSes thus has to do what you're describing. If I have no other options, my plan is to write a /proc kernel driver so user space programs can get access to this information ... I'm pretty sure you don't need to write a new driver. All the signals "from the modem" can be read, and most of the signals "to the modem" can be set, using the existing serial driver. Any modem program (e.g., minicom) does this. -- Ben ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Using the serial port for GPIO.
Not quite what you're asking for, but in a past life I wrote a fairly straightforward user space program that accomplished something like you described. IIRC it setup some named pipes and then allowed read/writes via those pipes to query/set the levels of the modem control lines (i.e. RTS/CTS and friends) via the standard ioctls... ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Using the serial port for GPIO.
On 5/12/06, Scott Garman <[EMAIL PROTECTED]> wrote: Has anyone here ever used the Linux serial port drivers as generalpurpose I/O? By that I mean not using the port for RS-232 protocolcommunications, but querying and setting the levels of individual pinson the port. This is for an embedded systems project I'm working on. People usually use the parallel port for this kind of stuff. 8 outputs and at least 5 inputs. More inputs are possible w/ the newer bidirectional ports.parpin on sourceforge lets you work on individual pins. There's tons of info on using the parallel port for digital I/O out there. -- A strong conviction that something must be done is the parent of many bad measures. - Daniel Webster
Re: Using the serial port for GPIO.
Scott Garman writes: > Has anyone here ever used the Linux serial port drivers as general > purpose I/O? _Linux Device Drivers_, 2nd Edition, by Alessandro Rubini & Jonathan Corbet covers this subject pretty well. I recommend it highly. Regards, --kevin -- GnuPG ID: B280F24E And the madness of the crowd alumni.unh.edu!kdc Is an epileptic fit -- Tom Waits ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Using the serial port for GPIO.
Has anyone here ever used the Linux serial port drivers as general purpose I/O? By that I mean not using the port for RS-232 protocol communications, but querying and setting the levels of individual pins on the port. This is for an embedded systems project I'm working on. If I have no other options, my plan is to write a /proc kernel driver so user space programs can get access to this information, but I have a strong feeling that this kind of thing has been done many times before, and may even be possible with existing utilities that I just don't know about. setserial, for example, allows you to configure the port and IRQ that a serial device is set to. I want something just a bit higher-level than that, to be able to read/set the RTS pin, for example. The serial devices I'm working with are plain vanilla 16550 UARTs on common PC hardware. Thanks, Scott PS - Information on doing the same thing via the parallel port would also be very relevant to me. -- Scott Garman sgarman at iname dot com ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss