Shop OBEX P1 Docs P2 Docs Learn Events
Help from an admin or anyone familiar with the PD board and the BS2p40 chip? — Parallax Forums

Help from an admin or anyone familiar with the PD board and the BS2p40 chip?

kingspudkingspud Posts: 128
edited 2006-07-04 02:20 in BASIC Stamp
Hello all,

This is a continuation from a previous post which basically asks...

Can anyone please send me some code for the BS2p40 chip to flash two LED's on the Professional Development Board and have them connected to one main port and one aux port!

I just got my 40 chip and I thing·it maybe a bad one or I am doing something wrong on the hookup!

I need some code that can test each port on the main and aux sides that will flash some LEDs to prove the chip is working correctly!

Also I need the correct hookup instructions for the code!

The chip identifies but thats it.

Thanks in advance!

Joe

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-06-26 15:14
    Joe,
    ·· In your previous thread (linked below) members trying to help you asked you questions in an attempt to help you in your original thread.· Please supply the requested information so we·can try·to help you further.· One other thing you can do is check out the StampWorks manual (linked below) which contains examples of blinking an LED on the PDB.· Your code would essentially be:
    DO
      HIGH 0
      PAUSE 500
      LOW 0
      PAUSE 500
    LOOP
    

    You can connect the P0 from the BASIC Stamp to the LED connection on the PDB.

    http://forums.parallax.com/showthread.php?p=593255

    http://www.parallax.com/detail.asp?product_id=27220

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com


    Post Edited (Chris Savage (Parallax)) : 6/26/2006 3:31:00 PM GMT
  • kingspudkingspud Posts: 128
    edited 2006-06-26 15:21
    This is why I did this new post... I am asking for a test code and setup on the PDB.
  • kingspudkingspud Posts: 128
    edited 2006-06-26 17:41
    I did the exact code you gave me and I got no response!



    DO
      HIGH 0
      PAUSE 500
      LOW 0
      PAUSE 500
    LOOP
    


    Is there something else I can try or should I send it back???

    Joe
  • kingspudkingspud Posts: 128
    edited 2006-06-26 17:47
    Maybe I didn't phrase the question clearly enough!

    I would like some detailed code and setup instructions to hook up two LEDs on the PDB to use two ports; the main port side and the Aux port side!

    I don't know where the hookups for the AUX side are?

    Example; hook wire to RC7 or P15 to R1 to LED to Ground...

    and the code to go with it!

    Joe
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-06-26 18:09
    Joe,

    ·· There is a table in the PDB Manual which explains where each pin on the BS2p40 goes to on the board.· Please see that manual and remember you cannot have an SX-28 plugged into the board at the same time.

    http://www.parallax.com/dl/docs/prod/boards/ParallaxPDB.PDF

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • T ChapT Chap Posts: 4,223
    edited 2006-06-26 18:27
    to use the p40 pins you have to specify what side to use in every instance, and after that statement it will use that "side" till you make a new statement to change it back. there are 16 pins on each side 0-15. you must first specify MAINIO or AUXIO before making a pin do something on a P40

    assuming you have a resistor on pin 0 on the main side P0 going to an LED, whereas the LED is connected to VSS on the other side, and, you have a reistor connected on pin 0 off the AUX side(pin21), X0, going to the LED and the other side of the LED going to VSS:

    You should specify variables for pins using MAINIO and AUXIO to tell the pins what they are connected to:



    MAINIO

    MainSidePin0 VAR OUT0

    AUXIO

    AuxSidePin0 VAR OUT0

    Main:

    MAINIO
    MainSidePin0 = 1
    Pause 500
    AUXIO
    AuxSidePin0 = 1
    Pause 500
    MAINIO
    MainSidePin0 = 0
    Pause 500
    AUXIO
    AuxSidePin0 = 0
    Pause 500

    goto main
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-06-26 18:49
    Hello,

    ·· Just to clarify, if you do not specify which bank of I/O MAIN is assumed.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • kingspudkingspud Posts: 128
    edited 2006-06-26 21:30
    This is perfect!!
    I will test this out tonight!!!
    thanks
    Joe
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2006-06-26 22:59
    Here is a simple hookup to flash two LEDs, one in MAINIO and the other in AUXIO:

    Code as follows:

    attachment.php?attachmentid=42248

    ' {$STAMP BS2p}
    ' {$PBASIC 2.5}
    
    DO
      HIGH 0
      AUXIO
      HIGH 0
      PAUSE 1000
      LOW 0
      MAINIO
      LOW 0
      PAUSE 1000
    loop
    



    Hope this helps!

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke
    Parallax Tech Support

    RClarke@Parallax.com
    636 x 461 - 190K
  • kingspudkingspud Posts: 128
    edited 2006-06-26 23:05
    You people are so incredible!!

    That is why I love this forum!!!

    Thanks to everyone for all their help!!!

    I will be having some fun testing tonight!!!!

    Joe
  • kingspudkingspud Posts: 128
    edited 2006-07-04 02:17
    Hello everyone,

    Just some clarification... I tried the following code and it worked!· So I know the chip is ok!· thanks!!!

    '·{$STAMP·BS2p}
    '·{$PBASIC·2.5}

    DO
    ··HIGH·0
    ··AUXIO
    ··HIGH·0
    ··PAUSE·1000
    ··LOW·0
    ··MAINIO
    ··LOW·0
    ··PAUSE·1000
    loop

    BUT.....................

    When I tried the next program I couldn't get it to work...

    MAINIO

    MainSidePin0 VAR OUT0

    AUXIO

    AuxSidePin0 VAR OUT0

    Main:

    MAINIO
    MainSidePin0 = 1
    Pause 500
    AUXIO
    AuxSidePin0 = 1
    Pause 500
    MAINIO
    MainSidePin0 = 0
    Pause 500
    AUXIO
    AuxSidePin0 = 0
    Pause 500

    goto main

    __________________

    Can someone please explain to me the port configurations on the BS2p40 chip.

    Please see attachment of the p40 chip layout!!!

    Can someone tell me the matching ports on the BS2p40 chip to the matching ports on the Professional Development Board?

    I see RC...· and RB... and RA... but I don't·know what ports these are on the BS2p40 chip?

    I know I have 15 mainIO ports and 15·AuxIO ports but what does that mean when someone says connect P21 to LED etc...?·

    I would like to get the above code to work but need help on connecting the wires and understanding all the new ports available to me.

    thanks

    Joe
  • kingspudkingspud Posts: 128
    edited 2006-07-04 02:20
    Hello again,

    To add to the above comment...

    If you look at the chip pdf file you will see P0 to P15 and X0 to X15...

    These are what I am trying to match the RC, RB, and RA·ports on the PDB board and are these the AUXIO ports?

    thanks again,

    Joe
Sign In or Register to comment.