N76E003的SFR_Macro.h裡面關於P0S的描述如下
//**** P0S B2H PAGE1 **** SFRS must set as 1 to modify this register
#define set_P0S_7 BIT_TMP=EA;TA=0xAA;TA=0x55;SFRS=0x010S|=SET_BIT7;TA=0xAA;TA=0x55;SFRS=0x00;EA=BIT_TMP
關於P0SR的描述如下
//**** P0SR B0H PAGE1 **** SFRS must set as 1 to modify this register
#define set_P0SR_7 BIT_TMP=EA;TA=0xAA;TA=0x55;SFRS=0x010SR|=SET_BIT7;TA=0xAA;TA=0x55;SFRS=0x00;EA=BIT_TMP
但是 datasheet 裡面寫道
P0S – Port 0 Schmitt Triggered Input
Address: B1H, Page: 1
P0SR – Port 0 Slew Rate
Address: B2H, Page: 1
請問哪個是正確的? 謝謝 |