Shop OBEX P1 Docs P2 Docs Learn Events
Pins After 20 not working? — Parallax Forums

Pins After 20 not working?

TylerSkylerTylerSkyler Posts: 72
edited 2012-02-20 15:59 in Propeller 1
Hi All! I am using the Parallax Propeller Semiconductor. I was playing around with it and I found something very odd. I'm using this code to turn on and LED:
PUB MAIN
dira[0] := 1
  repeat
     outa[0] := 1

With this the LED turns on and All is good in the world. But if I switch put the positive of the LED to a higher pin such as, 30 as in:
PUB MAIN
dira[30] := 1
  repeat
     outa[30] := 1

Nothing happens. Why would this be? Are the high pins set for output differently? I'm sure it will be a simple fix and i'll feel stupid briefly then move on with my life. All help is as always appreciated!

Thanks,

Tyler

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-02-20 14:46
    Are you sure you're not confusing pin number (i.e. 1-40 or 1-44) with port number (i.e. 0-31)? P30, BTW, is the main serial output pin. Also, be sure to put a resistor in series with your LED to prevent excessive current draw from the Propeller pin.

    -Phil
  • TylerSkylerTylerSkyler Posts: 72
    edited 2012-02-20 15:59
    Thanks! I knew i was missing something...basic.
Sign In or Register to comment.