Menu

Turning off bits

Help
2008-03-12
2013-05-30
  • Nobody/Anonymous

    Was using the 7-seg. routine that is in the help files to display 0 thru 9.  I had also included a routine that just turned on,then off individual the segments(as LEDs).  I had all this in a loop.  My question is how the turn off all the segments at once.  After displaying "9" I want to clear the segments before looping back the the other part of the program.  I tried "Set PortB Off", but this gave a syntax error.  I got it to work by turning off each segment with "Set PortB.x Off" and so on. Please tell me that there is a simpler way.
    Mel

     
    • Hugh Considine

      Hugh Considine - 2008-03-12

      This will turn off all of the bits in PORTB:

      PORTB = 0

       
    • Nobody/Anonymous

      Thanks for fast reply.  Can't get much simpler than that.  Hugh, thanks for a great product, thanks for your time, and thanks for answering such questions for a rank beginner.  I hope you will continue to do so, for I know that I will have many more.  But I am having such fun trying out the routines, stringing them together, and adding some of my own thoughts.  Thanks again
      Mel

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.