91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2.17MB
    文件類型: .rar
    金幣: 2
    下載: 1 次
    發布日期: 2023-11-17
  • 語言: 其他
  • 標簽: B碼對時??變電站??

資源簡介

B碼對時資料,多個資料,很有用的,大家共同學習

資源截圖

代碼片段和文件信息



#include?

#define UINT8? unsigned?char
#define?UINT16? unsigned?int

sbit?B_IN=P4^3;
sbit?B_SS=P1^7;

UINT8?Bcode[89]i=0; ?//RAM?for?the?coment?decoded?form?IRIG-B100?in?1s
UINT8?sec=0min=0hour=0; ?//clock?time?to?display?in?segment
UINT8?ppn;
bit?flag=0pr=0; ?//B-code?valid?flagif?B-code‘s?exist?is?ascerstainedthen?set?

UINT8?code?COM[6]={0x010x020x040x080x100x20}; //段選碼-時分秒
UINT8?code?SEG[10]={0x030x9f0x250x0d0x990x490x410x1f0x010x09}; //0-9的字型碼

void?InitSYS()
{
IP=0x80;
// AUXR=0x11;
// BRT=0xfc;
// SCON=0x50;
TMOD=0x11; ?? //both?time0?time1?as?16-bit?timer
TH0=0x00;
TL0=0x00;

TH1=0xf8;
TL1=0xcd; //2ms
TR1=1; //enable?timer1?2ms?interrupt??

IT0=1; //INT0?posedge?trig

// ES=1;
EA=1;
}

void?InitPCA()
{
AUXR1=0x40; //P1.3?transist?to?P4.3
CCON=0x00; //stop?timerclear?all?flag
CMOD=0x00; //Fosc/12disable?timer?overflow
CCAPM1=0x31; //PCA?module?1?capture?as?a?transtion?occours
CL=0;
CH=0;
CR=1; //enable?all?interrupt
}

/*void?send(UINT8?serial_data)
{
SBUF=serial_data;
while(!TI)?;
TI=0;
}
*/
void?INT0_int()?interrupt?0 ?//clock?generated?by?1pps?from?B-code
{
sec++;
if(sec>=60)?{sec=0;min++;}
if(min>=60)?{min=0;hour++;}
if(hour>=24){hour=0;}
}

void?Timer1_int()?interrupt?3
{
UINT8?j;??//0-5just?for?scan

TH1=0xf8;
TL1=0xcd;?//2ms

P2=COM[j];

switch(j)
{
case?0: P0=SEG[sec/10];?break;
case?1:?P0=SEG[sec%10];?break;
case?2: P0=SEG[min/10];?break;
case?3:?P0=SEG[min%10];?break;
case?4: P0=SEG[hour/10];break;
case?5:?P0=SEG[hour%10];break;
default:?break;
}
j++;
if(j>=6)?j=0;
}

void?PCA_int()?interrupt?7
{
CCF1=0;

if(B_IN)? //posedge
{
TR0=1;
}
if(!B_IN) ???//negedgeIRIG-B?decoder?and?storage
{
TR0=0; //stop?timer0.

if((TH0>0x25)&&(TH0<0x27)) //8ms
{
p=2;
if(i==0)?B_SS=0;
if(pn==2)?{i=0;pr=1;}
}
else?if((TH0>0x17)&&(TH0<0x19))?p=1;? //5ms
else?if((TH0>0x08)&&(TH0<0x10))?p=0; //2ms
if((p==1)||(p==0))
{
Bcode[i]=p;
i++;
}
if(pr)
{
if(i==10)?B_SS=1;
if(i==30)?flag=1; //IRIG-B?code?existsthen?set?the?flagonly?need?the?first?clock?timeso?the?others?are?passed?by
if(i==88)?pr=0; ? //precede?set?11s?is?overthe?new?pps?will?begin
}
if(i>=89)?i=0; ???
pn=p;

TH0=0x00;
TL0=0x00;
}?

/*
if((TH0>0x25)&&(TH0<0x27)) //8ms
{
p=2;
if(pn==2)?{i=0;pr=1;}
}
else?if(TH0<0x20)
{
p=1;
Bcode[i]=TH0;
i++;
}
if(pr)
{
if(i==10)?B_SS=1;
if(i==30)?flag=1; //IRIG-B?code?existsthen?set?the?flagonly?need?the?first?clock?timeso?the?others?are?passed?by
if(i==88)?{B_SS=0;pr=0;} ? //precede?set?11s?is?overthe?new?pps?will?begin
} ???
pn=p;

if(p==1)?{send(i);send(Bcode[i]);}
TH0=0x00;
TL0=0x00;
}
*/
}

void?main()
{
InitSYS();
InitPCA();
B_SS=1;

while(!flag

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????649126??2012-06-29?08:57??B碼對時\+B+碼對時.pdf

?????文件???????3579??2011-08-23?13:47??B碼對時\B-decoder1.c

?????文件??????96768??2012-06-29?09:01??B碼對時\FPGA_CPLD數字時鐘的實現(原代碼).doc

?????文件?????330070??2009-12-29?11:08??B碼對時\IRIG?Serial?Time?Code?Formats.pdf

?????文件??????74657??2009-12-22?16:42??B碼對時\IRIG-B.pdf

?????文件?????200192??2012-06-28?16:33??B碼對時\IRIG-B格式時間碼解碼接口卡電路設計.doc

?????文件?????349696??2012-06-29?08:59??B碼對時\IRIG-B碼校時、對時_DCS、PLC對時.doc

?????文件?????742194??2012-06-28?16:50??B碼對時\IRIG-B解碼芯片說明書(v1.12).pdf

?????文件?????145207??2012-06-29?09:02??B碼對時\在變電站智能設備中實現B碼對時.pdf

?????文件?????144000??2012-06-29?09:01??B碼對時\基于CPLD的IRIG—B碼解碼器的設計.pdf

?????目錄??????????0??2012-07-04?10:36??B碼對時

-----------?---------??----------?-----??----

??????????????2735489????????????????????11


評論

共有 條評論