setting OUTC low

Hi All - FYI, I'm using a BS2.

My eyes began to cross at midnight while reading through the Stamp programming reference looking for a way to set the group of pins, OUTC, all low with one command.

I wound up setting Pins 8, 9, 10, 11 low individually as a work-around.

Anyone know of a command that will set pin group OUTC low with one command?

Thanks much,

DJ
Well-written documentation requires no explanation.

Comments

  • 5 Comments sorted by Date Added Votes
  • If they are already outputs, then
    OUTC = 0
    
    would do it. If not, you then you also need
    DIRC = %1111
    
    Re-inventing the wheel is not a waste of time if, when you are done, you understand why it is round.
    Cool, CA, USA 95614
  • If they are already outputs, then
    OUTC = 0
    
    would do it.

    Thanks Tom - I'll give it a go tonight.

    Dave
    Well-written documentation requires no explanation.
  • davejames,

    Refer to page 83 of the BASIC Stamp Manual.
    On power-up or reset all memory locations become 0.
    Thus:
    The pin directions will all be inputs since a 0 in DIRx makes a pin an Input.
    Also the output levels will all be low since a 0 in OUTx makes a pin output Low.

    Usually you will see a "DIRx = something" statement near the top of the program and it might be followed by an OUTx.
  • Genetix wrote: »
    Refer to page 83 of the BASIC Stamp Manual.

    Crap! I forgot about the physical book. I was digging through the on-line version that's included with the programming environment.

    Thanks for the pointer & reminder.

    DJ
    Well-written documentation requires no explanation.
  • davejames wrote: »
    If they are already outputs, then
    OUTC = 0
    
    would do it.

    Thanks Tom - I'll give it a go tonight.

    Dave

    Tom - that was the ticket! Thanks much.

    Dave
    Well-written documentation requires no explanation.
Sign In or Register to comment.