??? 09/05/09 08:12 Read: times |
#168738 - Don't think that way! Responding to: ???'s previous message |
David Prentice said:
Write a '1' to the pin to make it an input. Oh no, not that old chestnut again! You should not think of it that way! The pin is always an input - irrespective of what you write to it! The thing is, if you write a '0' to it, the port's open-drain driver pulls hard to '0' - so '0' is the only value that you will ever read back; But, if you write a '1', then that's just a pullup - so an external signal can drive it to '0' and you will be able to read the actual state of that signal. See: http://www.8052.com/faqs/120176 |
Topic | Author | Date |
Is pull-up needed for INT0 / INT1 | 01/01/70 00:00 | |
Is the PIR output open collector? | 01/01/70 00:00 | |
PIR is inverted using a BC547 | 01/01/70 00:00 | |
Use a base-emitter resistor | 01/01/70 00:00 | |
/INT0 : write 1 to config as i/p pin ? | 01/01/70 00:00 | |
Of course you should be an input | 01/01/70 00:00 | |
Don't think that way!![]() | 01/01/70 00:00 |