what is the output of this code?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • doyan
    New Member
    • Jul 2010
    • 5

    #1

    what is the output of this code?

    Code:
    #include<dos.h>
    void main(void)
    {
    while(1)
    {
    outportb(0x378, 0xFF);
    delay(1000);
    outportb(0x378, 0x00);
    delay(1000);
    }
    }
    i cant run this with my turbo c because we don't have parallel port..
    i have 4 led connected to parallel..
    the output need is led will light after 1 sec in order...
    please help!!!
    Last edited by Niheel; Jul 12 '10, 11:59 PM. Reason: please use code tags to display code
  • newb16
    Contributor
    • Jul 2008
    • 687

    #2
    You don't have parallel port but you have LEDs connected to parallel port? And anyway, this will only run in dos box of Windows 98 or like, not on any NT (2000, xp, ... ) OS.

    Comment

    • donbock
      Recognized Expert Top Contributor
      • Mar 2008
      • 2427

      #3
      Did you wire the LEDs to the parallel port yourself? Precisely how are the LEDs connected to the parallel port?

      Presumably you're posting this question because the LEDs don't blink the way you expect them to. In general, that could be due to either a software problem or a hardware problem. How confident are you that the hardware connection is correct?

      Are you sure enough current flows to illuminate the LEDs?

      Comment

      Working...