Results 1 to 2 of 2

Thread: interface

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Posts
    5

    interface

    im trying to play with the LED's using the parallel port. it did light but then the previous instructions are cleared off. let say i on the bit 1, then i on the bit 2 but bit is automatically is off. .please do help me..

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: interface

    If you write 1 to the port to turn on LED1, and 2 to turn on LED2, you write 3 to turn them both on. Basic binary arithmetic. Is this what you're doing?

    (If you write 2, bit 0 is 0, turning it off, it's not ignored or left the way it was the last time you wrote a 1.)
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width