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

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

資源簡介

TMP275完整C程序,帶5110顯示程序

資源截圖

代碼片段和文件信息

#include?
#include?“english_6x8.h“
#include?“write_chinese_string.h“
#include?“5110.h“

void?int_spi()
{??
??
??P2DIR|=spi_cs+RST+DC;
??LCD_CSH;?????????????//?NOT?SELECT?
??U0CTL|=SWRST;???
??U0CTL|=CHAR+SYNC+MM;
??U0TCTL|=SSEL1+SSEL0+STC;??//3?BIT?AND?SMCLK?AS?SPI?CLOCK????
??U0TCTL|=CKPH;
??U0TCTL&=~CKPL;???????????//CKPL?CKPH:01?rising?Write?data
??U0BR0=0X02;
??U0BR1=0X00;
??U0MCTL=0X00;?
??ME1|=USPIE0;
??U0CTL&=~SWRST;
??IE1&=~UTXIE0;
??IE1&=~URXIE0;
??P3SEL|=0x0E;
??P3DIR|=BIT1+BIT3;?
}
/*-----------------------------------------------------------------------
LCD_init??????????:?5110LCD初始化
-----------------------------------------------------------------------*/

void?delay_1us(void)?????????????????//1us延時函數
{
???unsigned?int?i;
??for(i=0;i<100;i++);
???
}

??void?delay_1ms(void)?????????????????//1ms延時函數
??{
???unsigned?int?i;
???for?(i=0;i<1140;i++);
??}
??
void?delay_nms(unsigned?int?n)???????//N?ms延時函數
??{
???unsigned?int?i=0;
???for?(i=0;i???delay_1ms();
??}

void?LCD_init(void)
??{
??//?產生一個讓LCD復位的低電平脈沖
??//?LCD_RST?=?0;

????LCD_RSTL;
????delay_1us();

??//?LCD_RST?=?1;
????LCD_RSTH;
????
//?關閉LCD
???//LCD_CE?=?0;
????LCD_CSL;
????delay_1us();
//?使能LCD
???//LCD_CE?=?1;
????LCD_CSH;
????delay_1us();

????LCD_write_byte(0x21?0); //?使用擴展命令設置LCD模式
????LCD_write_byte(0xc8?0); //?設置偏置電壓
????LCD_write_byte(0x06?0); //?溫度校正
????LCD_write_byte(0x13?0); //?1:48
????LCD_write_byte(0x20?0); //?使用基本命令
????LCD_clear(); ????????//?清屏
????LCD_write_byte(0x0c?0); //?設定顯示模式,正常顯示
????????
????//?關閉LCD
????LCD_CSL;
??}

/*-----------------------------------------------------------------------
LCD_clear?????????:?LCD清屏函數
-----------------------------------------------------------------------*/
void?LCD_clear(void)
??{
????unsigned?int?i;

????LCD_write_byte(0x0c?0);
????LCD_write_byte(0x80?0);

????for?(i=0;?i<504;?i++)
??????LCD_write_byte(0?1);
??}

/*-----------------------------------------------------------------------
LCD_set_XY????????:?設置LCD坐標函數

輸入參數:X???????:0-83
??????????Y???????:0-5
-----------------------------------------------------------------------*/
void?LCD_set_XY(unsigned?char?X?unsigned?char?Y)
??{
????LCD_write_byte(0x40?|?Y?0); //?column
????LCD_write_byte(0x80?|?X?0);?????????? //?row
??}

/*-----------------------------------------------------------------------
LCD_write_char????:?顯示英文字符

輸入參數:c???????:顯示的字符;
-----------------------------------------------------------------------*/
void?LCD_write_char(unsigned?char?c)
??{
????unsigned?char?line;

????c?-=?32;

????for?(line=0;?line<6;?line++)
??????LCD_write_byte(font6x8[c][line]?1);
??}
/*-----------------------------------------------------------------------
LCD_write_char????:?顯示一個字節的英文字符

輸入參數:c???????:顯示的字符;
-----------------------------------------------------------------------*/
void?LCD_write_aby

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

?????文件???????5549??2012-08-13?00:47??tmp275\5110.c

?????文件????????729??2012-07-26?22:31??tmp275\5110.h

?????文件??????13407??2009-07-28?12:07??tmp275\Backup?of?tem.ewd

?????文件??????44951??2009-07-28?12:07??tmp275\Backup?of?tem.ewp

?????文件??????27324??2012-08-13?00:47??tmp275\Debug\Exe\tem.d43

?????文件??????43789??2012-08-13?00:47??tmp275\Debug\Obj\main.r43

?????文件????????121??2012-09-28?10:23??tmp275\Debug\Obj\tem.pbd

?????文件???????4883??2012-08-11?13:02??tmp275\english_6x8.h

?????文件???????2729??2012-08-13?00:47??tmp275\iic.c

?????文件????????968??2012-08-13?00:47??tmp275\main.c

?????文件??????????0??2012-09-28?10:25??tmp275\path.txt

?????文件???????1127??2012-09-28?10:26??tmp275\settings\tem.cspy.bat

?????文件???????6173??2012-09-28?10:26??tmp275\settings\tem.dbgdt

?????文件???????1524??2012-09-28?10:26??tmp275\settings\tem.dni

?????文件???????4402??2012-09-28?10:26??tmp275\settings\TMP275.wsdt

?????文件???????3433??2012-07-26?21:37??tmp275\settings\x.wsdt

?????文件???????2352??2012-09-28?10:26??tmp275\tem.dep

?????文件??????20085??2012-08-13?00:17??tmp275\tem.ewd

?????文件??????50337??2012-07-26?22:28??tmp275\tem.ewp

?????文件????????157??2009-07-28?12:01??tmp275\TMP275.eww

?????文件????????577??2012-07-26?22:29??tmp275\write_chinese_string.h

?????文件?????????53??2012-10-01?14:02??tmp275\說明.txt

?????目錄??????????0??2012-07-26?18:59??tmp275\Debug\Exe

?????目錄??????????0??2012-07-26?18:59??tmp275\Debug\List

?????目錄??????????0??2012-09-28?10:26??tmp275\Debug\Obj

?????目錄??????????0??2012-07-26?18:59??tmp275\Debug

?????目錄??????????0??2012-07-26?21:38??tmp275\settings

?????目錄??????????0??2012-10-01?14:00??tmp275

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

???????????????234670????????????????????28

............此處省略1個文件信息

評論

共有 條評論

相關資源