Shop OBEX P1 Docs P2 Docs Learn Events
Setting the extra pins for the BS2p40??? — Parallax Forums

Setting the extra pins for the BS2p40???

kuskowskikuskowski Posts: 17
edited 2006-10-05 02:34 in BASIC Stamp
I just got a BS2p40 and I'm trying to set the extra pins.· I've set 0-15 to components, and 16 is the known serialIO.· So what are the other PINs I can set components to?

Thanks,

Justin

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-10-04 15:36
    Read the section in the Stamp Manual on the AUXIO, MAINIO, and IOTERM commands. Essentially, the BS2p40 has two sets of I/O pins that are numbered 0-15 and these statements switch the Stamp from one set to another.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2006-10-04 16:06
    Mike--

    Is the concept similar to the dual registers of the old Z80 processor?

    --Bill



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • kuskowskikuskowski Posts: 17
    edited 2006-10-04 16:53
    AWSOME Thanks....
  • Mike GreenMike Green Posts: 23,101
    edited 2006-10-04 17:10
    Bill,
    In a way, it's similar. It's a way of compatibly expanding an existing instruction set by adding special instructions to select one of two banks of registers or I/O pins or whatever. All the other instructions work the way they used to, but they work on one set of registers or I/O pins at a time.
    Mike
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-10-04 22:30
    Bill Chennault said...

    Is the concept similar to the dual registers of the old Z80 processor?

    Bill,
    ·
    ·· The shadow registers on the Z80 could be swapped with an alternate set.· This was usually used in interrupt routines to save having to push everything onto the stack.· This had no effect on the I/O pins or registers related to them.
    ·
    ·· On the BS2p40 when you use MAIN, AUXIO or IOTERM you are changing which bank of I/O pins that subsequent I/O related instructions affect.· I hope this helps.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2006-10-05 02:34
    Chris--

    Yes, that helps a lot. Thanks once again.

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
Sign In or Register to comment.