Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
i would like to add a driver to /dev which can light the LEDS using the parallel port.Please tell me from where i should start.i am trying to learn device driver programming, which is quite difficult for me now.please guide me on how to start the task.pls..
The 'usual' driver for controlling a parallel port is parport. You can write to /dev/parportX (where X is a low digit) from userspace to drive the data lines. The control lines will probably be under exclusive control of the driver itself. With root privileges, you can also write directly to the IO registers that make up a standard parallel port, thus gaining control of the control lines, and gaining the ability to read the status bits.
If you still feel a need to access the hardware from kernel space, you should consult the documentation and source code for the parport kernel driver. You will need the kernel sources, and the relevant code will be in the directory drivers/parport/... below the kernel source root.
It also may be that you can set your parallel port to be a serial port and use those tools also.
Huh? Please explain that. The hardware is completely different, the connectors are normally completely different, the signaling and electrical natures are completely different. The OP wants to use and control the individual bits on the parallel port to drive LEDs. A serial port would be virtually useless for such an application.
Same chip runs both. I have used parallel ports in place of serial before. I know it can be done. There might be an instance where you have the last version of chip for parallel. I suspect it can be altered too but I have never tried it. Very few computers had that chip.
Just because the function of each kind of port are on the same piece of silicon means nothing. There is next to zero chance that connecting a serial port to a device requiring a parallel interface or vice versa will work. There may be some odd cases where the logical and electrical signaling on a connector could be controlled through software, but I've never heard of such a thing. It would be very unlikely that you would ever find a cable that would work in such a circumstance. Please describe a case where you 'have used parallel ports in place of serial before'. It would be a very unusual application that could be served equally by either.
Not the way you've described it, however vaguely that is. I'd be most interested to hear about it though. I'd be especially eager to see how the OS has any bearing on the how a serial interface can serve as a parallel interface, or vice versa. Especially if it can apply to tincy's problem.
I think you mis understand what I had suggested. You don't use a parallel port as a parallel port. You set it as a serial port and use it as any serial port would be used. The OP wanted to use parallel but I feel it would be much easier to do this with serial.