Anyone ever do any handshaking and comm stuff with an EPP mode parallel port? I am working up a card to talk to EMC2 in comm mode rather then bit-banging the port and looking for any other efforts in this area.
Anyone ever do any handshaking and comm stuff with an EPP mode parallel port? I am working up a card to talk to EMC2 in comm mode rather then bit-banging the port and looking for any other efforts in this area.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
I did, the easy way is to use inpout32.dll lib with VB/C# or whatever else floats your boat
http://www.codeproject.com/KB/cs/csppleds.aspx
http://www.lvr.com/parport.htm (they also have a new wrapper for Win7 64 bits)
http://logix4u.net/Legacy_Ports/Para...000/NT/XP.html
http://logix4u.net/Legacy_Ports/Para...XP_64_bit.html
should be enough
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
cncmachineguy,
Are you looking for ideas/pointers for the PC-side of things, PIC-side of things or both?
Have you looked at Jon Elsons PPMC system? It uses the port in EPP-mode (I think), I don't know if he supplies the source code for the "EMC-driver" but it might be worth looking into.
Steve, EMC2 runs on Linux with a real-time kernal applied (not easy to know if you're not into the "CNC-thing") so anything Windows specific probably won't work in this case.
Also, in EPP mode the handshaking and transfers are done by the hardware itself, I'm not sure but I don't think INPOUT32 allows that type of control, I think it's more a brute force type of direct interface to the port register - but I might be wrong on that point.
/Henrik.
Hi steve, thanks for the info, but Henrik is correct.
Henrik, I haven't looked at that (maybe) but will do so. I never thought about getting tips for the Emc driver from here. Of course any help is always good. But I was actually fishing for info about the pic side. Doesn't look to be too hard, there are just a few handshakes and rules but I figured I will check with the vast knowledge here before jumping in to write it.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Ok, I went and looked at Jon's stuff. I have in fact looked at it before. It seems he has lots of EMC side stuff available there.
For the PIC side I wanted to use the PSP hardware, but I don't think I can. PSP has 3 handshake lines, /CS /RD /WR. As I understand it, EPP port has 4, /WR /DataStrobe /AddressStrobe and Wait.
/WR /DS /AS are inputs to the pic and Wait is output from the PIC. And of course the 8 data lines. /DS and /AS start a transmission as long as wait is low. So it seems to me it would make sense to have /DS & /AS as IOC then do the comm in an ISR. Now I am pretty sure at this point the uP won't be doing anything else while waiting for the PC to start a transfer, at which time data coming in can be sent directly to which ever port it needs to go to and data going out will just be ports reads and send.
I guess this is going to start out as a large I/O card with no smarts to speak of. So maybe just pool the /DS and /AS.
Hmmm... thoughts anyone?
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
I have the comm part pretty well worked out between both PC and PIC. But now I have 2 more questions. First is really a yes or no kind of thing, Anyone know of a bootloader to be used with a parallel port? Even better if linux based.
Now to the harder, but much more conceptual question. I want to make my I/O card somewhat user configurable. At first I am just thinking about the user declaring pins as inputs or outputs. that leads me to the hardware side of how to have it be either. ie, I don't think I want a pull up on an output. Now on the software side I think that is not too hard, basically the user will be setting the TRIS using a GUI. then the correct variables get assigned and volia!
But now lets say they want to have a PWM output on 1 or 2 or eveb 4 of the pins. Any ideas how to code for that? I am not looking for actual code here, I am just stuck as to how to approach this.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Bookmarks