Reply by Bruce Paterson October 19, 20062006-10-19
If you really have to live with only 1 resistor interface (rather than
some better sort of level translation), perhaps you could drive your IO
in a twho step process.
1/ Set Output to 1 (rise time to 3.5V is fast)
2/ Program IODIR to input (risetime 3.5v->5V resistor dependent)

Might get away with a larger resistor for the same overall Tr that way,
but it's pretty yuk.

________________________________

From: l... [mailto:l...]
On Behalf Of Marko Pavlin
Sent: Thursday, 19 October 2006 5:38 PM
To: l...
Subject: [lpc2000] 5V GPIO output with single resistor

I have 5V part connected to LPC2148 GPIO. Unfortunately, the
input of 5V
part has lower limit for VinH above 3,5V. Digital signals are
generated
by LPC, the 5V part is input only (not bidirectional). I checked
one
trick: I connected resistor between GPIO and 5V. Then I cleared
IOPIN
bit and switched GPIO direction IODIR bit.

That's the logic:
To set 0V: GPIO = 0, IODIR = output
To set 5V: IODIR = input

So, the operating the GPIO at 5V is simply by writing IOPIN bit
to 0 and
toggling it's IODIR bit.

Unfortunately, there's some stray capacitance at the input and I
got
terrible rise times. I experimented around and got following
results:

Rpullup = 10k; tr=2,3us
Rpullup = 1k; tr%0ns
Rpullup = 330ohm; tr0ns

Here's my question: will GPIO survive and operate relible over
long time
if I have 330 ohm pullup to 5V?

Marko

An Engineer's Guide to the LPC2100 Series

Reply by "ian.scanlon" October 19, 20062006-10-19
> That's the logic:
> To set 0V: GPIO = 0, IODIR = output
> To set 5V: IODIR = input

> Here's my question: will GPIO survive and operate relible over long
time
> if I have 330 ohm pullup to 5V?
>
> Marko
>

Hi Marko,

When the output is set to low, the input current (through gpio pin)
will be ~5V/330 Ohms = 15mA. Data sheet has +/-4mA, up to 40mA
for "short periods". I may work, but you will introduce other
problems that may not be obvious. For example, I would expect some
serious ground bounce without a very good pcb design. My short
answer would be no, not at 15mA .Find another solution. External
logic doesn't cost much and you know how it will behave.

Ian
Reply by Mukund Deshmukh October 19, 20062006-10-19
>
> Rpullup = 10k; tr=2,3us
> Rpullup = 1k; tr%0ns
> Rpullup = 330ohm; tr0ns
>
> Here's my question: will GPIO survive and operate relible over long time
> if I have 330 ohm pullup to 5V?
>

We are using the same scheme, but with 4.7K pull up to +5 volt since 2-3
months.
No damage or problem reported so far.

Best Regards,

Mukund Deshmukh.
Beta Computronics Pvt Ltd
10/1, IT Park, Parsodi,
Nagpur-440022, INDIA.
Cell +919422113746
Reply by "c.barbaro" October 19, 20062006-10-19
If you are in doubt you can use a transistor to drive the line to the
5V device so that 330 ohm on the collector are not an issue.
In this case you have the advantage of using the GPIO in the standard
fashion, with IOCLR and IOSET registers.
But if you have more than 2-3 lines connecting the LPC to 5V device
you should evaluate the use of an interface-logic, like the 74VHCT
family: they can be power supplied to 5V and have TTL compatible
inputs (input high level threshold of 2V).

Carlo

--- In l..., Marko Pavlin wrote:
>
> I have 5V part connected to LPC2148 GPIO. Unfortunately, the input
of 5V
> part has lower limit for VinH above 3,5V. Digital signals are generated
> by LPC, the 5V part is input only (not bidirectional). I checked one
> trick: I connected resistor between GPIO and 5V. Then I cleared IOPIN
> bit and switched GPIO direction IODIR bit.
>
> That's the logic:
> To set 0V: GPIO = 0, IODIR = output
> To set 5V: IODIR = input
>
> So, the operating the GPIO at 5V is simply by writing IOPIN bit to 0
and
> toggling it's IODIR bit.
>
> Unfortunately, there's some stray capacitance at the input and I got
> terrible rise times. I experimented around and got following results:
>
> Rpullup = 10k; tr=2,3us
> Rpullup = 1k; tr%0ns
> Rpullup = 330ohm; tr0ns
>
> Here's my question: will GPIO survive and operate relible over long
time
> if I have 330 ohm pullup to 5V?
>
> Marko
>
Reply by slawcus October 19, 20062006-10-19
Just one more thing. Did you use reply or post? All follow-ups are
going to be messed. Or is this some kind of yahoo feature?

BR,
Slawc
--- In l..., Marko Pavlin wrote:
>
> I have 5V part connected to LPC2148 GPIO. Unfortunately, the input
of 5V
> part has lower limit for VinH above 3,5V. Digital signals are generated
> by LPC, the 5V part is input only (not bidirectional). I checked one
> trick: I connected resistor between GPIO and 5V. Then I cleared IOPIN
> bit and switched GPIO direction IODIR bit.
>
> That's the logic:
> To set 0V: GPIO = 0, IODIR = output
> To set 5V: IODIR = input
>
> So, the operating the GPIO at 5V is simply by writing IOPIN bit to 0
and
> toggling it's IODIR bit.
>
> Unfortunately, there's some stray capacitance at the input and I got
> terrible rise times. I experimented around and got following results:
>
> Rpullup = 10k; tr=2,3us
> Rpullup = 1k; tr%0ns
> Rpullup = 330ohm; tr0ns
>
> Here's my question: will GPIO survive and operate relible over long
time
> if I have 330 ohm pullup to 5V?
>
> Marko
>
Reply by slawcus October 19, 20062006-10-19
Hi,

why don't you run a 24/7 test and see what happens?

It is real pitty that LPCs don't have Hi-Z IOs.

--- In l..., Marko Pavlin wrote:
>
> Here's my question: will GPIO survive and operate relible over long
time
> if I have 330 ohm pullup to 5V?
>
Reply by Marko Pavlin October 19, 20062006-10-19
I have 5V part connected to LPC2148 GPIO. Unfortunately, the input of 5V
part has lower limit for VinH above 3,5V. Digital signals are generated
by LPC, the 5V part is input only (not bidirectional). I checked one
trick: I connected resistor between GPIO and 5V. Then I cleared IOPIN
bit and switched GPIO direction IODIR bit.

That's the logic:
To set 0V: GPIO = 0, IODIR = output
To set 5V: IODIR = input

So, the operating the GPIO at 5V is simply by writing IOPIN bit to 0 and
toggling it's IODIR bit.

Unfortunately, there's some stray capacitance at the input and I got
terrible rise times. I experimented around and got following results:

Rpullup = 10k; tr=2,3us
Rpullup = 1k; tr%0ns
Rpullup = 330ohm; tr0ns

Here's my question: will GPIO survive and operate relible over long time
if I have 330 ohm pullup to 5V?

Marko