Shop OBEX P1 Docs P2 Docs Learn Events
SX-48 pin state at power up — Parallax Forums

SX-48 pin state at power up

WiltonWilton Posts: 11
edited 2007-02-13 20:57 in General Discussion
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
·

Comments

  • Sparks-R-FunSparks-R-Fun Posts: 388
    edited 2007-02-09 02:59
    Wilton,

    Can you replicate this behavior on a breadboard using only a powered SX chip and the resistors mentioned?

    - Sparks
  • WiltonWilton Posts: 11
    edited 2007-02-09 14:43
    No, in fact, replacing the CPU a second time made the problem go away.· Although I don't know the mechanism, it would appear that the pin had been damaged by the circuitry.· Why that damage would exhibit itself in a 10 K pull up that could not be turned on or off I don't know.· Neither do I know what could have caused the damage.· I am adding a 1K series resistor to the design, which will isolate the pin from the load and hopefully prevent the possibility of this recurring.

    Thanks
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-02-09 17:43
    Wilton,

    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
  • WiltonWilton Posts: 11
    edited 2007-02-09 21:31
    The pin is driving pin 1 of an LTC1871-7 SMPS controller, with a 47K resistor to ground so it can't float high before the CPU is initialized. The SMPS chip is powered by 28 VDC, but this is an input with a threshold of 1.25 V and a allowed range of 0 - 7 Volts.· It should have no contact with the higher voltage or inductive energy elsewhere in the circuit.· It is really just a rather wide range CMOS input.· That's why the whole thing was so surprising to me.· I've done embedded hardware and software development for about 30 years and thought I knew most of the pot holes.· The board was out of my hands for a couple of days and some stuff got messed up (it was returned to me for repairs), so I wasn't too surprised at the first CPU failure.· However after replacing the SMPS controller and then the CPU, I didn't expect a re-run.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-02-09 23:33
    Wilton, is this the device you're referring to? Which pin are you connected to?

    http://www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1003,C1042,C1031,C1115,P2155,D1403

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • WiltonWilton Posts: 11
    edited 2007-02-12 02:23
    Yes, that's the device.· I'm connected to the RUN pin on the SMPS controller, and RA2 on the SX-48
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-02-12 18:35
    Wilton,

    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
  • WiltonWilton Posts: 11
    edited 2007-02-12 18:45
    No, in this case the only other thing on the net with the SX pin and SMPS pin is a 47K resistor to ground which is there to keep the SMPS off until the SX-48 gets properly initialized and can control the pin.

    Wilton
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-02-13 15:43
    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
  • WiltonWilton Posts: 11
    edited 2007-02-13 20:03
    Yes, I'm at a total loss, particularly since It happened to two CPUs.· On the other hand, the third one worked fine, and the board is in the customer's hands.· At this point I'm ready to shelve the issue and move on, with an eye open for any recurrance.· I did·add a 1000 ohm resistor in series, which should provide a fairly good amount of protection against future mishaps.

    Wilton
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-02-13 20:57
    Wilton,

    I’m sorry we were unable to help you identify the source of the problem. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.