EmbeddedRelated.com
Forums

How PC parallel port Is connected internally?

Started by Ali June 19, 2005
Humm.. Great text! Well Jon thanks for your contribution , i would
appreciate if you can see us discussing the same issue from different
prospective.
[http://groups-beta.google.com/group/microsoft.public.development.device.drivers/browse_frm/thread/50869515be02a63f/9fe6f1d60ae47fa4#9fe6f1d60ae47fa4]
See Tim's latest post for more understanding.
>In the newer O/S branch, the NT based
systems, the parallel port is exclusively virtualized by NT -- I think. And the rules are different here. Yeah you are right things are pretty different here in WDM windows driver model. I appreciate your time
chris wrote:
> Ali wrote: > >> Yeah this post belongs to windows drivers. Actually this was the >> question raised by windows driver group people, they all want to know >> which type of device i have , PCI or ISA? >> If you want to see the device then please vist >> [http://powercell.cjb.net] under hardware design link. >> >> Thanks. >> > What you *connect* to the parallel port does not matter much - it's a > "parallel port" bus if you like to call it that. > > What happens *internally to your PC* is what the people in the windows > driver groups are asking. > > In the first years of PC design the parallel port interface was handled > by an 8255 PIO chip connected to the ISA bus of the computer. >
It was not a 8255, but a bunch of TTL registers and gates. I still have the original IBM/PC Technical Manual showing it. -- Tauno Voipio tauno voipio (at) iki fi
On 28 Jun 2005 01:55:13 -0700, "Ali" <abdulrazaq@gmail.com> wrote:

>Humm.. Great text! Well Jon thanks for your contribution , i would >appreciate if you can see us discussing the same issue from different >prospective. >[http://groups-beta.google.com/group/microsoft.public.development.device.drivers/browse_frm/thread/50869515be02a63f/9fe6f1d60ae47fa4#9fe6f1d60ae47fa4] >See Tim's latest post for more understanding.
Thanks. I've looked. I believe I have a full IEEE 1284 specification laying around, somewhere. I didn't remember about it until I saw some diagrams on the web on the subject, then it all came flooding back to me. You will definitely want that spec handy. The Microsoft doc is helpful _after_ you know what is in it, since that doc doesn't exactly tell you how these things are precisely transferred to the PnP under Windows. However... my vague memory also recollects that you have a number of device layers under NT. 64? Something like that. Only one of them is the one that directly manages the hardware I/O, if memory serves. Since Windows is _already_ going to have something hooked in at that level in order to facilitate the very communications initially required to participate in the PnP recognition of your external device, it will be that driver that talks to the actual I/O ports on the machine in question. Your driver (or, at least, one part of your driver) will get loaded in at a higher level. Much as the printer drivers are. I don't think they normally are allowed to completely replace the bottom level I/O driver. If you did replace that lowest level, wouldn't that mean your driver would also have to support the PnP signaling under IEEE 1284 needed to recognize the removal of your device and its replacement by yet another device? And if it didn't need to do so, under the possibility that this is handled at a slightly "higher" level driver, wouldn't that mean there is no real need for you to intercede at this then very low level? Just thinking out loud... Jon
>you have a number of device layers under NT. 64
Yeah you are right , sometimes called device stack, Actually it is layered sructure from higher to lower level drivers including filter drivers also.
>Since Windows is _already_ going to have something hooked in at that level in order to facilitate the very communications initially
required to participate in the PnP recognition of your external device. I know Jon you are pointing towards PnP manager which incorporates with I/O Manager to provide hot plug-in [Play and Play , Device removal and insertion] The hardware i have used in the project is AT89S52 microcontroller device from 8051 family produced by ATMEL. The device board incorporates basic inputs (push-button, analog to digital converter ADC0804), output(LED) , LM35 heat sensor and a IDC connectors so that the user is able to easily connect his or her 8 bit interface for input or output. The device is powered by external power supply. PC Communicate with device through parallel port attached to port 1 of microcontroller for sending data back and forth. How My device [PowerCell Device] communicate with Parallel Port. As mentioned above the data port (H378) of D25 is attached with port 1 of microcontroller for bidirectional communication. Provided interface let user to perform either activity, I/O read or write. When host interface [PC] wants to perform write operation then. 1) It throws data on Data register (Base Address + 0)of parallel port which is connected with port 1 of microcontroller NowWrite Val("&H378"), Val(xxx) ' send data to mC Port 1 2)It sends a high signal to microcontroller P3.3 (INT1) via parallel port Control register (H37A), by raising the interrupt pin high on microcontroller. NowWrite Val("&H37A"), Val(WRITEmC) 3) microcontroller fetch data from its port 1 and then moves it to port 2 which is connected with PowerCell Relay Board via 10 Pin IDC. Controller assembly : MOV A, P1 MOV P2,A 4) clear the INT1 NowWrite Val("&H37A"), Val(CLEARmC) ' clear C0 , C1 When the host sends data to the device, the device must respond by sending a code that indicates whether it accepted the data or was too busy to handle it. On the other hand, when data is sent from the host to device, the device must respond turning the relay board LED's ON. The question is do i have to upgrade my hardware too for writing a PnP driver? I mean it is working fine with NT Driver [Non PnP]. 1) Do i have to upgrade my hardware in sense of interrupt generation because i'm not sure how kernel [NT] will discover that now PowerCell [my device] is connected to DB-25 port instead of ordinary printer? and its time to load my WDM driver and vice versa when removed. I appreciate your time! Cheers. http://powercell.cjb.net/
Doh!!!

>For that, it makes no difference whether its on the ISA of
PCI bus. If it does for the WDM, I cannot help you there. Its true, it does not make any dofference for NT Device Drivers or monolithic type drivers but if you want to write fully PnP and power managed driver then you have to know lots of other details too. Well its some how dicided now that they are connected to ISA internally. rather main bus or PCI. Cheers.