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

  • 大小: 27KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-12
  • 語言: 其他
  • 標(biāo)簽: ZigBee??CC2530??12864??

資源簡介

ZigBee CC2530 12864液晶串行程序,使用IAR編程

資源截圖

代碼片段和文件信息


#include?
//#include?
//#include?
#include?“string.h“
#include?“main.h“

#define?SCLK??P0_4???//E
#define?SID??P0_5????//RW
//sfr?WDT_CONTR?=?0xE1;

/********************************
delay?time?part
*********************************/
void?delay_MS(unsigned?int?x)
{??
??? unsigned?int?k;
unsigned?int?j;
? for(k=0;k?? for(j=0;j<1000;j++)
{
??????????????????asm(“NOP“);
??????????????????asm(“NOP“);
??????????????????asm(“NOP“);
}

}

void?delay_US(unsigned?char?s)
{
??while?(s--)
??{
??????asm(“NOP“);
??????asm(“NOP“);
??????asm(“NOP“);
??}
}

/****************************************************
send?the?data?or?commond?to?lcd
Wdata:?the?data?send?to?lcd
RS:????the?flag?of?data?ro?commond(high?is?the?data)
*****************************************************/
void?SendByteLCD(unsigned?char?WLCDData)
{
unsigned?char?i;
EA?=?0;
for(i=0;i<8;i++)
{
? SCLK=1;
? if((WLCDData<? else?SID=0;
delay_US(40);
? SCLK=0;
}
EA?=?1;
}
void?SPIWR(unsigned?char?Wdataunsigned?char?RS)
{
???SendByteLCD(0xf8+(RS<<1));
???SendByteLCD(Wdata&0xf0);
???SendByteLCD((Wdata<<4)&0xf0);

}
/************************************************
the?commond?and?data?part
*************************************************/
void?SendCMD(unsigned?char?CMD) //write?the?commond
{
????SPIWR(CMD0);
}

void?SendData(unsigned?char?Data) //write?the?char?type?data
{
????SPIWR(Data1);
}
/*****************************
clear?functions
*****************************/
void?LcmClearTXT(?void?)
{
????unsigned?char?i;
????SendCMD(0x30);??????//8BitMCU基本指令集合
????SendCMD(0x80);??????//AC歸起始位
????for(i=0;i<64;i++)?
{
????????SendData(0x20);???//
}
}

void??ClearScreen()
{???
????unsigned?char?ijxy;
????SendCMD(0x3e); //?;RE=1??擴(kuò)展指令選擇??G=1??開圖形顯示?
????x=0x80;
????y=0x80;
????for(j=0;j<64;j++)
????{
??????y=0x80;
??????SendCMD(x);
??????SendCMD(y);
??????for(i=0;i<32;i++)
??????{
???????SendData(0x00);
??????}
??????x++;
????}?????
}

/*****************************
??????send?the?word
//?????int?i=0;
?????SendCMD(0x30);??????????????????//8BitMCU基本指令集合
????SendCMD(AC_TABLE[8*row+col]);???//起始位置
//?????i=row*16+col;
?????while(*puts?>0)?????????????????//判斷字符串是否顯示完畢
?????{
????//???if((i<16)&(*puts?>0)){SendData(*puts);i++;puts++;}//第一行
?????//??if((i<32)&(i>=16)){SendCMD(0x90);while((i<32)&(*puts?>0)){SendData(*puts);i++;puts++;}}//第二行
?????//??if((i<48)&(i>=32)){SendCMD(0x88);while((i<48)&(*puts?>0)){SendData(*puts);i++;puts++;}}//第三行
?????//??if((i<64)&(i>=48)){SendCMD(0x98);while((i<64)&(*puts?>0)){SendData(*puts);i++;puts++;}}//第四行
??????SendData(*puts);
??????puts++;
?????}
?????SendData(*puts);
*****************************/
void?PutStr(unsigned?int?rowunsigned?int?colunsigned?char?*puts)
{
????SendCMD(0x30);
??SendCMD(AC_TABLE[8*row+col]);
??while(*puts!=‘\0‘)
??{
????if(col==8)

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2011-08-03?00:09??2530lcd\
?????目錄???????????0??2011-08-03?00:09??2530lcd\Debug\
?????目錄???????????0??2011-08-03?00:09??2530lcd\Debug\Exe\
?????文件???????13191??2011-06-07?22:17??2530lcd\Debug\Exe\lcd2530.d51
?????目錄???????????0??2011-08-18?20:19??2530lcd\Debug\List\
?????目錄???????????0??2011-08-03?00:09??2530lcd\Debug\Obj\
?????文件?????????145??2011-06-07?22:20??2530lcd\Debug\Obj\lcd2530.pbd
?????文件???????33376??2011-06-07?22:17??2530lcd\Debug\Obj\main.r51
?????文件?????????161??2011-06-02?10:31??2530lcd\lcd.eww
?????文件????????2102??2011-06-07?22:20??2530lcd\lcd2530.dep
?????文件???????34242??2011-06-02?17:49??2530lcd\lcd2530.ewd
?????文件???????55195??2011-06-02?10:31??2530lcd\lcd2530.ewp
?????文件????????6262??2011-08-18?20:18??2530lcd\main.c
?????文件?????????483??2011-06-06?12:26??2530lcd\main.h
?????目錄???????????0??2011-08-03?00:09??2530lcd\settings\
?????文件????????4170??2011-06-07?22:20??2530lcd\settings\lcd.wsdt
?????文件????????2566??2011-06-07?22:20??2530lcd\settings\lcd2530.cspy.bat
?????文件????????6087??2011-06-07?22:20??2530lcd\settings\lcd2530.dbgdt
?????文件?????????809??2011-06-07?22:20??2530lcd\settings\lcd2530.dni

評論

共有 條評論

相關(guān)資源