Shop OBEX P1 Docs P2 Docs Learn Events
possible interest to 2p24 users — Parallax Forums

possible interest to 2p24 users

kelvin jameskelvin james Posts: 531
edited 2005-12-31 03:28 in BASIC Stamp
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

Comments

  • Tracy AllenTracy Allen Posts: 6,658
    edited 2005-12-30 17:55
    Hi Kevin,

    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 jameskelvin james Posts: 531
    edited 2005-12-30 18:20
    Check the help section from the editor under auxio. It would be nice to get some clarification on this.

    kelvin
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2005-12-30 19:32
    Oh, I see. I believe that is an Error in the IDE editor help file. That additional text does not appear in the Stamp manual.pdf. The fact is, the ~20kohm weak pullup resistors are enabled on those pins, and making them low will draw more current.

    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.
    '{$Stamp BS2p}
    MAINIO
    DIRS=$FFFF
    OUTS=0
    END
    



    But the following draws 5.8 milliamps, a 100fold increase in current drain:
    '{$Stamp BS2p}
    MAINIO
    DIRS=$FFFF
    OUTS=0
    AUXIO 
    DIRS=$FFFF
    OUTS=0 
    END
    



    And interesting, the following with all auxio set HIGH draws only 47 microamps, a very slight improvement over leaving them as inputs.
    {$Stamp BS2p}
    MAINIO
    DIRS=$FFFF
    OUTS=0
    AUXIO 
    DIRS=$FFFF
    OUTS=$FFFF
    END
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • kelvin jameskelvin james Posts: 531
    edited 2005-12-30 23:34
    Tracy Thankyou for the taking the time to look at this, and i should of mentioned at first the info was from the editor, and not the manual, but i thought they should of been considered the same. Normally when i have read info regarding floating pins here, i was under the impression that it is best to set them as outputs if they are left unconnected? Apparently, as not to not draw extra current and the possibility of false input readings. So, this caught me as a bit of a surprise, because i figured the auxio was only related to the 40 pin module, which now it seems the same chip is being used for the 24 pin as well. Anyway, by your testing, it looks like it is better just to leave everything the way it is, unless someone from Parallax has a different opinion on this. I do not normally question tech info from Parallax, this i found a little confusing.

    kelvin
  • kelvin jameskelvin james Posts: 531
    edited 2005-12-31 03:28
    Upon some further thought, since the sx48 is used on these, maybe some of the sx guys can shed some light here. Any io issues on reset or operation?

    kelvin
Sign In or Register to comment.