Problem mit inpout32.dll/LPT anteuern
-
Hi,
ich verwende die inpout32.dll um den LPT1(0x378) anzusteuern.
nun haben ich aber das problem ,dass egal was ich bei out32 angebe
inp32 für das data register immer 120 (0b011100000) zurückgibt.
kann mir jemand sagen woran das liegt?
ich habe windows xp und VC++ 2003.liegt das an meinem Pc/an der Dll oder kann di ursache nur am prog liegen...
wenn ihr wollt kann ich dn source mal posten....Mfg Shade37337
-
kann mir denn hier niemand helfen?????????
bitte helft mir...........Mfg Shade37337
-
shade37337 schrieb:
kann mir denn hier niemand helfen?????????
Könnte vielleicht damit zusammenhängen, dass du im falschen Forum bist...

PS: EIN Fragezeichen reicht!
-
nunja..ich hab in rund um die programierung gepostet..
da antwortet aber auch niemanmd...
wenn nciht das..welcehs forum is dann das richtige.?
Mfg Shade37337
-
-predator- schrieb:
shade37337 schrieb:
kann mir denn hier niemand helfen?????????
Könnte vielleicht damit zusammenhängen, dass du im falschen Forum bist...

oder es hängt damit zusammen, dass das datenrichtungsregister falsch gesetzt ist?
-
wie soll ich das jetz vertehen?
-
Dieser Thread wurde von Moderator/in HumeSikkins aus dem Forum C++ in das Forum WinAPI verschoben.
Im Zweifelsfall bitte auch folgende Hinweise beachten:
C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?Dieses Posting wurde automatisch erzeugt.
-
shade37337 schrieb:
wie soll ich das jetz vertehen?
ich weiss nicht wie's beim druckerport ist, aber für gewöhnlich haben digitale i/o chips datenrichtungsregister mit denen man festlegen kann, ob die ports als eingang oder ausgang arbeiten sollen. beim druckerport stehen die wohl erstmal alle auf ausgang d.h. um was einzulesen musste die als eingang schalten (eben mit diesem datenrichtungsregister)
guckst du: http://www.beyondlogic.org/spp/parallel.htm
-
danke.
kanst du mir auch sagen wie ich den byte-transfer mode aktiviere?
damit ich das data register auch von aussen verändern kann.......Mfg Shade37337
-
shade37337 schrieb:
...damit ich das data register auch von aussen verändern kann.......
steht auf der webseite da, von der ich den link gepostet habe:
Bi-directional ports use Control Bit 5 connected to the 374's Output Enable so that it's output drivers can be turned off. This way you can read data present on the Parallel Port's Data Pins, without having bus conflicts and excessive current drains.
Bit 5 of the Control Port enables or disables the bi-directional function of the Parallel Port. This is only available on true bi-directional ports. When this bit is set to one, pins 2 to 9 go into high impedance state. Once in this state you can enter data on these lines and retrieve it from the Data Port (base address). Any data which is written to the data port will be stored but will not be available at the data pins. To turn off bi-directional mode, set bit 5 of the Control Port to '0'.
However not all ports behave in the same way. Other ports may require setting bit 6 of the Control Port to enable Bi-directional mode and setting of Bit 5 to dis-enable Bi-directional mode, Different manufacturers implement their bi-directional ports in different ways. If you wish to use your Bi-directional port to input data, test it with a logic probe or multimeter first to make sure it is in bi-directional mode.