Shop OBEX P1 Docs P2 Docs Learn Events
Stamp 1 — Parallax Forums

Stamp 1

microcontrollerusermicrocontrolleruser Posts: 1,194
edited 2017-01-05 02:40 in BASIC Stamp
Stamper's

Any of the Nuts and Volts crowd still out there?

Have a couple Stamp 1 questions.

Thanks!

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    If you post your questions we can try to address them. :nerd:

  • Chris

    Thank you!

    Self studying as much as possible so when we do have questions

    they'll be halfway intelligent.

    Where is the COMPLETE Basic Stamp 2.5.4 that's in Basic Stamp Editor Help as a .PDF or link?

    Need to share it with associate and also access it without starting editor every time.

    Thanks!
  • Mike GreenMike Green Posts: 23,101
    edited 2017-01-05 17:53
    The latest paper version is 2.2 and a link to the PDF version is here. I don't know what's changed between 2.2 and 2.5.4, but I suspect that the BS2px support is part of that.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    V2.5.3 is the latest version of the BASIC Stamp Editor which is located here: https://www.parallax.com/downloads/basic-stamp-editor-software-windows

    As Mike pointed out, the latest version of the BASIC Stamp Manual is V2.2

  • Chris

    What are all the pin I/O commands?

    Found DIRS, PINS, IN and OUT.

    Think there's a TOGGLE.

    Just Stamp 1 thank you.

    All those others for Stamp 2 and PX's are a wonderful thing

    but Not now Kato!

    Thanks!

  • Mike Green, Chris

    Okay so there is no standalone help.

    We'll just open the editor each time and click on help.

    Yes, we have a nice minty copy of the Syntax and Reference too.

    Thanks!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2017-01-05 19:05
    If you look at the command reference in the help file it tells you which PBASIC commands are for which BASIC Stamp models by the little colored numbers to the right of each command. Look for commands with a "1" next to them for BS1.

    PBASIC%20Help%20Command%20Ref.jpg
    1280 x 947 - 322K

  • Chris

    Which ones are for the pins, the first two registers of the

    Stamp 1 please?

    Thanks!
  • Look on page 82 of the Syntax and Reference Manual. PINS is the first location that corresponds to the 8 I/O pin settings. DIRS is the second location that's used to set the input (0) / output(1) direction of each pin.
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2017-01-05 20:04
    Mike

    Yes. Have been going over and over that part.

    Want to track down all commands related to that

    and find the light at the end of the tunnel.

    Thanks!
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2017-01-05 20:22
    Stampers

    Help/Commands by Category

    I/0 section there are 9 commands pertaining to Stamp 1.

    Pins and DIRS are not even listed in Categories.

    Pin has it's on listing in Table of Contents.

    Very messy. A challenge. Just like we like it!:)

    Although the help topics for each command are excellent. The inclusion of

    snippets of code works for us.

    Thanks!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    Chris Which ones are for the pins, the first two registers of the Stamp 1 please? Thanks!

    Same Help File, but click Memory Organization.

    PBASIC%20Help%20Memory%20Org.jpg
    1280 x 947 - 413K
  • Chris

    You got me there.

    Pins and Dirs are not commands they are byte labels.

    It's slowly coming into focus.

    Will work on it tonight.

    Thanks!

  • Chris

    PIN is not one of the 9 Stamp 1 I/O commands.

    So that takes care of that for now!

    PIN is a command and Pins is a BS1 label within Ports with Dirs. Cleared that up.

    Text bounces back and forth between calling things Commands and Directives.

    Makes you stay on your toes.:)

    I prefer commands.

    Thanks!



  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2017-01-05 22:53
    PIN is a command and Pins is a BS1 label within Ports with Dirs. Cleared that up.

    PINS refers to the entire 8-bit port while PIN0 - PIN7 refer to the individual I/O pins (each bit of PINS).


  • Chris

    Good point. PIN 0, PIN1, PIN2...

    Plus the there are bit-addressable bytes in the registers.

    Thanks.
  • At EFX-TEK we build a little controller around the BS1 called the Prop-1; you'd be surprised where it get used (from home projects to major American theme parks). I've been programming the BS1 since 1994, and still write a lot of code for our customers -- perhaps I can help.

    In the BS1, the only bit-addressable variables are PINS/DIRS (which form PORT) and B0/B1 (which form W0). When I create BS1 programs, I tend to start defining byte variables at B2 to reserve B0 and B1 in case I need them later. Likewise, for word variables I start with W5 and work down, leaving W6 available for the RETURN stack should I need to use GOSUB.

    Keywords related to IO pins
    -- HIGH
    -- INPUT
    -- LOW
    -- OUTPUT
    -- TOGGLE
    -- REVERSE

    Keep in mind that other (advanced) features will often affect the state of an IO pin. BUTTON and PULSIN, for example, force the pin to input mode.

  • Mr McPhalen

    Thank you.

    Hearing things said a different way really helps.

    You can get stuck reading Parallax documentation and just go round and round.

    Working on getting some time to run pretty good snippets of code I found.

    Have a nice day!
Sign In or Register to comment.