Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] GPIO pin as both input and output?

2005-03-08 by Charles Manning

> It has a single control pin that the LPC would have to send out a
> trigger pulse and then watch for the echo pulse coming back on the
> same line.
>
> Can the LPC be used to do this with a pin used as an output then
> immediately switched to an input? 

yes

>Can I just modify the IODIR
> settings inline in the middle of my program and expect immediate
> change in operation of the pin? 

yes


"Immediate" is limited to the speed of the GPIO operation taking effect... 
probably around 100ns.

This approach is quite often used to drive the Dallas (and equivalent )1-wire 
devices where clock, power and 2-way data are all done over a single wire,

This approach can also be used to achieve open-collector-like operation.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.