设置为T2_输出时钟后,在P1_4上测得如下非时钟形状的周期性波形
????#include?"compiler.h" ????#include?"CH552_SDCC.H" void?CH551G_T2OUT_TEST?(?void?)?{ ????P1_MOD_OC??=?0x00??????; ????P1_DIR_PU??=?0xFF??????; ????P3_MOD_OC??=?0x00??????; ????P3_DIR_PU??=?0xFF??????; ????P1?????????=?0x00??????; ????P3?????????=?0x00??????; ????T2MOD?????|=?bTMR_CLK??; ????T2MOD?????|=?bT2_CLK???; ????RCLK???????=?0?????????; ????TCLK???????=?0?????????; ????C_T2???????=?0?????????; ????CP_RL2?????=?0?????????; ????RCAP2??????=?0x00FF????; ????T2COUNT????=?0x00FF????; ????PIN_FUNC??|=?bT2_PIN_X?; ????TR2????????=?1?????????; ????T2MOD?????|=?T2OE??????; }
热门产品 :
CH390:以太网控制器芯片