linna_lisa 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.
It sounds like there is an internal pull-up resistor on the EP9302 GPIO
pins. Typically this will be a very weak pull-up, so you will only see
the effect when the pin is configured as an input with nothing connected.
______ Best Regards,
|__ __/ Michael Schmidt
|| Software Engineer
||echnologic Systems (EmbeddedARM.com)
|| (480) 16610 East Laser Drive #10
|/ 837-5200 Fountain Hills, AZ 85268
http://oz.embeddedarm.com/~michael
------------------------------------
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/
|