??? 02/24/04 22:12 Read: times |
#65452 - What the Data Sheet says Responding to: ???'s previous message |
Gerard Akse said:
Furthermore the chapter gives ZERO information on how to define pins as in-or output. Oh yes it does: The Data Sheet said:
An input pin can be read using the MOV instruction. For example, MOV C,P3.3 reads the input on P3.3 ...
An output can be set high (and then tristated) using the SETB instruction. For example, SETB P3.1 sets P3.1 high. An output can be set low using the CLR instruction, as in CLR P3.4, which sets P3.4 low What that's telling you is: * if you read from the port, you will get the input value; * if you write to the port, you will set the output value. and that's all there is to it! No setting up - just read for input; write for output. Now all you need to do is go away and find out how that's implemented in your particular compiler's extensions to ANSI 'C'... |
Topic | Author | Date |
Defining I/O pin | 01/01/70 00:00 | |
RE: Defining I/O pin | 01/01/70 00:00 | |
RE: Defining I/O pin | 01/01/70 00:00 | |
RE: Defining I/O pin | 01/01/70 00:00 | |
RE: Defining I/O pin | 01/01/70 00:00 | |
RE: Defining I/O pin | 01/01/70 00:00 | |
Dont let Michael Karas hear you...! | 01/01/70 00:00 | |
What the Data Sheet says | 01/01/70 00:00 | |
Why the Data Sheet says it | 01/01/70 00:00 | |
RE: What the Data Sheet says | 01/01/70 00:00 | |
RE: Defining I/O pin | 01/01/70 00:00 | |
Thanks Steve! | 01/01/70 00:00 | |
RE: Defining I/O pin | 01/01/70 00:00 | |
Thanks you too Erik ;) | 01/01/70 00:00 | |
RE: Thanks you too Erik ;) | 01/01/70 00:00 | |
RE: Defining I/O pin | 01/01/70 00:00 | |
Thanks for your supportive speech :)![]() | 01/01/70 00:00 |