possible interest to 2p24 users
kelvin james
Posts: 531
I don't know if this has been addressed here before. I did not realize that the interpeter chip still has pins for auxio, even though the 2p 24 pin modules do not have the extra pins. So that means there are still another 16 floating pins that have to be dealt with. This is from the manual.
kelvin
Note on reducing power consumption.
When the BASIC Stamp is reset all RAM variables, including DIRS and OUTS are cleared to zero. This goes for main and auxiliary pins. On the BS2p24, BS2pe, and BS2px the auxiliary pins from the interpreter chip are not connected to physical IO pins on the BASIC Stamp. While not connected to anything, these pins do have pull-ups activated, effectively connecting them to Vdd. After reset, reading the auxiliary pins from a BS2p24, BS2pe, or BS2px will return all 1s. For lowest possible current consumption where required, you may set the BS2p24, BS2pe, and BS2px auxiliary pins as output low.
Setup:
AUXIO ' select AUXIO pins
OUTS = $0000 ' force outputs low
DIRS = $FFFF ' make (unconnected) pins outputs
MAINIO ' back to MAINIO group
kelvin
Note on reducing power consumption.
When the BASIC Stamp is reset all RAM variables, including DIRS and OUTS are cleared to zero. This goes for main and auxiliary pins. On the BS2p24, BS2pe, and BS2px the auxiliary pins from the interpreter chip are not connected to physical IO pins on the BASIC Stamp. While not connected to anything, these pins do have pull-ups activated, effectively connecting them to Vdd. After reset, reading the auxiliary pins from a BS2p24, BS2pe, or BS2px will return all 1s. For lowest possible current consumption where required, you may set the BS2p24, BS2pe, and BS2px auxiliary pins as output low.
Setup:
AUXIO ' select AUXIO pins
OUTS = $0000 ' force outputs low
DIRS = $FFFF ' make (unconnected) pins outputs
MAINIO ' back to MAINIO group
Comments
Notice that the internal pullups are activated, so the chip is already in a lowest current condition wrt those pins. I think the business of making them all LOW is your own addition, not in the manual. Making them LOW will in fact increase the current by about 250 microamps per pin, or 4 milliamps if you make them all low. You can make them all HIGH without affecting the current, because the resistors are pullups.
If you leave the pins as inputs (AUXIO[noparse]:D[/noparse]IRS=$0000), you can use the associated OUTS as an extra word variable in your programs.
I think the BS2px-24 is a little different. I recall (from initiial experiments) that the 'px-24 does not even allow you access to AUXIO. That probably came about with the new comparator and pin config commands. The auxio pins on the 'px are fixed as inputs with pullups and you can't change that at all.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Post Edited (Tracy Allen) : 12/30/2005 5:59:19 PM GMT
kelvin
Nothing like an experiment to "prove" it. I just now tested a BS2p on a protoboard with nothing connected to the pins. With the following program loaded, it draws 56 microamps while sleeping.
But the following draws 5.8 milliamps, a 100fold increase in current drain:
And interesting, the following with all auxio set HIGH draws only 47 microamps, a very slight improvement over leaving them as inputs.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
kelvin
kelvin