??? 02/12/05 11:12 Read: times |
#87199 - Bad practice Peter Responding to: ???'s previous message |
It's not too good an idea to read port pins, massage them then write them back out as the external hardware connected to them may load down the pin and thus not read the logic level that is intended. I've seen so many people caught by this! In other cpu's like the AVR, reading the port register reads the internal register, to read then pin value there is a PIN register. So your technique on an AVR would work as expected if you used the PORT register. Not so with the 8051 (most of them anyway!). Please consider. |
Topic | Author | Date |
delays | 01/01/70 00:00 | |
delay routine ideas | 01/01/70 00:00 | |
further ideas | 01/01/70 00:00 | |
change p2 outputs | 01/01/70 00:00 | |
Bad practice Peter | 01/01/70 00:00 | |
sorry | 01/01/70 00:00 | |
Obtaining Delays | 01/01/70 00:00 | |
Not RTC | 01/01/70 00:00 | |
it is good! | 01/01/70 00:00 | |
it is good. | 01/01/70 00:00 | |
Not so good | 01/01/70 00:00 | |
Stop wasting our time Meero | 01/01/70 00:00 | |
pot and kettle | 01/01/70 00:00 | |
Eric the great. | 01/01/70 00:00 | |
Erik the great![]() | 01/01/70 00:00 |