SX-48 pin state at power up
Wilton
Posts: 11
This is driving me crazy.· I have a revision to a board using SX-48.· RA2 controls a PS that can't be turned on until other things are initialized.· I have a 47K resistor to ground to insure that it doesn't float high before being configured.· I have two of these boards.· One works properly.· The other fails as noted before.· I replaced the CPU without any change.· I inserted a 10 K resistor in series with the pin, which gives some isolation and more testing options.· To prevent improper operation the 47K resistor was shorted.
To summarize, as configured for this test, RA2 goes through 10K to ground.· I would expect the chip to come up with RA2 low (held down by the 10K resistor, in an input state with no pull-up).· Instead, it is drifting around in the neighborhood of 2.5 V, as if a rather unstable pull up of aproximately 10K existed.
I tried a test of the following code at the reset vector:
··clr·ra···;ZERO port A, B, D, E outputs
··clr·rb
··clr·rd
··clr·re
· mov···· W,#$1F···;Set Mode to 1Fh to set direction bits
··mov·M,W
··mov···· !rd,#0··;Start if Test Cide
test1··mov···· !ra,#$FF·;Dir = IN
··call·testwait
··mov·M,#$1E··;Set pull up options
··mov·!ra,#0··;Pull up = on
··call·testwait
··mov·!ra,#$FF·;Pull up = off
··call ·testwait
··mov···· M,#$1F··;Set Mode to 1Fh to set direction bits
··mov·!ra,#0··;Dir = out
··call·testwait
··mov···· ra,#$FF··;Data = 1s
··call·testwait
· clr···· ra··;Data = 0s
· call··· testwait
··jmp···· test1
testwait······· clr···· rd
testwait2·decsz·rd
··jmp···· testwait2
··ret
Again I expected the output to be:
···· 0 when the pins was switched to input,
···· about 1.7 V when the pullup was added,
···· 0 when it was removed,
···· 0 when it was switched to output,
···· +5 when changed to a 1
···· 0 when it was switched back low
and then repeat.
In reality what happened was that the first three states were all about 2.5 V, the last three were as expected.· It would appear that the pull up switching was not working and a permanent pull-up of about 10K was present.
Am I missing something here?
Having a second unit that works correctly suggests a bad chip, having replaced the chip with no change suggests that it isn't that simple.
Wilton Helm
Embedded System Resources
·
To summarize, as configured for this test, RA2 goes through 10K to ground.· I would expect the chip to come up with RA2 low (held down by the 10K resistor, in an input state with no pull-up).· Instead, it is drifting around in the neighborhood of 2.5 V, as if a rather unstable pull up of aproximately 10K existed.
I tried a test of the following code at the reset vector:
··clr·ra···;ZERO port A, B, D, E outputs
··clr·rb
··clr·rd
··clr·re
· mov···· W,#$1F···;Set Mode to 1Fh to set direction bits
··mov·M,W
··mov···· !rd,#0··;Start if Test Cide
test1··mov···· !ra,#$FF·;Dir = IN
··call·testwait
··mov·M,#$1E··;Set pull up options
··mov·!ra,#0··;Pull up = on
··call·testwait
··mov·!ra,#$FF·;Pull up = off
··call ·testwait
··mov···· M,#$1F··;Set Mode to 1Fh to set direction bits
··mov·!ra,#0··;Dir = out
··call·testwait
··mov···· ra,#$FF··;Data = 1s
··call·testwait
· clr···· ra··;Data = 0s
· call··· testwait
··jmp···· test1
testwait······· clr···· rd
testwait2·decsz·rd
··jmp···· testwait2
··ret
Again I expected the output to be:
···· 0 when the pins was switched to input,
···· about 1.7 V when the pullup was added,
···· 0 when it was removed,
···· 0 when it was switched to output,
···· +5 when changed to a 1
···· 0 when it was switched back low
and then repeat.
In reality what happened was that the first three states were all about 2.5 V, the last three were as expected.· It would appear that the pull up switching was not working and a permanent pull-up of about 10K was present.
Am I missing something here?
Having a second unit that works correctly suggests a bad chip, having replaced the chip with no change suggests that it isn't that simple.
Wilton Helm
Embedded System Resources
·
Comments
Can you replicate this behavior on a breadboard using only a powered SX chip and the resistors mentioned?
- Sparks
Thanks
Perhaps looking at the source of the problem will prevent any future issues. What exactly is the I/O pin driving? If it is any kind of inductive device there should be ample protection from EMF kickback. Usually this is done by placing a diode in reverse bias across the load. If you have one, is it possible that the diode is already damaged and not working on this board? Of course, you should always be sure current draw from the pin is within limits. If you’re using a transistor to drive the load the current it draws will be proportional to the current it is driving.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
http://www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1003,C1042,C1031,C1115,P2155,D1403
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
·
Is there feedback from other sources coming into that pin or is the SX pin the only thing connected to that pin? I noticed in their example schematic there are multiple sources of voltage to that pin.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Wilton
·
It is baffling. Since I have never seen this happen before I was trying to determine if that chip could’ve caused some sort of voltage feedback into the SX I/O pin. It appears not, although I really don’t know much about the chip.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Wilton
I’m sorry we were unable to help you identify the source of the problem. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support