|
本帖最后由 超級狗 于 2013-6-5 10:17 编辑 / r; [! r) D% Z, t- w7 z
风吹摇摆 发表于 2013-6-5 09:02 % f% Z! ^9 C' u! t0 f4 s9 b9 x$ X
不是上拉电阻的问题是输出电路的问题,都是推挽输出但是一种是TTL电平一种是CMOS电平。TTL电路的速度快, ... 6 @3 m; o$ w9 J7 ^! D% i, X
& |3 L# z$ F8 y* J$ W7 @: v
Push-Pull 不一定是 TTL,CMOS 也有 Push-Pull。
) i t W+ L4 n5 z' x
7 P4 J: ]8 D u2 q5 T" N# P樓主說換了 AT89S51 後就推不動 LED,照文字敘述應該是什麼都沒變只換 CPU。所以我排除是軟件設定的問題,即便是 AT89C51 和 AT89S51 I/O Port 也可以設定成 Push-Pull 輸出,但他們設錯了。1 g0 k# W( S- \! Z! S2 U' H
+ t' i5 e, B% l% }( W: N& b
但你仔細看芯片資料,Port 0 他直接跟你講是 Open Drain。Port 1 ~ 3 示意圖看起來也都是 Open Drain,差別只在於 Port 2 內部的上拉電阻可以被控制。- [5 g1 K) I" e$ E; m3 n
$ {8 @: R7 ]" V, k: k我知道有些 8051 的 I/O Pin 可以被設為好幾種模式(Push-Pull 是其中一種),但它們會被畫成像最後一張圖那樣(節錄自 新唐電子 NuvoTon 8051 芯片資料)。對於 ATMEL 這兩個系列,我從 I/O Port 結構圖看不出他們可以被設為 Push-Pull。但我也說過,芯片資料內容少得可憐,除非他們有不能說的秘密沒講出來。2 }5 ~# J! Z, {$ ~6 @8 D
. ?( s' A! b; e7 X* Z6 {* H/ HPort 0:
% R+ Y, `3 ?" m: t/ bIs an 8-bit open drain bi-directional I/O port. Port 0 pins that have 1’s written to them float, and in this state can be used as high-impedance inputs. Port 0 is also the multiplexed low-order address and data bus during accesses to external Program and Data Memory. In this application it uses strong internal pull-ups when emitting 1’s. Port 0 also outputs the code Bytes during program validation. External pull-ups are required during program verification.
1 ?* N% n, F( j* R# o3 n1 [4 B! R1 g9 g9 z: a; k& v! k
{:soso_e113:}
; p5 J' T( @- ^. z( p
7 }% Y, f. T5 p9 V$ Y* j) y0 w |
|