8051f.c

来自「C8051F314单片机的应用程序」· C语言 代码 · 共 45 行

C
45
字号
/////////////////////////////////////
//  Generated Initialization File  //
/////////////////////////////////////

#include "C8051F310.h"
#include "stdio.h"

// Peripheral specific initialization functions,
// Called from the Init_Device() function
void Timer_Init()
{
    TCON      = 0x50;
    TMR2CN    = 0x20;
    TMR3CN    = 0x20;
}

void Port_IO_Init()
{
 

    XBR0      = 0x17;
    XBR1      = 0x40;
}

void Interrupts_Init()
{
    IE        = 0xBA;
}

// Initialization function for device,
// Call Init_Device() from your main program
void Init_Device(void)
{
    Timer_Init();
    Port_IO_Init();
    Interrupts_Init();
}

main()
{
	Init_Device();
	printf("HELLO WORD!!!");
	while(1);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?