doc

c8051 classic initialization

  • 2013-09-29
  • 29KB
  • Points it Requires : 2

              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 ……             

unfold

You Might Like

Uploader
nonogugu66
 

Recommended ContentMore

Popular Components

Just Take a LookMore

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
×