I am new to the 8051 line of microcontrollers. Looking through the
datasheets from Phillips, I can only find a reference that says the
pins can drive 4 TTL loads. I know this may sound dumb, but what are
the Iout and Iin maximum (and minimum) drive currents that these pins
can safely handle and still work? This will answer questions such as,
can I drive a 2N3904 or 2N2222 into saturation with these pins?
Also, for Phillips, port 0 is the only port that has a 'true' high
impedance when configured as an input. The other ports don't. Does
anyone have a 'grab bag' of input circuit to externally delay (with
resistors and capacators) an input to these pins (even non-Port 0
pins). The delay needs to work when the input goes high and when the
input goes low.
Yet another question: For Phillips, excluding Port 0, what is the
maximum resistance that can be between the pin and ground, and still
have the pin read a low value. The databook says that the ports
(minus port 0) have 'weak pull ups'. However, this pullup is created
with a series of FETs. Therefore, what resistance value, minimum, is
created by the FETs. If one knew this, (and the maximum low input
voltage), we could calculate the maximum resistance to ground that
would be guaranteed to give a low input to the pin.
Thanks in advance (and thanks fer listening)
Ray
-
Raymond Lillback rl...@ix.netcom.com
Kinetico Incorporated
Newbury, Ohio 44065
-
I am sorry I don't have time to answer everthing indetail. More
questions for you..
1) is this an 80C51? That C means CMOS...an NMOS version is available,
the pin-out EXCEPT FOR THE XTHAL is the same, but the output
characteristics are different (I think).
2) How are you going to program it? are you getting parts with
internal EPROM? If so, you can use port 0 to play with. Otherwise, if
you have external memory, use port 3 to play.
3) why the worry about high impedance? generally inputs are buffered
for speed...are you reading switches directly? Pull-ups are your
friends!
4) You have to do your own homework on the transistor saturation
problem. It all depends on how much collector current you have through
the transistor and the gain of the transistor.
this is not the easiest processor to use, but it is versitile, and has
a hge installed base.
gotta go
rm
You have just stumbled into what is called a "quasi-bidirectional port".
It looks simple in the documentation, but a lot is hidden in footnotes.
As an output pin it is basically a pin with a weak pullup.The allowed
currents are usually Iout=3D60uA and Iin=3D1.6mA. To use it as an input p=
in
you simply set it high and let external circuity pull it low to input
a 0. Based on the Iout this looks easy, but when it is pulled down to
2 Volts the pin starts to source much more current, about 650uA. If the
pin is pulled lower it stops sourcing current. This of course also
happens when the pin is used as output,
So you see, there is no clear answer to your questions. Do not rely
on sourcing current from port pins (also restrictions on sums of
currets of several pins).
As for lowest resistance that will pull a pin low my experience says
2.7 Kohms, and that will increase the current flowing out of the pin.
So better just short it to ground.
=D8ystein Brandt Kjelsen -----b...@online.no-----
> You have just stumbled into what is called a "quasi-bidirectional port".
> It looks simple in the documentation, but a lot is hidden in footnotes.
> As an output pin it is basically a pin with a weak pullup.The allowed
Yes. This one took me some time to work out. Before I became acquainted
with the 8051, I'd always used units with an explicity "Set the data
direction" register independent of the data register itself.
So, my question is, (how) is it possible (with minimal external
circuitry) to force a line into the three conditions:
Force Output Low, Force Output High, Force to Tristate.
I ask because I am needing to build an IIC interface which
needs to turn the line around every so often.
Do I need to force the third state at all ? Will it all "just work" ?
P.S. Apologies in advance if the first character of your
name doesn't make it from my setup to Usenet.
Richard [in NW1]
We use an Intel 80C32 to drive an IICbus. The P3.3 and P3.4 is used
as SDA and SCL with just 10kohm pullups to 5v. This works perfectly
for us with 5 IIC devices. I guess this works only with short lines,
but all our devices are on the same card so...
Unfortunately I cannot remember where we found this but there are
lots of stuff to be found on the net - search for 'IIC' (uppercase) etc.
There is also an FAQ in newsgroup:
SCI.ELECTRONICS,COMP.PROTOCOLS.MISC
it is maintained by Vincent Himpe vincen...@ping.be
Knut
You don't have to force it to tristate. IIC allows a high output (with
pull-up resistor, so not forced) to be used as an inactive .
Sou you don't need to force the output high. Thanks to the workings of
8051 inputs, every output doubles as an input.
* ____ http://www.simplex.nl/~spectral *
*groeten |___) spec...@simplex.nl *
* | aul Wiegmans 2:500/143.11430 *