PDA

View Full Version : Damaged i/o pin part...again..different thread!



KamPutty
05-16-2008, 08:13 AM
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[23]~~
repeat
!outa[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*

Cluso99
05-16-2008, 09:43 AM
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) ?

hinv
05-16-2008, 10:48 AM
Is your LED in backwards?

KamPutty
05-16-2008, 11:47 AM
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 Jakacki
05-16-2008, 12:03 PM
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.
05-16-2008, 06:44 PM
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

Agent420
05-16-2008, 08:06 PM
^ 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 ;)