Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello to everyone.

I need some help. How can I control 8 LEDs using Parallel Port and Turbo C, like counting in Binary, etc. I only know C language so please help me for the source code. Is there Inpout32.dll that will need in C? please help.

By the way, I'm just only a beginner so I hope you understand. Any help will highly appreciated. Thanks in Advance!
Posted

This question has been answered in the C# forum.
 
Share this answer
 
XML
#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <dos.h>

int main(void)
{
    int i, port = 0x378;

    for (i = 0; i < 2; i++)
    {
        outportb(port, 0xff);
        getch();
        outportb(port, 0);
        getch();
    }

    return 0;
}


Make sure about the port address from device manager, parallel port, properties, I/O Range.

https://www.facebook.com/groups/comp.programmers/permalink/10151166007575911/?comment_id=10151166053485911&notif_t=like[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900