??? 03/31/09 09:20 Read: times |
#164046 - Checking Responding to: ???'s previous message |
Michel Peru said:
I am using a DALLAS 89C450 micro-controller. Normally this chip has internal weak pull-up resistors at least for port P2.
http://www.8052.com/forum/read/164038 Why do you say "normally" here? Do you suspect that you are operating in some special mode where this doesn't apply? Michel Peru said:
What is wrong in the following?:
- First of all if I say "P2_0 = 1", that should set the pin to high level, correct or not? Not really. Writing one to the pin just releases the open-drain driver; If there is, indeed, a weak pull-up, that will then tend to pull the pin up towards a high level - unless something else prevents it If after that, nothing beeing connected to P2.0 if I say "if P2_0 == 1" that should be true, correct or not? Yes, because of the weak pull-up, that should be true; As mentioned by others, you need to check with an oscilloscope that you do, in fact, have a good, steady logic high level on the pin. - Now if the pin P2.0 is connected to 0V then doing "if(P2_0 == 0)" should be true, correct or not? Yes - but, again, check with an oscilloscope that you do, in fact, have a good, steady 0V at the pin. |
Topic | Author | Date |
Pulling to 0 | 01/01/70 00:00 | |
chips | 01/01/70 00:00 | |
89C450 | 01/01/70 00:00 | |
Set a pin as input | 01/01/70 00:00 | |
Port pin as an input | 01/01/70 00:00 | |
Put load on HCT output | 01/01/70 00:00 | |
Checking | 01/01/70 00:00 | |
I see what you want to do there ... but ... | 01/01/70 00:00 | |
so check 74hc165 with resistive load only | 01/01/70 00:00 | |
It's not uncommon... | 01/01/70 00:00 | |
I know that some use antiques, but ... | 01/01/70 00:00 | |
Do we mean the same? | 01/01/70 00:00 | |
I asid 'modern', not Arghmel | 01/01/70 00:00 | |
Come on, Erik.... | 01/01/70 00:00 | |
now let me get this straight ... | 01/01/70 00:00 | |
one thing I always do ... | 01/01/70 00:00 | |
Shame on me! | 01/01/70 00:00 | |
Oops! | 01/01/70 00:00 | |
Been there, done that | 01/01/70 00:00 | |
IO expansion![]() | 01/01/70 00:00 |