Shop OBEX P1 Docs P2 Docs Learn Events
Damaged i/o pin part...again..different thread! — Parallax Forums

Damaged i/o pin part...again..different thread!

KamPuttyKamPutty Posts: 48
edited 2008-05-16 12:06 in Propeller 1
Hi all,

Got my usb prop last week, finally got time and started to get it up...

Here is my code

{{ Output.spin }}

PUB Toggle
  dira[noparse][[/noparse]23]~~
  repeat
    !outa[noparse][[/noparse]23]
    waitcnt(3_000_000 + cnt)




Looks just like the demo, because it is!

Okay, I cannot get pin 23 to work on the LED!!! I have validated all the LED wiring by just using a different i/o pin, and all works. I just cannot get pin 23 to work!

My setup is very simple:

9v to pin VIN (pin 12)
Ground to VSS (pin 9)
Ground to VSS (pin 29)
3.3 out from VDD (pin 32)

This is my "hello world" program...the very first one and pin 23 does not work!
Is this a defective usb-prop?...

Any thoughts?

~Kam (^8*

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2008-05-16 01:43
    What do you have connected to P23 ?
    What board do you have (Demo Board) ?
    How is your LED connected (via resistor & value to gnd/+3v3) ?
  • hinvhinv Posts: 1,253
    edited 2008-05-16 02:48
    Is your LED in backwards?
  • KamPuttyKamPutty Posts: 48
    edited 2008-05-16 03:47
    The LED works fine, I can drive it with another pin just fine.

    I'm using the USB Stick.

    From Pin #28 (P23) ---> LED +
    LED - ---> 100ohm res
    res ---> ground

    Any thoughts?

    ~Kam (^8*
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2008-05-16 04:03
    Just a quick thought. If you have set the direction of the pin from another cog (maybe the main method) then you will have problems. You said "just like the demo" but is it? Perhaps posting the full source and circuit will help (it will). P28 is right next to VSS, maybe it's shorted?

    *Peter*
  • Christof Eb.Christof Eb. Posts: 1,162
    edited 2008-05-16 10:44
    Hi Kam,

    just thoughts:

    1. Indentation is very essential in spin. -?

    2. You could connect your LED + R between +3.3V and the pin to check if (or which) pin is switched to output.

    3. Portnumbers and pinnumbers??

    Good luck.

    Christof
  • Agent420Agent420 Posts: 439
    edited 2008-05-16 12:06
    ^ Regarding all that, if it's a case of pin testing, I would simply try to turn the pin on and not use any fancy inverted output blinky loop.· KISS troubleshooting [noparse];)[/noparse]
    ·
Sign In or Register to comment.