Shop OBEX P1 Docs P2 Docs Learn Events
New method of attaching a BS1 board to a development location — Parallax Forums

New method of attaching a BS1 board to a development location

Hello!
Those of you who routinely read and comment on my musings, know about Tinkersphere, who is a small to medium sized store in the SOHO area of Manhattan. It turns out that they sell a style of jumper who can be used to connect to the pins shown on the original BS1 Carrier board.

This is "Male to Female Jumper Wires (10 pack)"

And ideally it will do the same as my original idea.
--
Strange no robots here.

Comments

  • PublisonPublison Posts: 12,366
    edited 2016-05-07 23:07
    And our sponsor also sells similar cables :

    https://www.parallax.com/catalog/cablesconverters/other

  • Buck RogersBuck Rogers Posts: 2,161
    edited 2016-05-08 03:58
    Publison wrote: »
    And our sponsor also sells similar cables :

    https://www.parallax.com/catalog/cablesconverters/other
    Also true.
    But I found them first at Tinkersphere. However I am indeed using a batch of the three-wire ones for the LCD displays that live here.
    ---
    Strange no robots here. Also no cave here.
  • Buck RogersBuck Rogers Posts: 2,161
    edited 2016-05-08 03:59
    Hello!
    Well I must be doing something (else) right regarding the whole business. After the usual fun and games concerning the all important method of powering the BS1 Stamp, in this case double checking that I had the wires from the battery box containing a 9V battery, properly wired. A shout out goes to Mike Green, with double the marks, for confirming that the red and black leads from the clip need to be reversed when being connected in this style.

    Anyway I connected my switch enabled connector harness originally wired for a version of the home work board, to another snap connector. The connector was part of this thing there, ordered it for the pesky board next door, but it works here:
    Arduino Battery Adapter 9V

    It was plugged into this thing:
    Female DC Jack Adapter with Screw Terminals: 5.5x2.1mm

    Attached to the screw terminals was a black adaptaplug from RS, which is plugged into an extension cable, the same firm sold for a while. The polarity on it is reversed accordingly.

    At the other end wearing a white adaptaplug also from RS is a 9V battery box from Tinkersphere (Because RS never had it in stock locally. And even Adafruit wanted a strange amount of money for it, a firm in Texas wanted a strange amount as well.)
    Enclosed 9V Battery Holder with On/Off Switch

    Currently it is running the code from the LCD displays.
    ' =========================================================================
    '
    '   File...... Serial_LCD_Demo.BS1
    '   Purpose... Basic Serial LCD use, including customer characters
    '   Author.... (c) Parallax, Inc. -- All Rights Reserved
    '   E-mail.... support@parallax.com
    '   Started...
    '   Updated... 11 FEB 2005
    '
    '   {$STAMP BS1}
    '   {$PBASIC 1.0}
    '
    ' =========================================================================
    
    
    ' -----[ Program Description ]---------------------------------------------
    
    
    ' -----[ Revision History ]------------------------------------------------
    
    
    ' -----[ I/O Definitions ]-------------------------------------------------
    
    SYMBOL  TX              = 0             ' serial output to LCD
    
    
    ' -----[ Constants ]-------------------------------------------------------
    
    SYMBOL  LcdBkSpc        = $08           ' move cursor left
    SYMBOL  LcdRt           = $09           ' move cursor right
    SYMBOL  LcdLF           = $0A           ' move cursor down 1 line
    SYMBOL  LcdCls          = $0C           ' clear LCD (use PAUSE 5 after)
    SYMBOL  LcdCR           = $0D           ' move pos 0 of next line
    SYMBOL  LcdBLon         = $11           ' turn backlight on
    SYMBOL  LcdBLoff        = $12           ' turn backlight off
    SYMBOL  LcdOff          = $15           ' LCD off
    SYMBOL  LcdOn1          = $16           ' LCD on; cursor off, blink off
    SYMBOL  LcdOn2          = $17           ' LCD on; cursor off, blink on
    SYMBOL  LcdOn3          = $18           ' LCD on; cursor on, blink off
    SYMBOL  LcdOn4          = $19           ' LCD on; cursor on, blink on
    SYMBOL  LcdLine1        = $80           ' move to line 1, column 0
    SYMBOL  LcdLine2        = $94           ' move to line 2, column 0
    
    SYMBOL  LcdCC0          = $F8           ' define custom char 0
    SYMBOL  LcdCC1          = $F9           ' define custom char 1
    SYMBOL  LcdCC2          = $FA           ' define custom char 2
    SYMBOL  LcdCC3          = $FB           ' define custom char 3
    SYMBOL  LcdCC4          = $FC           ' define custom char 4
    SYMBOL  LcdCC5          = $FD           ' define custom char 5
    SYMBOL  LcdCC6          = $FE           ' define custom char 6
    SYMBOL  LcdCC7          = $FF           ' define custom char 7
    
    
    ' -----[ Variables ]-------------------------------------------------------
    
    SYMBOL  idx1            = B2            ' loop counter
    SYMBOL  idx2            = B3
    SYMBOL  char            = B4            ' characters for display
    SYMBOL  newChar         = B5
    SYMBOL  pntr            = B6            ' eeprom pointer
    SYMBOL  pos             = B7            ' position
    
    
    ' -----[ EEPROM Data ]-----------------------------------------------------
    
    Custom_Chars:
      EEPROM (LcdCC0, $0E, $1F, $1C, $18, $1C, $1F, $0E, $00)
      EEPROM (LcdCC1, $0E, $1F, $1F, $18, $1F, $1F, $0E, $00)
      EEPROM (LcdCC2, $0E, $1F, $1F, $1F, $1F, $1F, $0E, $00)
      EEPROM (LcdCC3, $00, $0A, $0A, $00, $11, $0E, $06, $00)
    
    Msg2:
      EEPROM ("IS VERY COOL!  ", 3)
    
    
    ' -----[ Initialization ]--------------------------------------------------
    
    Reset:
      HIGH TX                               ' setup serial output pin
      PAUSE 100                             ' allow LCD to initialize
    
    DnLoad_Custom_Chars:
      FOR idx1 = 0 TO 35                    ' download 4 characters
        READ idx1, char                     ' get data from table
        SEROUT TX, T2400, (char)            ' send to LCD
      NEXT
    
    
    ' -----[ Program Code ]----------------------------------------------------
    
    ' Clear the display and remove cursor and blinking attributes.
    
    Main:
      SEROUT TX, T2400, (LcdBLoff, LcdOn1, LcdCls)
      PAUSE 250
      SEROUT TX, T2400, ("THE BASIC STAMP")
    
    
    ' Scroll "chomper" animation across LCD line 2
    
    Animation:
      FOR idx1 = 0 TO 15                    ' scroll across line
        pntr = 36 + idx1                    ' point to new character
        READ pntr, newChar                  ' read it
        FOR idx2 = 0 TO 4                   ' animate current position
          LOOKUP idx2, (0, 1, 2, 1, newChar), char
          pos = LcdLine2 + idx1
          SEROUT TX, T2400, (pos, char)     ' put current frame at position
          PAUSE 75
        NEXT
      NEXT
    
    
    ' Flash LCD backlight (works only with backlit model)
    
    Flash:
      FOR idx1 = 1 TO 4
        SEROUT TX, T2400, (LcdBLon)
        PAUSE 750
        SEROUT TX, T2400, (LcdBLoff)
        PAUSE 250
      NEXT
    
      GOTO Main
      END
    
    
    ' -----[ Subroutines ]-----------------------------------------------------
    

    ---
    Strange no robots here. Also no cave here.
  • Next the methods of attaching the display to the board.
    IMG_0004.jpg

    It shows the board now wearing a small breadboard and the wiring needed to make it work. Following this will be the attachment of the harness for the calculator.
  • Update:
    Calculator harness works. But sending the output to the display does, but not the way I wanted. However inserting the directive to insert a CR after the variable causes an odd tokenization error.
    ' {$STAMP BS1}
    ' {$PBASIC 1.0}
    
    SYMBOL serData = B2
    ' -----[ I/O Definitions ]-------------------------------------------------
    
    SYMBOL  TX              = 0             ' serial output to LCD
    
    
    ' -----[ Constants ]-------------------------------------------------------
    
    SYMBOL  LcdBkSpc        = $08           ' move cursor left
    SYMBOL  LcdRt           = $09           ' move cursor right
    SYMBOL  LcdLF           = $0A           ' move cursor down 1 line
    SYMBOL  LcdCls          = $0C           ' clear LCD (use PAUSE 5 after)
    SYMBOL  LcdCR           = $0D           ' move pos 0 of next line
    SYMBOL  LcdBLon         = $11           ' turn backlight on
    SYMBOL  LcdBLoff        = $12           ' turn backlight off
    SYMBOL  LcdOff          = $15           ' LCD off
    SYMBOL  LcdOn1          = $16           ' LCD on; cursor off, blink off
    SYMBOL  LcdOn2          = $17           ' LCD on; cursor off, blink on
    SYMBOL  LcdOn3          = $18           ' LCD on; cursor on, blink off
    SYMBOL  LcdOn4          = $19           ' LCD on; cursor on, blink on
    SYMBOL  LcdLine1        = $80           ' move to line 1, column 0
    SYMBOL  LcdLine2        = $94           ' move to line 2, column 0
    Reset:
      HIGH TX                               ' setup serial output pin
      PAUSE 100                             ' allow LCD to initialize
    Main:
    SEROUT TX, T2400, (LcdBLoff, LcdOn1)
    PAUSE 250
    'DEBUG serData
    SERIN 7, T2400, serData
    'DEBUG serData
    serData = serData + 1
    'DEBUG serDATA
    SEROUT 7, T2400, (serData)
    SEROUT TX,T2400, (#serData)
    'SEROUT TX,T2400, (#serData, CR)
    'PAUSE 500
    'DEBUG serDATA
    'SEROUT TX, T2400, (LcdCls)
    GOTO Main
    

    That's the original Stamp1 translation from the Stamp2 code that was presented to us not too long ago. The Stamp2 code works of course sending to the display. I've simply stuck in the stuff needed, or so I thought.

    What I wanted was to have the thing present the debug data on one line, take a carriage return, and then do it again. That's the second line there, with the serial out to 0 command coding. It's commented out because of that error.
    ---
    Strange no robots here. Also no cave here.
Sign In or Register to comment.