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

  • 大小: 27KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-09
  • 語言: 其他
  • 標簽:

資源簡介

簡單控制led點亮,親測成功 ,對剛接觸hc06藍牙模塊的小伙伴們會有幫助的

資源截圖

代碼片段和文件信息

#include
#include
unsigned?char?tmp[2]={0};

sbit?led1=P2^0;?//
sbit?led2=P2^1;?//發1,2控制這兩個led的亮滅
sbit?led3=P2^2;?//判斷是否收到數據
void?init();?//?????

void?main()
{
init();
while(1)
{
if(led3==0)
{
ES=0;
switch(tmp[0])
{
case?‘1‘:
led1=0;break;
case?‘2‘:
led2=0;break;

}
}
ES=1;
}
}?
void?init()//串口初始化
{?
PCON?&=0X7F;
SCON=0x50;//SM0=0,SM1=1串口工作在方式1?
TMOD=0x20;//定時器工作在方式2
TH1=0xfd;//放初值,便于設置波特率,此處為9600bps
TL1=0xfd;?
TR1=1;?//啟動定時器1

EA=1;//開總中斷
ES=1;//開串口中斷

}


void?ser()?interrupt?4
{??

tmp[0]=SBUF;
RI=0;
led3=0;//如果亮則證明已發送數據
}

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

????.......?????70753??2016-04-21?20:33??bluetooth\bluetooth.uvgui.Administrator

????.......??????5395??2016-04-21?20:33??bluetooth\bluetooth.uvopt

????.......?????14037??2016-04-21?20:33??bluetooth\bluetooth.uvproj

?????文件???????5982??2016-04-21?20:29??bluetooth\Listings\bluetooth.m51

?????文件???????2344??2016-04-21?20:29??bluetooth\Listings\lanya.lst

?????文件??????14138??2016-04-21?20:29??bluetooth\Listings\STARTUP.lst

?????文件???????3624??2016-04-21?18:30??bluetooth\objects\bluetooth

?????文件????????929??2016-04-21?18:30??bluetooth\objects\bluetooth.build_log.htm

?????文件????????126??2016-04-21?18:30??bluetooth\objects\bluetooth.lnp

?????文件???????3024??2016-04-21?18:30??bluetooth\objects\lanya.obj

?????文件????????819??2016-04-21?18:30??bluetooth\objects\STARTUP.obj

?????文件???????3511??2016-04-21?20:29??bluetooth\out\bluetooth

?????文件????????970??2016-04-21?20:29??bluetooth\out\bluetooth.build_log.htm

?????文件????????663??2016-04-21?20:29??bluetooth\out\bluetooth.hex

?????文件????????114??2016-04-21?20:29??bluetooth\out\bluetooth.lnp

?????文件???????2930??2016-04-21?20:29??bluetooth\out\lanya.obj

?????文件????????811??2016-04-21?20:29??bluetooth\out\STARTUP.obj

?????文件????????705??2016-04-21?20:33??bluetooth\src\lanya.c

?????文件???????6376??2015-05-29?12:09??bluetooth\STARTUP.A51

?????目錄??????????0??2016-04-21?20:29??bluetooth\Listings

?????目錄??????????0??2016-04-21?18:30??bluetooth\objects

?????目錄??????????0??2016-04-21?20:29??bluetooth\out

?????目錄??????????0??2016-04-21?20:33??bluetooth\src

?????目錄??????????0??2016-04-21?20:33??bluetooth

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

???????????????137251????????????????????24


評論

共有 條評論

相關資源