可用的普通IO口有
PORTA 8个,PORTB 8个
1.Port A Data Register (PORTA)
| 域 | 描述 |
| 7-0 | Port A general purpose input/output data—Data Register |
| The associated pin can be used as general purpose I/O. In general purpose output mode the register bit value is | |
| driven to the pin. | |
| If the associated data direction bit is set to 1, a read returns the value of the port register bit, otherwise the buffered | |
| pin input state is read. |
| 域 | 描述 |
| 7-0 | Port A Data Direction— |
| This bit determines whether the associated pin is an input or output. | |
| 1 Associated pin configured as output | |
| 0 Associated pin configured as input |
本文介绍了单片机中PORTA和PORTB两个通用输入输出端口的使用方法,包括数据寄存器和数据方向寄存器的作用及配置流程。
2234

被折叠的 条评论
为什么被折叠?



