Are you blogging on PH? Get your free blog.
*/
*/

View c\lcc\BCOUNT.C

Printer Port Interfacing 1 V1.0

Submitted By: myscripting
Rating: starstarstarstar (Rate It)


/*********************************************
binary counter : LCC Win 32 version
This will count from 0 to 255
This assumes your printer port address
is 0x378 and also pauses for 300mS between
every count
**********************************************/

#include <conio.h> /*required for _outp*/
#include <windows.h> /*required for sleep*/

int main()
{
        int x;
        for(x = 0;x<=255;x++)
        {
      _outp(0x378,x);
          sleep(300); /*300 millisecond delay*/
        }
        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.
Resource Listings