?? main.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()
{
uchar i;
uchar j;
uchar bomb;
SP = 0x70;
//Uart_init();
//TR1 = 1;
//TR2 = 1;
nop(); //nop function
nop();
CalBaudrate(0xDC);
TR2 = 1;
bomb = UartReceiveChar();
TR2 = 0;
for(i = 0; i < 29; i++) //用這種方法可以很方便地計算出未知晶振頻率的
{ //情況下,確定一波特率,所對應(yīng)的計時器載入值
CalBaudrate(0xDC);
TR2 = 1;
//UartSendChar(0x99);
UartSendChar(bomb);
//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);
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -