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.

data-sheet疑问



部分如下data-sheet

Bits 10–9 T2TOADC. Start ADC by GP timer 2 event
00 = No event starts ADC
01 = Setting of underflow interrupt flag. Starts ADC
10 = Setting of period interrupt flag. Starts ADC
11 = Setting of compare interrupt flag. Starts ADC

程序代码如下:

LDP    #e8h

LACC   0h   ;对应GPTCON

OR   #600h  ;对应11 = Setting of compare interrupt flag. Starts ADC

AND  0f9ffh  ;对应No event starts ADC

SACL  0h

问题:为何对同一寄存器GPTCON的Bits 10–9 (T2TOADC)设置两次不同的值?我觉得最后一次的值才有效,第一次设置的值被第二次的覆盖了。