-
大小: 1.58MB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2023-08-15
- 語言: 其他
- 標(biāo)簽: 脈沖??實(shí)時(shí)顯示??
資源簡(jiǎn)介
實(shí)現(xiàn)脈沖實(shí)時(shí)顯示,像心電圖一樣。代碼完全顛覆一般開發(fā)者的寫法,簡(jiǎn)單易懂。

代碼片段和文件信息
#include?“chinese.h“
#include?“chfont.h“
#include?“l(fā)cd.h“ ???
////////////////////////////////////////////////////////////////////////////////// ?
//本程序只供學(xué)習(xí)使用,未經(jīng)作者許可,不得用于其它任何用途
//Mini?STM32開發(fā)板——擴(kuò)展實(shí)驗(yàn)
//自定義漢字顯示??代碼 ???
//正點(diǎn)原子@ALIENTEK
//技術(shù)論壇:www.openedv.com
//修改日期:2010/7/6
//版本:V1.0
//版權(quán)所有,盜版必究。
//Copyright(C)?正點(diǎn)原子?2009-2019
//All?rights?reserved
//////////////////////////////////////////////////////////////////////////////////? ??
????
//在LCD上的(x,y)處畫點(diǎn)
//color:點(diǎn)的顏色
void?LCD_Draw_Point(u16?xu16?yu16?color)
{
u16?temp;
temp=POINT_COLOR;
POINT_COLOR=color;
????LCD_DrawPoint(xy);
POINT_COLOR=temp;
}
//在指定位置?顯示1個(gè)16*16的漢字
//(xy):漢字顯示的位置
//index:tfont數(shù)組里面的第幾個(gè)漢字
//color:這個(gè)漢字的顏色
void?Test_Show_CH_Font16(u16?xu16?yu8?indexu16?color)
{??? ????
u8?temptt1;
u16?y0=y; ???
????for(t=0;t<32;t++)//每個(gè)16*16的漢字點(diǎn)陣?有32個(gè)字節(jié)
????{???
if(t<16)temp=tfont16[index*2][t];??????//前16個(gè)字節(jié)
else?temp=tfont16[index*2+1][t-16];????//后16個(gè)字節(jié) ??????????????????????????
????????for(t1=0;t1<8;t1++)
{
if(temp&0x80)LCD_Draw_Point(xycolor);//畫實(shí)心點(diǎn)
else?LCD_Draw_Point(xyBACK_COLOR);???//畫空白點(diǎn)(使用背景色)
temp<<=1;
y++;
if((y-y0)==16)
{
y=y0;
x++;
break;
}
}?? ?
????}??????????
}
//在指定位置?顯示1個(gè)24*24的漢字
//(xy):漢字顯示的位置
//index:tfont數(shù)組里面的第幾個(gè)漢字
//color:這個(gè)漢字的顏色
void?Test_Show_CH_Font24(u16?xu16?yu8?indexu16?color)
{??? ????
u8?temptt1;
u16?y0=y; ???
????for(t=0;t<72;t++)//每個(gè)24*24的漢字點(diǎn)陣?有72個(gè)字節(jié)
????{???
if(t<24)temp=tfont24[index*3][t];???????????//前24個(gè)字節(jié)
else?if(t<48)temp=tfont24[index*3+1][t-24];?//中24個(gè)字節(jié) ??????????????????????????
????????else?temp=tfont24[index*3+2][t-48];?????????//后24個(gè)字節(jié)
????for(t1=0;t1<8;t1++)
{
if(temp&0x80)LCD_Draw_Point(xycolor);//畫實(shí)心點(diǎn)
else?LCD_Draw_Point(xyBACK_COLOR);???//畫空白點(diǎn)(使用背景色)
temp<<=1;
y++;
if((y-y0)==24)
{
y=y0;
x++;
break;
}
}?? ?
????}??????????
}
//測(cè)試2個(gè)漢字顯示函數(shù)
void?TEST_FONT(void)
{
u8?t;
u8?x;
x=30;
for(t=0;t<5;t++)//6個(gè)漢字
{
Test_Show_CH_Font16(x?10tBLACK);
x+=16;
}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????4249??2011-11-23?17:01??脈沖數(shù)時(shí)時(shí)顯示\EX\chfont.h
?????文件???????2367??2012-03-02?14:35??脈沖數(shù)時(shí)時(shí)顯示\EX\chinese.c
?????文件????????690??2011-01-13?23:06??脈沖數(shù)時(shí)時(shí)顯示\EX\chinese.h
?????文件???????2351??2012-03-04?16:53??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\ADC\adc.c
?????文件????????693??2011-11-22?21:50??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\ADC\adc.h
?????文件???????1345??2010-06-07?16:30??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\DMA\dma.c
?????文件????????378??2010-06-07?16:30??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\DMA\dma.h
?????文件???????1046??2012-03-07?14:47??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\EXTI\exti.c
?????文件????????628??2012-03-02?09:26??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\EXTI\exti.h
?????文件???????1795??2011-12-06?17:28??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\KEY\key.c
?????文件????????835??2011-12-06?17:42??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\KEY\key.h
?????文件??????16155??2010-06-21?11:18??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\LCD\FONT.H
?????文件??????27439??2012-03-07?10:27??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\LCD\ILI93xx.c
?????文件???????8443??2011-11-11?16:05??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\LCD\LCD.h
?????文件???????1094??2011-12-06?17:38??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\LED\led.c
?????文件????????288??2010-05-27?17:30??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\LED\led.h
?????文件??????16156??2010-03-19?17:16??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\OLED\FONT.H
?????文件???????6856??2011-01-12?21:02??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\OLED\oled.c
?????文件???????1625??2011-01-12?21:02??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\OLED\oled.h
?????文件???????3102??2011-01-12?21:34??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\REMOTE\remote.c
?????文件????????998??2011-01-12?21:34??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\REMOTE\remote.h
?????文件???????7932??2011-01-12?22:04??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\RTC\rtc.c
?????文件???????1383??2011-01-12?21:15??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\RTC\rtc.h
?????文件???????1330??2012-03-07?14:47??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\TIMER\timer.c
?????文件????????724??2011-01-12?20:59??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\TIMER\timer.h
?????文件???????2088??2011-01-12?20:56??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\WDG\wdg.c
?????文件????????756??2011-01-12?20:56??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\WDG\wdg.h
?????文件???????1894??2011-01-12?21:18??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\WKUP\wkup.c
?????文件????????728??2011-01-12?21:18??脈沖數(shù)時(shí)時(shí)顯示\HARDWARE\WKUP\wkup.h
?????文件????????399??2011-04-23?10:24??脈沖數(shù)時(shí)時(shí)顯示\keilkilll.bat
............此處省略98個(gè)文件信息
評(píng)論
共有 條評(píng)論