As I wrote in the other thread which you recently replied to, with the
pins configured as inputs (or nothing) and nothing connected, you can
read almost 3.3v with a meter on those pins. This seems alarming,
however, they behave properly. If I ground one of these pins, nothing
shorts out, and it is read as a logic 0. If you leave it
disconnected, it reads a logic 1...my theory here is that there must
be a pull-up resistor holding those pins high. The pull-up resistor
must be high enough that it will not let the chip source any serious
amount of current, so it should be safe to hook up to your equipment
(provided you realize that this voltage may be present, and have
designed accordingly). When I use these as inputs, I have the pins
connect to ground through pushbutton switches...works great, very
reliable. As outputs I use them for everything from logic to
current-source for LEDs. Using the LEDs is when I figured it
out...and might help you troubleshoot your issues. Take one of these
logic pins that you believe is outputting "high", connect it through
a small resistor and an LED to ground...if it is sourcing current
(bad, when you don't want it to) then the LED will light. I find that
it will source a tiny bit of current (<0.5mA) while set as input, but
when you use software to set it to output, high, the current will jump
up to whatever load you are using dictates (don't go over 4mA, spec
your resistor and LED appropriately). When your software properly
sets this to output, low, the LED will go out entirely. In fact, if
you set it to output, low, you can sink up to 8mA INTO the pin.
Long story short: I've seen the exact same things you are talking
about, however, our projects make much use of this I/O and it actually
works great. Hopefully I have shed some light on what you are seeing.
--- In "linna_lisa" <> wrote:
>
> One thing to note, this doesn't just happen at start up, it's all the
> time. I know that the pins all go high for 11 second but it
> continues well after that. :(
>
> --- In "linna_lisa" <llinna@> wrote:
> >
> > Hey,
> >
> > I'm using PortB as DIO with the direction register set up as 0x0F
> so I
> > can use the first 1-4 as outputs and 6-9 as inputs (pin 5 is
> ground).
> > The outputs work fine but when I'm trying to use the inputs all the
> > pins are high even though they shouldn't be. For a while I was
> trying
> > to figure out why my (simple) code wasn't working, then I put a few
> > print statements in to see where it was hanging up and found it was
> > going to a part of the code which was based on one of these inputs
> > being high. I knew the input shouldn't be high but just to make
> sure i
> > took out all the connections to verify it couldn't possibly be
> coming
> > from my circuit. With nothing going to any of the inputs the pins
> are
> > a logic '1', which must be coming from somewhere else on the
> board.
> > Anyone dealt with this before?
> >
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|