In general terms, if you have a chip and you power it with 3.3 volts, best not to put any more than 3.3V on any pin. Or less than 0V for that matter.
Same goes for a chip powered from 5V - keep the voltages 0V to 5V.
Oh, and if you do put 9V onto a chip, sooner or later someone is going to mention "magic smoke", so to explain this, it is actually a myth that silicon chips run on silicon. They actually run on magic smoke, which sits inside the chip, and everything works fine unless you put too many volts on a chip, in which case the magic smoke comes out of the chip and it doesn't work any more.
Oh, and if you do put 9V onto a chip, sooner or later someone is going to mention "magic smoke", so to explain this, it is actually a myth that silicon chips run on silicon. They actually run on magic smoke, which sits inside the chip, and everything works fine unless you put too many volts on a chip, in which case the magic smoke comes out of the chip and it doesn't work any more.
Don't worry, last April (I think towards the begining of the month IIRC) SparkFun came out with a kit to put "magic smoke" back into chips. It must be a popular item because I can never find it in stock.
Yeah you guys are right. After all I worked for a month, but I dont see what could be wring with my software, I even you the same code and ion for some switches wired in the example book. But looking at my code i could see some flaws. Thanks for the help I appreciate it.
But unfortunatkey I was wrong again. I had everything exact to what MglO2 said, execpt I used the ground on a different board instead of the propeller one. But the propeller board get the power it needs from the board I used the ground for.
Ok, 0V is often considered as "ground" and in some cases might be physically connected to "ground", eg the ground stake used to earth mains wiring.
Take a 9V battery and connect the negative to a ground stake, which can be a real metal stake hammered into the ground. If you measure the volts on the + pin you would measure 9V.
Now, connect another 9V battery in series with the first one. Now you measure 18V on the second one, right?
Now, instead of connecting the ground stake to the - of the first battery, connect it to where the - of the first battery is joined to the + of the second battery. With reference to "ground", the + of the second battery is plus 9V. And with reference to ground, the negative of the first battery is minus 9V.
Nothing really changed in a way - there is still 18V across the two batteries. But you are measuring the voltages from a different reference point.
You probably don't have to worry about negative volts with digital circuits, but they do come up in analog circuits like amplifiers.
You connected the UP/DOWN/LEFT/RIGHT/BUTTON pins of the paddle to the propeller ... let's say pins 0-4. All those pins are also connected to 3.3V via let's say a 1k-10k resistor. (as described in my previous post and confirmed to be understood ;o)
You can now use INA[4..0] to watch these pins in your program.
Furthermore you attached some LEDs to some other propeller pins ... let's say pins 8-12. Anode to pin, Kathode via resistor to ground. You need to set the according pins to output mode in your program:
DIRA[12..8]:=%11111
Switch on all of them:
OUTA[12..8]:=%11111
Switch off all of them:
OUTA[12..8]:=%00000
Display the status of the paddle:
OUTA[12..8]:=INA[4..0]
No, best to keep negative volts off your experimenter board altogether. Actually, best to keep all high voltages off the board. I like to have a regulator in a separate box and the only volts that come to my experimenter board are 0V and 3.3V. That minimises the risk of accidentally touching wires to high voltages.
Oh, and this discussion might be relevant when you say that you were powering from one board to another. Are the 0Vs connected between those two boards?
Another thing that can be extremely handy is if you can take a photo of your setup. Many times others can spot a fault much easier than trying to describe it. Do you have a digital camera?
If so, you can insert pictures into your forum posts.
Yes I have two Breadboards, and ive actually read that Wikipedia article a few times, but I do apprcieat the help so much! If I'm ever able to take pics, I will get in my computer and start throwing up some pics I think that will help! That's a bunch! I really do appreciate it! Oh yes the 0vs between the two boards are connected.
So I entered the program exactly and the LEDs just turned off and went off, so added a repeat command and a waitcnt(clkfreq+cnt) between each line so I could see what's going on. The LEDs are flashing, but don't appear to mimic the state of my joypad. I will recheck my program and remove the extras I added, but it still appears to be inactive.
NO NEVERMIND IT WORKED!!!!!!! thanks a ton, you helped out so much. I would press anything on the joystick and the LEDs stay lit up instead of flashing. Im very Understanding this subject now, thanks so much!
You can also make the LEDs flash ... it's your code that switches em on and off, so it's only a matter of how to change your current code to make it flashing.
Glad to hear that it finally worked out for you. Have fun, but let the propeller alive ;o)
Don't worry, I will. My propeller is such a good friend, so I need it. Thanks a bunch and yes I am hooked. Like the first time I played sonic.
Well I have six sonic shirts, a sonic snuggie, a sonic mug, plus I dress up as sonic for halloween, so I thi I will get six or seven propes and wire them together!
Thanks so frekin much to everyone who helped, I learned just as much about electronics as I did with a month of my $70 learning lab! Thanks a bunch to every one I can finally use the propeller for good and apply to some speed shoes or something, but egg man won't get this one!
Comments
In general terms, if you have a chip and you power it with 3.3 volts, best not to put any more than 3.3V on any pin. Or less than 0V for that matter.
Same goes for a chip powered from 5V - keep the voltages 0V to 5V.
Oh, and if you do put 9V onto a chip, sooner or later someone is going to mention "magic smoke", so to explain this, it is actually a myth that silicon chips run on silicon. They actually run on magic smoke, which sits inside the chip, and everything works fine unless you put too many volts on a chip, in which case the magic smoke comes out of the chip and it doesn't work any more.
http://en.wikipedia.org/wiki/Magic_smoke
I'm glad your propeller chip still has all its smoke intact!
If you did wire it up exactly as MagIO2 suggested then you had something wrong with your software.
I too was pained by your discription of experimenting with voltages that could easily kill a Prop.
MagIO2 knows what he's talking about. You might not have understood his directions but the fault wasn't MagIO2's if you didn't.
I'd strongly suggest following his advice.
Don't worry, last April (I think towards the begining of the month IIRC) SparkFun came out with a kit to put "magic smoke" back into chips. It must be a popular item because I can never find it in stock.
Well, I'm glad you asked!
Ok, 0V is often considered as "ground" and in some cases might be physically connected to "ground", eg the ground stake used to earth mains wiring.
Take a 9V battery and connect the negative to a ground stake, which can be a real metal stake hammered into the ground. If you measure the volts on the + pin you would measure 9V.
Now, connect another 9V battery in series with the first one. Now you measure 18V on the second one, right?
Now, instead of connecting the ground stake to the - of the first battery, connect it to where the - of the first battery is joined to the + of the second battery. With reference to "ground", the + of the second battery is plus 9V. And with reference to ground, the negative of the first battery is minus 9V.
Nothing really changed in a way - there is still 18V across the two batteries. But you are measuring the voltages from a different reference point.
You probably don't have to worry about negative volts with digital circuits, but they do come up in analog circuits like amplifiers.
You connected the UP/DOWN/LEFT/RIGHT/BUTTON pins of the paddle to the propeller ... let's say pins 0-4. All those pins are also connected to 3.3V via let's say a 1k-10k resistor. (as described in my previous post and confirmed to be understood ;o)
You can now use INA[4..0] to watch these pins in your program.
Furthermore you attached some LEDs to some other propeller pins ... let's say pins 8-12. Anode to pin, Kathode via resistor to ground. You need to set the according pins to output mode in your program:
DIRA[12..8]:=%11111
Switch on all of them:
OUTA[12..8]:=%11111
Switch off all of them:
OUTA[12..8]:=%00000
Display the status of the paddle:
OUTA[12..8]:=INA[4..0]
Have you got a breadboard? http://en.wikipedia.org/wiki/Breadboard
Oh, and this discussion might be relevant when you say that you were powering from one board to another. Are the 0Vs connected between those two boards?
Another thing that can be extremely handy is if you can take a photo of your setup. Many times others can spot a fault much easier than trying to describe it. Do you have a digital camera?
If so, you can insert pictures into your forum posts.
Glad to hear that it finally worked out for you. Have fun, but let the propeller alive ;o)
Well I have six sonic shirts, a sonic snuggie, a sonic mug, plus I dress up as sonic for halloween, so I thi I will get six or seven propes and wire them together!