c8051 The initialization process of C8051F020 has been discussed by netizens, but it still feels a bit confusing. Now I will repeat the description of this process and hope that friends who need it can refer to it: #include \"C8051F020.h\" #include \"stdio.h\" #define SYSCLK 11059000 #define BAUDRATE 9600 /*********************************************************************/ #define WDTDISABLE {WDTCN=0xDE;WDTCN=0xAD;} /****************************************************************//****************************************************************/ void DELAY(void){ int i,j; for(i=255;i>=0;i--) for(j=255;j>=0;j--); }/****************************************************************/ void SYSCLK_Init (void){ int i; OSCXCN=0x67; for(i=255;i>=0;i--); while (!(OSCXCN & 0x80)) ; //11.059m hz OSCICN=0x88;}void UART0_Init (void){ SCON0 = 0x50; // SCON0: mode 1, 8-bit UART, enableRX TMOD ……
You Might Like
Recommended ContentMore
Open source project More
Popular Components
Searched by Users
Just Take a LookMore
Trending Downloads
Trending ArticlesMore