??? 11/26/08 11:53 Read: times |
#160314 - Point Taken Responding to: ???'s previous message |
You are quite correct Per. If you are using the same pin for input AND output, the macro should specifically write 1 to set as input prior to a read.
Many applications set up the pins as dedicated input and output. A dedicated input is an input at Reset. Writing a 1 is not necessary. A dedicated output only becomes an output when you write a 0. As suggested earlier, reading the documentation is very wise. Users of AVRs or PICs have great difficulty in using their pins as "Open Collector". Something that comes naturally to an 8051. ( and is simple for AVR or PIC ). However an 8051 cannot perform as a SOURCE whereas other micros can both SOURCE and SINK. David. |
Topic | Author | Date |
AT89S8253's port bits in C | 01/01/70 00:00 | |
What Compiler? | 01/01/70 00:00 | |
8051s don't have any port direction settings. | 01/01/70 00:00 | |
RE: I can't find it anywhere | 01/01/70 00:00 | |
Using 8051 port as output. | 01/01/70 00:00 | |
Such a #define lies to the user | 01/01/70 00:00 | |
Point Taken | 01/01/70 00:00 | |
8051 cannot perform as a SOURCE![]() | 01/01/70 00:00 |