Help with internal pull-up resistors/inputs and shorting pins
danh
Posts: 7
Hi all, first post here. I've had a problem lately where I've fried a couple SX28's so I'm here to ask for all your help.
I'm using RA0-3 as input pins reading the state of a 4-pin BCD rotary switch. The data sheet for the switch is here, if you're at all interested:
rocky.digikey.com/WebLib/C%26K%20Components/Web%20Data/CRD%20Series.pdf
I soldered the two "C" common pins to ground, and I've got the other 4 pins connected to port A pins 0-3. I've configured port A as input pins, and enabled the internal port A pullup resistors.
When I run my code, everything seems to be working fine. I can cycle through the switch settings and I see the values reflected on the input pins when debugging. The problem seems to occur after a longer period of time, say greater then 4 hours. I return to my circuit to find the SX28 now has a nice little brown color in its mid section and a nice crack at pin 7 (same for both failures) which is RA1.
Basically it appears that at some point, a short occurs on RA1 (pin 7) and really heats up the chip. For all I know, it could be another pin, but the crack right at that same point both times seems suspicious. Is there any way the internal pullup resistors could somehow get disabled while the code is running? I'm going to try disabling the internal pull ups and using external ones. Are there any "gotcha's" to watch out for when using the internal pullups?
As far as I can tell, there's no short in my soldering/wiring, which is also backed up by the fact that the failure doesn't occur right away. Also, I'm pretty sure that the switch circuit shorts at some point, because when I leave the switch setting at '0' (no connections) the failure never occurs.
By the way, I'm also using Port B to control an LCD and RC.7 to control a Relay.
Thanks for any tips and help you can offer! Let me know if you need more info...
-Dan
I'm using RA0-3 as input pins reading the state of a 4-pin BCD rotary switch. The data sheet for the switch is here, if you're at all interested:
rocky.digikey.com/WebLib/C%26K%20Components/Web%20Data/CRD%20Series.pdf
I soldered the two "C" common pins to ground, and I've got the other 4 pins connected to port A pins 0-3. I've configured port A as input pins, and enabled the internal port A pullup resistors.
When I run my code, everything seems to be working fine. I can cycle through the switch settings and I see the values reflected on the input pins when debugging. The problem seems to occur after a longer period of time, say greater then 4 hours. I return to my circuit to find the SX28 now has a nice little brown color in its mid section and a nice crack at pin 7 (same for both failures) which is RA1.
Basically it appears that at some point, a short occurs on RA1 (pin 7) and really heats up the chip. For all I know, it could be another pin, but the crack right at that same point both times seems suspicious. Is there any way the internal pullup resistors could somehow get disabled while the code is running? I'm going to try disabling the internal pull ups and using external ones. Are there any "gotcha's" to watch out for when using the internal pullups?
As far as I can tell, there's no short in my soldering/wiring, which is also backed up by the fact that the failure doesn't occur right away. Also, I'm pretty sure that the switch circuit shorts at some point, because when I leave the switch setting at '0' (no connections) the failure never occurs.
By the way, I'm also using Port B to control an LCD and RC.7 to control a Relay.
Thanks for any tips and help you can offer! Let me know if you need more info...
-Dan
Comments
It sounds to me like somehow the RA pins are getting set to outputs and set high.
You can put 220 ohm resistors between the RA pins and the switch to protect the pins.
Does the problem occur if you stay in the debugger ?
Can you attach your code ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap 4-digit LED display with driver IC·www.hc4led.com
COMING SOON "SD DATA LOGGER" www.sddatalogger.com
"I reject your reality, and substitute my own." Mythbusters
·
Here's my source, its not the most efficient or elegant...I'll put that out there right now
So just because a hot spot and a crack developed near pin 7, that wouldn't necessarily mean that the heat was due to pin 7 functionality; it could be from any part of the silicon that happens to be embedded near pin 7.
How are you driving the relay? Is there any chance that inductive voltage spikes are making their way back into the SX and zapping something?
David
Would be interesting to note if the fact that the crack appears at that pin is coincidence...
One thing I will add though, the one time I saw this occur with my debug setup, it only occured when I had my BCD rotary switch set to the 0xF setting (all pins connected), and when I switched it to the 0x0 setting (no pins connected) the problem immediately went away. By this I mean, the chip got stinking hot all of a sudden and switching to 0x0 (no pins connected) the chip cooled right down. This makes me pretty confident that the problem lies with the switch circuit/pin configuration.
Thanks for the input!
Why not connect the two switch common pins through a 1k or so resistor to ground, then run the circuit with a voltmeter hung across the resistor. Ordinarily you'd expect practically no voltage across the resistor, so if you suddenly get a voltage, then the problem has to be the port a configuration. Plus, the resistor should keep you from frying yet another SX.
As far as I know, the internal pullup resistors are far too small to cause any serious power-handling problem.
David
·· Can you post a connection diagram for the BCD Switch showing how you have it connected just to be sure?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Is there any way port direction could get messed with if I got stuck in an infinite loop (wait loop for LCD?) or if I went accross a page boundary when I shouldn't? I'm really racking my brain here.
Thanks for all the tips so far guys! I can't actually try anything out right now because I my last SX, but I have more on order, should be here soon!
-Dan
·· The diagram looks fine.· Are you positive on the wiring of the BCD switch on the board?· Is it a breadboard or PCB?·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
a) over a period of time, say more than 3 or 4 hours
b) when 1 or more of the switch lines are connected, for example, I can't reproduce this if the switch is set to the '0' setting, or all open
On one occasion while debugging, I was able to reproduce the issue by letting the circuit run over night on the '0' setting, then I switched to the 0xF setting on the BCD switch and the chip immediately got real hot, as if the inputs had been switched to outputs. I switched back to the 0 setting and to fix this. Stopped execution, reprogrammed the chip and it didn't occur again. I'm just stumped as to whats going on here.
I'll also mention that I bought these few chips a while back, maybe 5 or 6 years ago. There weren't any known issues of this flavor back then were there? These specific chips were Scenix branded, not the newer Parallax branded ones.
Some years ago there were some pirated copies (yet properly marked Scenix) of the SX28 floating around that worked improperly; perhaps they were "retrieved rejects". We got caught by that, but it seems to me their problems were more severe than what you are experiencing.
Just a thought....
Cheers,
Peter (pjv)
Not that this is any help but i had a similiar issues with a pakv chip which is a sx28. The chip· produces pwm on 8 pins and i was was told the chip was addressable and i had to use pins 20-24(if i remember coreectly). Well when i hooked up the adderss pins to tell the chip that it was the #1 chip it got fried also. It seems to me that there is something that is not right with connecting the pins together to create addresses. I scrapped the idea of using that chip because it was $25 a pop(play on words) and after burning out a couple i decided it was to expensive. I have to agree with one of the guys that you may have to use the 220ohm resistors inline with the bcd encoder.
Hey Guys do you have to tell the pins to stay low or it is assumed that they will be on power up anyway. I would think the·pins would have to be low to read on the pins(correct me if i'm wrong) especially the encoder.
Just trying to understand your problem since it relates to problems i have had before. The chips i was getting were Ubicom.
Kevin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Education And Experience Teaches Knowledge Not Arrogance ! (Unknown)
The Only Stupid Question Is The One Not Asked ! (Unknown, of coarse this is something that i would say)
Do Not Burn The Bridge That Has Brought You Forth You May·Need To Journey Back ! (Chinese)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax