*/
Want to see what people are talking about? See the latest forum posts.
*/

View c++\onoff\onoff\onoff.cpp

Printer Port Interfacing 1 V1.0

Submitted By: myscripting
Rating: starstarstarstar (Rate It)


//switch led on /off in Visual C++

#include <conio.h>
#include <windows.h>

int main()
{
        int counter;
        //10 loops
        for(counter = 0;counter<=9;counter++)
        {
        _outp(0x378,1); //output is high
        _sleep(250); //250 mS delay
        _outp(0x378,0); //output is low
        _sleep(250);
        }

        return 0;
}

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.