Shop OBEX P1 Docs P2 Docs Learn Events
P8X32A Accessing the DIP Pins. — Parallax Forums

P8X32A Accessing the DIP Pins.

crispycretcrispycret Posts: 5
edited 2014-07-12 18:08 in Propeller 1
I'm trying to light up LED's on a breadboard, but can't apply power to the J1-J40 Pins. Using the High() function i can set pins on the chip, but I can't access the J Pins this way.

Anyone Have a solution? In C, I have no experience in STAMP.

http://www.parallax.com/sites/default/files/downloads/40000-P8X32A-QuickStart-Doc-v1.0.pdf

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2014-07-12 15:47
    crispycret,
    welcome to the forums.
    unfortunately i am not sure what you are asking. i read the pdf at the link.
    perhaps you could explain further including posting your code.
    its best to go to the advanced section for this. you can enclose your code between <code> and </code> tags where < and > are replaced with the squarebrackets. alternatively zip up you files and attach them.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-07-12 16:12
    In C, I have no experience in STAMP
    The Stamp MCU's use PBasic, not C or Spin. The Quickstart is a Propeller based Product which is usually programmed either with Spin Tool or SimpleIDE. Are you using either of these? Also, as Cluso99 pointed out, your question is a bit unclear. Please clarify and post a sample of the code you are using and if possible a schematic of your current setup.
  • crispycretcrispycret Posts: 5
    edited 2014-07-12 16:30
    I am using SimpleIDE and am programming in C. Sorry for being unclear im new to embedded programming so I am unsure of what im trying to do as well.


    I am using the P8X32A device first of all. Now using this PDF guide; on the last page there is a diagram that shows the device blueprint. The top rectangle area labeled J1 is the area where you can connect components (LEDs). The Product Page shows the actual device.

    I have an LED light connected in the J I/O pins locations 1 and 2. Now i need to active these two pin locations to give power to LED so it lights up.

    I activate one of the builtin LEDS (p22).
    #include "simpletools.h"
    
    int main(void)
    {
        while(1)
         {
             high(22);
          }
          return 0;
    }
    


    Resources:
    http://www.parallax.com/sites/default/files/downloads/40000-P8X32A-QuickStart-Doc-v1.0.pdf
    http://www.parallax.com/product/40000\
  • AribaAriba Posts: 2,690
    edited 2014-07-12 17:15
    J1 and J2 are connected to P0 and P1 of the Propeller. To light up the LED you need to set one Pin to Low and the other to High.
    #include "simpletools.h"
    
    int main(void)
    {
        while(1)
         {
             high(0);
             low(1)
          }
          return 0;
    }
    
    Have you a resistor in serie with the LED? Depending on the forward voltage of the LED you need a resistor of 50..200 Ohm to limit the current through the LED. Maybe you need to swap the High on Low on the pins, if the LED is connected in reverse.

    Andy
  • crispycretcrispycret Posts: 5
    edited 2014-07-12 17:36
    Ariba wrote: »
    J1 and J2 are connected to P0 and P1 of the Propeller. To light up the LED you need to set one Pin to Low and the other to High.
    #include "simpletools.h"
    
    int main(void)
    {
        while(1)
         {
             high(0);
             low(1)
          }
          return 0;
    }
    
    Have you a resistor in serie with the LED? Depending on the forward voltage of the LED you need a resistor of 50..200 Ohm to limit the current through the LED. Maybe you need to swap the High on Low on the pins, if the LED is connected in reverse.

    Andy

    Thanks a lot everyone, after swapping around the LED Ariba's code worked for me.
  • crispycretcrispycret Posts: 5
    edited 2014-07-12 17:37
    Now on to placing the LED on a bread board. This should make things fun.
  • SawmillerSawmiller Posts: 276
    edited 2014-07-12 18:08
    On the quick start you have a string of holes labeled vss
    If you solder a socket or three there you can use a jumper wire to your breadboard for the ground (or low) leg of your led circuit. That way you only have to go high on the one pin.

    BTW I replied to your other post as to the touch pads
Sign In or Register to comment.