Shop OBEX P1 Docs P2 Docs Learn Events
BS2 Input Ports — Parallax Forums

BS2 Input Ports

crsahicrsahi Posts: 4
edited 2008-01-29 15:45 in BASIC Stamp
I have a BS2 on a super carrier board. For an unknown reason to me, I am unable to use P6-P15 as Input ports. Using Parallax's Input_Output.BS2 program with one of these higher port with 5V at the port (and checked with a voltmeter on the chip) it debug only outputs a·0. Any recommended fixes?

·

Comments

  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2008-01-26 19:16
    Hi, can you attach the BS2 code you are using and maybe give a few details of how the 5v is connected to the input pins.

    Jeff T.
  • crsahicrsahi Posts: 4
    edited 2008-01-26 19:34
    Jeff,

    Thanks for you interest. I'm using the following routine and the 5 V is delivered through a micro switch with a 10K resistor. If I change the Input pin to one below P6 with the same set-up, the debug outputs a 1.

    Carl

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}


    Main:
    · INPUT 7······························ ' Make P7 an input
    · DEBUG "State of P7: ",
    ······· BIN1 IN7, CR

    · END
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2008-01-26 19:44
    Hi Carl, first try and make you program loop


    ' {$STAMP BS2}
    ' {$PBASIC 2.5}


    Main:
    · INPUT 7······························ ' Make P7 an input
    · DEBUG "State of P7: ",
    ······· BIN1 IN7, CR

    PAUSE 500

    GOTO main

    your micro switch should have Vdd on one side , from the other side a 220 ohm resistor to the input pin

    In addition you should have a 10K ohm pull·down resistor,·connect one end to·the juction of the 220 ohm resistor and the input pin and the other end to Vss

    Jeff T.
  • crsahicrsahi Posts: 4
    edited 2008-01-26 20:46
    Jeff,

    I made the changes as you suggested. Unfortunately, the BS2 is still not picking up the change in the state at the port.

    Carl
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2008-01-26 22:18
    Hi Carl, have you had the Super carrier board and BS2 long and do you think you could have damaged the chip in some way. If it's new out the box you may have to call Parallax customer service.

    A couple of things first, are you using X1 or the prototype area to connect your components

    Secondly try this to see if pressing the micro switch has any effect on the inputs

    DIRS=%0000000000000000

    Main:

    DEBUG HOME,BIN16 INS
    PAUSE 500

    GOTO main

    move the switch from P0 to P15 and run the test with each pin

    Jeff T.
  • crsahicrsahi Posts: 4
    edited 2008-01-27 01:06
    Jeff,

    I ran your current suggestion. Pins 0,1,2,4,9,11,12 work. The rest don't. I think you are right, the chip is faulty. I have to get it replaced.

    Thanks a lot for all of your help.

    All the best,

    Carl
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-01-29 15:45
    Carl,

    Have you contacted Tech Support to have your module tested yet? You should know that each and every BASIC Stamp Module is fully tested before shipping. This includes all I/O lines. I would suspect there may be some damage here somewhere. Whether it is the BASIC Stamp Module or the Super Carrier Board is not clear at this time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.