BS2 PO-P15 pins
bluejay
Posts: 131
I have 16 leds connected to vdd and ground. I am trying to turn on all or some leds without assigning every led to each pin, without using coding such as led 0 = pin0,
led 1= pin1, led 2 = pin 2, etc.Then OUT 0 = high, out 1 = high, etc.
There must be a better and shorter way to do this. Maybe using DIRS? Please advise and thanks.
led 1= pin1, led 2 = pin 2, etc.Then OUT 0 = high, out 1 = high, etc.
There must be a better and shorter way to do this. Maybe using DIRS? Please advise and thanks.
Comments
Remember that you have to set any I/O pins used for LEDs as output pins. You can do DIRS = $FFFF to do this for all the I/O pins.
Version 2.2 of the Stamp Manual says it can only output 40mA per 8-pin group, or 40mA total across all 16 pins if using the internal voltage regulator, yes?