本帖最后由 34af9uc 于 2021-4-17 18:21 编辑
%5Bmedia=x,500,375%5Dhttps://www.bilibili.com/video/BV15U4y1h7qC?share_source=copy_web[/media]
#include "extern.h"
led bit pa.0;
/*#define ledliang pa |=bit0
#define ledmie pa &=~bit0
#define bit0 0b00000001
#define bit1 0b00000010
#define bit2 0b00000100
#define bit3 0b00001000
#define bit4 0b00010000
#define bit5 0b00100000
#define bit6 0b01000000
#define bit7 0b10000000
*/
void FPPA0 (void)
{
.ADJUST_IC SYSCLK=IHRC/4 // SYSCLK=IHRC/4
$ led out,low;
//pa =0b0000_0001;
//pac =0b0000_0001;
//paph //上拉电阻
//papl //下拉电阻
//pa=0;
//tm2c =0b0010_1010;
//tm2c |=bit5|bit3|bit2;
while (1)
{
led=1;
led=0;
//ledliang;
//ledmie;
}
}
//& | !
//&&
|