How do you control individual pins on a PC's printer port in Java

I know in pascal but cant find out for Java. See below
//// pascal controlling pins in parallel port. Basically 889 is address of the parallel
//// port allowing all pins switch on for '128' or all off '0'
uses CRT;
{ The CRT unit allows the use of "clrscr" and "gotoXY..." and "KeyPressed" }
const
PortAddress = 889; {957 on other machines}
var
InValue : integer;
begin
clrscr; { Clears the screen. }
port[PortAddress-1] := 0; { Turns off any LEDS still on a parallel port circuit }
repeat
InValue := port[PortAddress]; { This is the KEY      line of the program. }
gotoXY(35,12);
write(InValue:4); { The ":4" is used to format the output. }
until KeyPressed;
clrscr;
end.
Someone told me it was not possible because Java is machine independant, thus does not specify direct access of specific ports (because all machines are different)
If anyone knows I would really appreciate some help
Cheers Adrian

Certainly, as far as NT/2000 is concerned, you can't write to any hardware ports form any program running in a user context(except legacy 16 bit applications, whose I/O is virtualised -that will be how your Pascal prgram works, I suspect).
To access the ports, you need a device driver. (written in 'C', I'm afraid.
I have a sample driver for you to modify (it was designed to allow JTAG programming using the prallel port, wher individual pin control is required.
The driver is opened using standard file open protocols, and the I/O is done using DevI/OCtl calls. I think these are accessible from JAVA, but you might need a thin 'C' layer in a DLL.
Hope this helps. I can't think of a simpler way. NT/200 was designed to stop user programs from directly accessing hardware, because of the damage it can do.

Similar Messages

  • How can I control individual pins of VHDCI connector on PXIe-6548?

    I need to use the VHDCI interface on slot 3 i.e. NI PXIe-6548 of NI PXIe-1062Q for testing purposes. I need to raise or lower the individual lines from the available 68 lines. Do I need to use VISA to do so?
    If not VISA, how do NI-HSDIO VIs that are availble with LabView 2009 help to do so? The MAX test pannel specifies channel 0-15 and 16-31. How are these channels related to the 68 lines?
    Solved!
    Go to Solution.

    Thanks Keith!
    I still have some problems. I appreciate every bit of your help.
    How does the in-built ni HSDIO VI take care of the parallel communication protocol. e.g. There are some pins as chip-select, Rd/xWr etc. they need to be raised or lowered according to the operation. Now, I am trying to communicate with the DUT using 9 bit data, 9 bit address.
    I tried to write in the DUT using static generation VI. I formed a word of 20 bits according to the mapping of 9 address, 9 data, a chip-select and a RD/xWR and generated that word on the channels 0-19. 
    But when I tried to read data from DUT, It acquires the same data that was written on 0-19. For a read operation, the active-low chip select is lowered after the rising edge of the clock, RD/xWR is raised, and the respective address lines are raised, then on the next positive edge of the clock the data is sampled. I do not understand how to make all of this happen using Labview. Instead of reading back from the DUT, the VI gives me the same pattern that I generated.
    I know how the parallel communication is supposed to happen, but I don't understand how LabView is supposed to be used for this.
    Please help. 

  • How do you control playlist song sorting?

    how do you control playlist song sorting?
    in itunes - i set the iPOD playlist to sort by name - but it sorts in some random way when disconnected - on it's own..
    BTW: I created this by making the playlist manual in iPOD in itunes then dragging in songs to it from itunes....
    QL how do i get it to sort the iPOD playlist songs by name?

    In iTunes, right-click on one of the songs in your playlist, then select 'Copy to play order'.

  • How do you control the volume to the earphones?

    How do you control the volume to the earphones?

    Apple Support Communities updatesActually I knew that part of it, but I had to go to Settings to correct something.  They are working now that I fixed something that I have no recollection that I altered in the first place, nor do I now know what in heaven’s  name I fixed this time.  All I know is that I must have gone to setting a million and one times and the last time was the one I did something right.
    Thank you for your help however.
    Nan
    From: Apple Support Communities Updates
    Sent: Monday, July 07, 2014 10:43 PM
    To: nandave
    Subject: - How do you control the volume to the earphones?
                                                                                    You received a reply 
                                    petermac87 has replied to your question. You can view the full discussion in Apple Support Communities.                                                                                
    How do you control the volume to the earphones? 
                                    With the volume up and down keys unless you purchase a set with a volume control connected to the chord.
                                    Pete
                                                                                    Correct Answer Helpful Answer 
                                  Use the buttons above to tell petermac87 and the rest of the community if this reply solved your question or helped you get closer to finding a solution. 
                                  To reply to petermac87, go to the discussion in Apple Support Communities. 
                                  You are receiving this email from Apple Support Communities. You can change your email preferences in your Apple Support Communities Profile. 
                                  TM and copyright © 2014 Apple Inc. 1 Infinite Loop, MS 96-DM. Cupertino, CA 95014. 
                                  All Rights Reserved | Privacy Policy | Terms of Use | Apple Support

  • How do you control number of cycles shown on chart

    How do you control number of cycles shown on chart?  I've selected a sweep chart and I'm not seeing the vertical bar on the chart when the program runs.  This is probably because I'm not seeing a full cycle of the periodic signal I'm trying to display.  I need to set the chart to display multiple cycles.  Any help will be greatly appreciated.
    Solved!
    Go to Solution.

    Right click the chart and set the desired number of points in the history buffer (right-click...chart history lenght...). Then set the x-axis not to autoscale and to cover your full history range.
    LabVIEW Champion . Do more with less code and in less time .

  • When curser is on hyper link the url will diplay on the bottom of the screen in the background.(where done is located when site is loaded) How do you control this function?

    When curser is on hyper link the URL will display on the bottom of the screen in the background.(where done is located when site is loaded) How do you control this function?

    Do you want to control that via code on a web page to prevent visitors from seeing the link or do you ask as a Firefox user?<br />
    Tools > Options > Content : JavaScript > Advanced > Allow Scripts to:
    [ ] "Hide the status bar"
    [ ] "Change the status bar text"
    The Status Bar will be gone in Firefox 4.0 and is replaced by the (View > Toolbars) Add-on bar that extensions can use.

  • My question was how do you control bass and treble on your Mac pro? he act of the matter is you can't. Why don't they just say that rather than reading all of the ********

    My question was how do you control bass and treble n a Mac Pro with the latest software.
    The answer is you can't
    In summary why don't you say that upfront?
    Instead of reading a bunch of crap that says nothing

    just a suggestion: try soundflower or Audio Hijack Pro. I know with the 2nd one, you can control the bass, treble, and all that, with anything that makes sound, from itunes, to Safari, DVD player, Skype ( I guess) and other stuff. Worth the $, IMO, so in answer to your question  dbumgardner1, no, no you can't.  I suppose in that sense, Windows has us at a loss. We also need 2nd party stuff to play BluRay's, too. However, I haven't seen any Macintosh viruses (virii?) for a long long time....
    so, there's that....
    JB

  • How do you copy, for example I work with blue prints and I want to copy a section and copy into another new page?

    How do you copy, for example I work with blue prints and I want to copy a section and copy into another new page?

    Forgot to add that it would be an adjustment layer with some kind of mask on it already. The mask is uncentered when copy and pasted which throws it off.
    I guess the same question would go towards doing the same for an object. How to copy and paste it over to a new doc, keeping its position within the document? is this possible?

  • How do you position side by side tables so they print correctly on separate sheets?

    How do you position side by side tables so they print correctly on separate sheets?

    Hi CJ,
    I just saw this solution by Jerry:
    https://discussions.apple.com/thread/5653936?tstart=0
    It is non-intuitive how to get there, but Menu > File > Print... to get to Print Preview. Then Click on Print.. at bottom right. This does not print, but opens a dialogue where you can choose to Open PDF in Preview (click on PDF bottom left).
    Have fun!
    Regards,
    Ian.

  • [RDE] How do you control menuitem enabling/visibility when extending RDE?

    I'm beginning the process of writing additional plug-ins for RDE, and I'm trying to figure/find out how I can control how menuitems are enabled, or even prevent them from showing, dynamically (as I would in Eclipse, for instance).  Right now, it seems like once you register an editor as being capable of editing a given file extension it always shows up in the context menu, but I'd like to be able to control that based on various settings and/or based on the content of that file. Is there an existing mechanism for doing so? If not, could you point me at the code I would need to modify in order to add such a mechanism?

    If it's slow on startup it would be extensions loading or LaunchDaemons starting up. 
    You should have a look in:
    /Library/LaunchDaemons
    /Library/Extensions
    You can count out anything in your home folder and it shouldn't put anything in /System as that's reserved for Apple. 

  • How do you control Adobe Forum email notifications?

    How can I control the email notification process which automatically sends a copy of all replies to each thread in which I am participating?
    Right now I have taken the process for granted, letting it do it own thing, and am automatically getting email notification for all the threads in which
    I am participating. That is OK with me.
    Due to questions on email notification how to that I have received from others...
    How would I go about setting up the process so that I could pick and choose which thread replies should be send to me by
    email notification? Is there a thread subscription preference somewhere?
    And, how do I turn on and off email notification altogether if I wanted to do that?
    Thank you.
    ATR

    Click your avatar picture near the upper right corner (slightly to the left of the pencil) and select PREFERENCES then set all Email Preferences to OFF and click Save at the bottom left
    AND
    Another new "feature" is that Jive7 is oriented toward social networking... so every time you start or reply to a message you are automatically added to a FOLLOW list... meaning you receive a notification of every subsequent message in that thread
    Click the FOLLOW link at the upper right and select STOP FOLLOWING... and don't click the link again to check your status, as you will then be added to the CONNECTIONS STREAM and you will have to uncheck that option as well
    And, after you post in a message thread and select Stop Following, you need to do it all over again the next time you add a reply to the same message thread, since EVERY POST adds you to the automatic Follow list

  • How do you access individual ringtone sound files?

    Hello,
    Does anyone know how to access the individual ringtone sound files on a Nokia E7 running Symbian 3 - Belle?  I'd like to download them off of the phone.
    Thanks,
    Dave

    DjDave5 wrote:
    Does anyone know how to access the individual ringtone sound files on a Nokia E7 running Symbian 3 - Belle?  
    You will find the answer to your query in this screenshot, but as this is a manufacturer's sponsored forum please do noit expect me to elaborate:
    Happy to have helped forum with a Support Ratio = 42.5

  • How do you control the number of rings before voic...

    When people call me, Skype rings far to many times before voice mail comes on.  How do you reduce the number of rings on an inbound call, so that voice mail comes on in 4 to 5 rings?

    Hi, billwalker1125,
    Skype does not determine when to send calls to voice mail by the number of rings, but instead by the amount of time that has elapsed.  Check your settings (in Windows, it would be Tools -> Options -> Calls -> Voice Messages -> Start recording a voice message if ...   Remember to Save your changes!
    Regards,
    Elaine
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • How do you control the kind of TLS alerts sent by JSSE?

    I am working on an application which does certificate path validation that needs to plug into the JSSE framework. So, I have implemented my own X509TrustManager which implement the 'checkClientTrusted' and 'checkServerTrusted' methods such that when the application's certificate path validation fails, it throws a CertificateException as desired by the method signature. Also, CertificateException has four subclasses: CertificateEncodingException, CertificateExpiredException, CertificateNotYetValidException and CertificateParsingException. The subclass of CertificateException that you throw on certificate path validation failure makes JSSE send a relevant TLS alert to the SSL negotiating peer. HOWEVER, the subclasses of CertificateException don't include anything to send many important TLS alerts like certificate_revoked, unsupported_certificate and many more. How can you make JSSE send these alerts in this case?

    There is no code in JSSE to send any of those alerts. If you throw any CertificateException from those methods it will always send an alert_certificate_unknown.
    (OpenJDK 6 src b10 21 June 2010)

  • How do you control alt delete on a mac?

    My MacBook air has frozen when using keynote for a presentation. Usually on a PC I would do ctrl alt delete to end that program. How do you do that on a mac? Pressing esc doesn't help. The only thing that works in holding down the power switch and rebooting but that surely cannot be the solution? Help!

    "Force quit".
    You can get there by pressing option-command-escape.
    Or via the Apple Menu.
    Or via the various "Stop" commands in Activity Monitor (in your Utilities folder).
    Or by clicking and holding on the dock icon of a hung-up process, or pressing option while clicking and holding on a dock icon of a normal process.
    There are other things, too, e.g., Terminal commands, but the above usually suffice.
    charlie

Maybe you are looking for