Shop OBEX P1 Docs P2 Docs Learn Events
BS2p40 question — Parallax Forums

BS2p40 question

ArchiverArchiver Posts: 46,084
edited 2004-03-29 02:51 in General Discussion
I know the BS2p40 can poll, but can it goto a different part of the program, then go back to where it left off (something like the gosub), only when one of the inputs are in the right state?

thanks
TC

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-05-17 00:29
    [font=arial,helvetica]In a message dated 5/16/01 6:21:47 PM Central Daylight Time,
    aconti@neo.rr.com writes:


    I know the BS2p40 can poll, but can it goto a different part of the program,
    then go back to where it left off (something like the gosub), only when one
    of the inputs are in the right state?



    Nope. ·You can use PRUN jump to another program slot, but you'll have to keep
    track of where you are when your main program is running. ·This will never be
    quite perfect, but you can get close by subdividing your main program into
    tasks.

    -- Jon Williams
    -- Dallas, TX
    [/font]
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-17 00:50
    so what you are saying is I need to do something like this

    pollin 0,1
    pollrun 1
    pollmode 3

    (program slot 0)
    main_something:
    do something
    do something
    do something
    goto main_something

    (program slot 1)
    something_else:
    something else
    something else
    something else
    goto main_something


    --- In basicstamps@y..., jonwms@a... wrote:
    > In a message dated 5/16/01 6:21:47 PM Central Daylight Time,
    > aconti@n... writes:
    >
    >
    > > I know the BS2p40 can poll, but can it goto a different part of
    the program,
    > > then go back to where it left off (something like the gosub),
    only when one
    > > of the inputs are in the right state?
    >
    > Nope. You can use PRUN jump to another program slot, but you'll
    have to keep
    > track of where you are when your main program is running. This
    will never be
    > quite perfect, but you can get close by subdividing your main
    program into
    > tasks.
    >
    > -- Jon Williams
    > -- Dallas, TX
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-24 23:07
    Hi,

    The BS2P24 offers I2C on ports P0/P1 and P8/P9.
    Am I correct to assume that when the auxiliary I/O
    on the BS2P40 are active, I can use I2C on ports X0/X1 and X8/X9?

    Greetings peter
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-24 23:22
    In a message dated 7/24/01 5:19:24 PM Central Daylight Time,
    peterverkaik@b... writes:


    > The BS2P24 offers I2C on ports P0/P1 and P8/P9.
    > Am I correct to assume that when the auxiliary I/O
    >

    Yes.




    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2002-07-27 20:23
    I have ordered the BS2P-40 but have not yet recieved it so I am unable to try
    anything with this device. I have a question regarding the pin number
    references in the program. For pin P0 through P15 you simply say "high 0 -15".
    For the 40 pin version the second 16 pins are labeled X0 - X15. Do I refer to
    these pins as 16 - 32 or X0 - X15??

    I have tried a number of possible schemes and I never generate a syntax error
    even when using numbers outside the normal range. (ie:"high 75" won't generate a
    syntax error.)

    The manual makes no reference to the second set of pins (at least I couldn't
    find any).

    Anybody using the "Big P" shed some light on this for me??


    Thanks

    Mike B.
    w6ffc@p...



    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2002-07-27 21:50
    hi Mike,

    mainio ' select first bank of 16 pins
    high 5 ' sets p5
    auxio ' select second bank of 16 pins
    high 5 ' sets x5

    Pepper your program with "mainio" and "auxio" statements to switch
    back and forth as needed. You can also use the "ioterm x" command,
    which selects the main io bank when x=0 and the auxiliary bank when
    x=1.

    -- Tracy


    >I have ordered the BS2P-40 but have not yet recieved it so I am
    >unable to try anything with this device. I have a question
    >regarding the pin number references in the program. For pin P0
    >through P15 you simply say "high 0 -15". For the 40 pin version the
    >second 16 pins are labeled X0 - X15. Do I refer to these pins as 16
    >- 32 or X0 - X15??
    >
    > I have tried a number of possible schemes and I never generate a
    >syntax error even when using numbers outside the normal range.
    >(ie:"high 75" won't generate a syntax error.)
    >
    > The manual makes no reference to the second set of pins (at least
    >I couldn't find any).
    >
    > Anybody using the "Big P" shed some light on this for me??
    >
    >
    > Thanks
    >
    > Mike B.
    > w6ffc@p...
  • ArchiverArchiver Posts: 46,084
    edited 2002-07-27 22:42
    Hi Tracy:

    Thanks for the reply. I';; have to try that. I dont recall
    seeing that anywhere....

    I just rebuilt my hard drive and have resubscribed to the list
    however the messages are not going to my email address for some
    reason..

    Mike B.


    --- In basicstamps@y..., Tracy Allen <tracy@e...> wrote:
    > hi Mike,
    >
    > mainio ' select first bank of 16 pins
    > high 5 ' sets p5
    > auxio ' select second bank of 16 pins
    > high 5 ' sets x5
    >
    > Pepper your program with "mainio" and "auxio" statements to switch
    > back and forth as needed. You can also use the "ioterm x" command,
    > which selects the main io bank when x=0 and the auxiliary bank when
    > x=1.
    >
    > -- Tracy
    >
    >
    > >I have ordered the BS2P-40 but have not yet recieved it so I am
    > >unable to try anything with this device. I have a question
    > >regarding the pin number references in the program. For pin P0
    > >through P15 you simply say "high 0 -15". For the 40 pin version
    the
    > >second 16 pins are labeled X0 - X15. Do I refer to these pins as
    16
    > >- 32 or X0 - X15??
    > >
    > > I have tried a number of possible schemes and I never generate
    a
    > >syntax error even when using numbers outside the normal range.
    > >(ie:"high 75" won't generate a syntax error.)
    > >
    > > The manual makes no reference to the second set of pins (at
    least
    > >I couldn't find any).
    > >
    > > Anybody using the "Big P" shed some light on this for me??
    > >
    > >
    > > Thanks
    > >
    > > Mike B.
    > > w6ffc@p...
  • ArchiverArchiver Posts: 46,084
    edited 2002-07-27 23:08
    You have to tell the processor to switch to the auxiliary pins. Look up the
    AUXIO command in your Stamp manual.

    Original Message

    > I have ordered the BS2P-40 but have not yet recieved it so I am unable to
    try anything with this device. I have a question regarding the pin number
    references in the program. For pin P0 through P15 you simply say "high
    0 -15". For the 40 pin version the second 16 pins are labeled X0 - X15. Do
    I refer to these pins as 16 - 32 or X0 - X15??
    >
    > I have tried a number of possible schemes and I never generate a syntax
    error even when using numbers outside the normal range. (ie:"high 75" won't
    generate a syntax error.)
    >
    > The manual makes no reference to the second set of pins (at least I
    couldn't find any).
    >
    > Anybody using the "Big P" shed some light on this for me??
  • ArchiverArchiver Posts: 46,084
    edited 2002-07-27 23:20
    Thanks Rodent.

    I don't HAVE a manual for the 2P or I would have. I have just downloaded
    V1.32 of the editor and looked in the 2P commands reference and do indeed
    now see the specific commands for the device. I am swapping out the BS2IC
    for the 2P to gain I2C and 16 extra I/O pins for my R/C submarine project in
    which I ran out of I/O and had to resort to bandaging the BS2 to make it do
    all the things necessary.

    I now also have started receiving posts from this group again. We're
    back in business..

    Thanks

    Mike B.

    Original Message
    From: "Rodent" <daweasel@s...>
    To: <basicstamps@yahoogroups.com>
    Sent: Saturday, July 27, 2002 3:08 PM
    Subject: Re: [noparse][[/noparse]basicstamps] BS2P40 question


    > You have to tell the processor to switch to the auxiliary pins. Look up
    the
    > AUXIO command in your Stamp manual.
    >
    >
    Original Message
    >
    > > I have ordered the BS2P-40 but have not yet recieved it so I am unable
    to
    > try anything with this device. I have a question regarding the pin number
    > references in the program. For pin P0 through P15 you simply say "high
    > 0 -15". For the 40 pin version the second 16 pins are labeled X0 - X15.
    Do
    > I refer to these pins as 16 - 32 or X0 - X15??
    > >
    > > I have tried a number of possible schemes and I never generate a
    syntax
    > error even when using numbers outside the normal range. (ie:"high 75"
    won't
    > generate a syntax error.)
    > >
    > > The manual makes no reference to the second set of pins (at least I
    > couldn't find any).
    > >
    > > Anybody using the "Big P" shed some light on this for me??
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-28 00:55
    Hi everyone:

    I just joined the list and saw the discussion regarding sending the "P" chip
    back for upgrades re: the I2C stuff. I missed the beginning of the discussion
    so I was wondering about the upgrade. How to determine if I need the upgrade,
    how much etc??

    Mike B.

    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-28 05:18
    Use the ID feature of the editor. The latest firmware for the BS2p is
    1.3.

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: Mike Blier [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=rCyoiiV6n-IoUC2ZKdoHx89nm7oWLacsN4-R9U0fNDA9SF29KlMlR16bXH0hNLwZ3stpiQklSxJU1S50b88]w4fej@b...[/url
    Sent: Saturday, March 27, 2004 6:56 PM
    To: Basicstamps@Yahoogroups.Com
    Subject: [noparse][[/noparse]basicstamps] BS2P40 question


    Hi everyone:

    I just joined the list and saw the discussion regarding sending the
    "P" chip back for upgrades re: the I2C stuff. I missed the beginning of
    the discussion so I was wondering about the upgrade. How to determine
    if I need the upgrade, how much etc??

    Mike B.

    [noparse][[/noparse]Non-text portions of this message have been removed]




    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.

    Yahoo! Groups Links







    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-28 16:45
    >Hi everyone:
    >
    > I just joined the list and saw the discussion regarding sending
    >the "P" chip back for upgrades re: the I2C stuff. I missed the
    >beginning of the discussion so I was wondering about the upgrade.
    >How to determine if I need the upgrade, how much etc??
    >
    > Mike B.

    As Jon said, use the Identify (F6 or CTRL-I or click the Icon) to see
    if you have version 1.3. For the record, the up-to-date version of
    the BS2pe is 1.1.

    The old syntax of the I2C commands required an address byte, but in
    v1.3 the address argument is optional and data can immediately follow
    the slaveID. That allows the Stamp to work with devices that don't
    require an address.
    old:
    I2CIN pin, slaveID, address {\LowAddress}, [noparse][[/noparse]InputData]

    new:
    I2CIN pin, slaveID, {address {\LowAddress},} [noparse][[/noparse]InputData]

    same syntax option for I2COUT. (the "{}" brackets indicate optional
    arguments):

    Version 1.3 also added two more read-only information bytes in
    scratchpad space, byte 134 for the status of mainio/auxio, and byte
    135 for the pollmode configuration and flag.

    There were a couple of bug fixes too that you might need, even if you
    don't need the I2C enhancements 1) locations 110 and 111 in
    scratchpad RAM were trashed when executing a STORE instruction, 2)
    the chip might go into programming wait mode if the Sin line happened
    to be high at the instant a RUN command was executed, 3) overflow
    from 65535 to 0 in a COUNT command could cause the chip to stop
    execution. 4) an I2C chip could be improperly identified if another
    one on the same I2C buss was suddenly disabled or failed to
    acknowledge. Depending on what kind of programming you do, you might
    never encounter those problems. But upgrade to 1.3 to be sure.

    -- Tracy
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-28 18:57
    Duh !! My bad...

    Well I have a 1.2 chip and I am using an I2C chip in my project (R/C
    submarine) but the I2C device (DS1307 RTC) appears to work ok so should I
    let a sleeping dog lie and get on with my life or are the I2C "issues" going
    to be life threatening to my project????

    Thanks, Mike B.
    Original Message
    From: "Jon Williams" <jwilliams@p...>
    To: <basicstamps@yahoogroups.com>
    Sent: Saturday, March 27, 2004 11:18 PM
    Subject: RE: [noparse][[/noparse]basicstamps] BS2P40 question


    > Use the ID feature of the editor. The latest firmware for the BS2p is
    > 1.3.
    >
    > -- Jon Williams
    > -- Applications Engineer, Parallax
    > -- Dallas Office
    >
    >
    >
    Original Message
    > From: Mike Blier [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=qn4fCfnEDIbrSwVgutBKI08Z0CPSULMmC3PDZLlESK1dihd8MPqTlCgStja1fWDzpLgDIkPYsStMfw]w4fej@b...[/url
    > Sent: Saturday, March 27, 2004 6:56 PM
    > To: Basicstamps@Yahoogroups.Com
    > Subject: [noparse][[/noparse]basicstamps] BS2P40 question
    >
    >
    > Hi everyone:
    >
    > I just joined the list and saw the discussion regarding sending the
    > "P" chip back for upgrades re: the I2C stuff. I missed the beginning of
    > the discussion so I was wondering about the upgrade. How to determine
    > if I need the upgrade, how much etc??
    >
    > Mike B.
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject
    > and Body of the message will be ignored.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
    >
    >
    >
    > This message has been scanned by WebShield. Please report SPAM to
    > abuse@p....
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-29 02:51
    Let me clarify ... the older syntax required an address byte; as Tracy
    pointed out this is no longer required. The "issue" affects the PCF8574
    specifically, and similar devices that have no internal addresses (this
    is not the case with your DS1307). If you do need ever additional IO,
    skip the [noparse][[/noparse]wimpy] PCF8574 and use the Microchip MCP23016 -- it's a much
    better device (and has internal addresses so it won't be affected by
    your 1.2 firmware).

    And as I stated in another post, the 1.3 firmware works a bit better
    with "smart" devices like the Devantech compass and SRF-08 sonar.

    Okay, if I haven't made it perfectly clear, there is nothing wrong with
    BS2p modules pre revision 1.3. We simply made improvements where we
    could to make a better product.

    -- Jon Williams
    -- Parallax


    Original Message
    From: Mike Blier [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=VTLEfIW-CnDWSHBKwou2FRRpYZY0jrEWpYvYCLGiMkXzzZvoO6GFDIw-v4IxR6lZn89oqw_Rxq18mhE]w4fej@b...[/url
    Sent: Sunday, March 28, 2004 11:57 AM
    To: basicstamps@yahoogroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] BS2P40 question


    Duh !! My bad...

    Well I have a 1.2 chip and I am using an I2C chip in my project (R/C
    submarine) but the I2C device (DS1307 RTC) appears to work ok so should
    I let a sleeping dog lie and get on with my life or are the I2C "issues"
    going to be life threatening to my project????

    Thanks, Mike B.
    Original Message
    From: "Jon Williams" <jwilliams@p...>
    To: <basicstamps@yahoogroups.com>
    Sent: Saturday, March 27, 2004 11:18 PM
    Subject: RE: [noparse][[/noparse]basicstamps] BS2P40 question


    > Use the ID feature of the editor. The latest firmware for the BS2p is

    > 1.3.
    >
    > -- Jon Williams
    > -- Applications Engineer, Parallax
    > -- Dallas Office
    >
    >
    >
    Original Message
    > From: Mike Blier [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=VTLEfIW-CnDWSHBKwou2FRRpYZY0jrEWpYvYCLGiMkXzzZvoO6GFDIw-v4IxR6lZn89oqw_Rxq18mhE]w4fej@b...[/url
    > Sent: Saturday, March 27, 2004 6:56 PM
    > To: Basicstamps@Yahoogroups.Com
    > Subject: [noparse][[/noparse]basicstamps] BS2P40 question
    >
    >
    > Hi everyone:
    >
    > I just joined the list and saw the discussion regarding sending the

    > "P" chip back for upgrades re: the I2C stuff. I missed the beginning
    > of the discussion so I was wondering about the upgrade. How to
    > determine if I need the upgrade, how much etc??
    >
    > Mike B.
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject
    > and Body of the message will be ignored.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
    >
    >
    >
    > This message has been scanned by WebShield. Please report SPAM to
    > abuse@p....
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject
    > and
    Body of the message will be ignored.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
    >
    >




    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.

    Yahoo! Groups Links







    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
Sign In or Register to comment.