I ran across this the other day. I haven't been able to download it though. http://reality.sgi.com/jamesb/gpasm/ Erik Byron A Jeff wrote: > > > > > On Tue, Jan 19, 1999 at 03:59:11PM -0600, Scott Newell wrote: > > > Every once in a while, people discuss building PIC programmers or other > > > hardware for use under Linux. Now that I've got a Linux machine built up, > > > I'm interested in using the PC's serial and parallel ports to interface to > > > various devices, including some PIC projects. > > > > > > Does anyone have any good links or pointers to this kind of low-level > > > device access? (I'm comfortable with C++, and I really don't want to deal > > > with the backwards AT&T-style x86 assembler syntax.) > > > > Two good books that cover this topic are: > > > > Linux Device Drivers by Alessandro Rubini (O'Reilly) > > > > and > > > > Linux Kernel Internals 2/E, Edited by Michael Beck (Addison-Wesley) > > > > In addition, the book > > > > Programming the Parallel Port; Interfacing the PC for Data > > Acquisition and Process Control by Dhananjay V. Gadre (R&D Books) > > http://www.amazon.com/exec/obidos/ASIN/0879305134/qid=916833059/sr=1-2/002-1 508759-9354633 > > > > while mostly DOS-oriented, does have one chapter on > > writing a Linux device driver for a parallel-port DAQ > > application (beware, though, I found that this book > > uses really funky jargon and diagrammatic conventions, > > and is rife with typos. Still, if you can get past that, > > there's a lot to learn from it). > > > > Most of what goes on at that level is typically > > done in ANSI C, rather than C++. > > Bob, > > I'm thinking that the device driver level is a bit too far under the surface > for what Scott wants to do. Both parallel and serial interfaces are accessible > from the user level, the parallel port via the port interface, the serial > ports via the already excellent serial driver. > > The Linux IO-Port programming Mini-Howto has more than enough information to > get started. It can be found at: > > http://metalab.unc.edu/LDP/HOWTO/mini/IO-Port-Programming.html > > As another poster pointed out the low level interface code for the Linux > based picprg by Brian Lane of Nexus computing: > > http://www.tatoosh.com/nexus/picpgmr.shtml > > is quite instructive. > > For the most part a Linux driver is required under one of three conditions: > > 1) Interrupts are involved. > 2) Timing is critical. > 3) Access must be managed to multiple simultaneous users/applications > > For simple stuff to the parallel port just use the user level I/O interface > and make the application setuid root (because I/O require root access). > > BTW it may bear repeating (I haven't seen a Linux based environment discussion > lately) that a Linux based PIC environment is doable. Last semester I had one > of my students build a parallel port based 16[CF]84 programmer that uses > Nexus Computers picprog to program, Timo Rossi's picasm located: > > http://www.iki.fi/trossi/pic/ > > for an assembler, and I experimented with Scott Dattalo's gpsim simulator at: > > http://interstice.com/~sdattalo/gnupic/gpsim.html > > Which works really well but I think need in addition to the complicated node > and waveform based pin simlation a really simple interface where you can just > set a pin high or low for input. > > I banged out two quick light control projects over the holidays with this > setup and was extremely happy to finally retire my PICSTART/DOSEMU based > system that I was using earlier. > > Next on my project list is adding a second 16C84 based programmer with a > serial interface which will program the rest of the PIC family. > > I'm looking forward to hearing more about PIC and Linux integration here on > the list. > > BAJ