⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 用来计算不同oscillator下
💻 C
字号:
/*------------------------------------------------------------------------------
;  This file is part of the RLC instruction
;  Copyright (c)
;  Version: 1.0 
;-------------------------------------------------------------------------------
;  Filename:
;  main.c
;  Function:   
;
;  Author:
;  pirate
;     
;  Writedate:
;  Oct.15 2005
;  Moddate(latest):
;  Oct.15 2005
;-------------------------------------------------------------------------------
*/

//--------------------------------------
// Included files
//--------------------------------------
#include <reg52.h>		  //51head file
#include <intrins.h>	  //application function
#include ".\HEAD\dtype.h"
#include ".\HEAD\externf.h"

//--------------------------------------
// Local Definitions and Types
//--------------------------------------


/*******************************************************************************
/*   
//   Function:    main control
//
//!  Description: 
//!               - After a reset and power cycle the crystal is given time to
//!               settle and then it comes out of reset and then the radio is
//!               configured
//!
//!  Inputs:      None
//!
//!  Returns:     Void
/*
/*******************************************************************************
/*/
void main(void)
{
	uchar i;
	uchar j;
	
	uchar peninsula;
	uchar a[2][2] = {{1, 2}, {3, 4}};
	uchar (*p)[2];
	
	//Uart_init();
	//TR1 = 1;
	//TR2 = 1;
	nop();	     //nop function
	nop();
	p = a;
	peninsula = *(*(p + 0) + 0); // a[0][0];
	//CalBaudrate(0xDC);
	//TR2 = 1;
	//bomb = UartReceiveChar();
	//TR2 = 0;
	for(i = 0; i < 29; i++)		 //用这种方法可以很方便地计算出未知晶振频率的
	{							 //情况下,确定一波特率,所对应的计时器载入值
		CalBaudrate(i);
		TR2 = 1;
		UartSendChar(0x99);
		UartSendChar(i);
		UartSendChar(0x55);
		TR2 = 0;
		DelayXs(1);				     //delay 1 second
	}
	
    	  
	for(j = 0; j < 2; ++j)
	{
		test();
	}

	for (i=0;i<2;++i)
	{
		RlcChar(0x55);
		j = i;
	}

	//shifting every bit of a char 
	shiftchar();
	while(1);
}

⌨️ 快捷键说明

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