其余几个口都可以改变输出电平,但就是这两个口修改代码也无法改变点平,始终是低电平,不知为何,看一下代码,如图
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
你写的语句是没有错,但是在文档TMS320x2833x, 2823x System Control and Interrupts Reference Guide中有这样的说明:
When using the GPxDAT register to change the level of an output pin, you should be cautious not to
accidentally change the level of another pin. For example, if you mean to change the output latch level
of GPIOA0 by writing to the GPADAT register bit 0, using a read-modify-write instruction. The problem
can occur if another I/O port A signal changes level between the read and the write stage of the
instruction. You can also change the state of that output latch. You can avoid this scenario by using
the GPxSET, GPxCLEAR, and GPxTOGGLE registers to load the output latch instead.
即直接写GPADAT寄存器可能引起其他引脚电平的变化,建议使用GPxSET, GPxCLEAR, and GPxTOGGLE