16 16點陣顯示漢字原理及顯示程序 #include "config.h" #define DOTLED_LINE_PORT PORTB #define DOTLED_LINE_DDR DDRB #define DOTLED_LINE_PIN PINB #define DOTLED_LINE_SCKT PB1 #define DOTLED_LINE_SCKH PB5 #define DOTLED_LINE_SDA PB3 #define DOTLED_ROW_PORT PORTC #define DOTLED_ROW_DDR DDRC #define DOTLED_ROW_PIN PINC #define DOTLED_ROW_A0 PC0 #define DOTLED_ROW_A1 PC1 #define DOTLED_ROW_A2 PC2 #define DOTLED_ROW_A3 PC3 #define DOTLED_ROW_E PC4 uint8 FONT[] = { /*-- 調入了一幅圖像:這是您新建的圖像 --*/ /*-- 寬度x高度=16x16 --*/ 0x00,0x00,0x00,0x00,0x08,0x38,0x18,0x44,0x08,0x44,0x08,0x04,0x08,0x08,0x08,0x10, 0x08,0x20,0x08,0x40,0x08,0x40,0x08,0x40,0x3E,0x7C,0x00,0x00,0x00,0x00,0x00,0x00 }; static void TransmitByte(uint8 byte); static void SelectRow(uint8 row); static void FlipLatchLine(void); static void TransmitByte(uint8 byte) { uint8 i; for(i = 0 ; i < 8 ; i ++) { if(byte & (1 << i)) { DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SDA); } else { DOTLED_LINE_PORT &= ~_BV(DOTLED_LINE_SDA); } //__delay_cycles(100); DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SCKH); //__delay_cycles(100); DOTLED_LINE_PORT &= ~_BV(DOTLED_LINE_SCKH); //__delay_cycles(100); } } static void SelectRow(uint8 row) { //row -= 1; row |= DOTLED_ROW_PIN & 0xe0; DOTLED_ROW_PORT = row; } static void FlipLatchLine(void) { DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SCKT); DOTLED_LINE_PORT &= ~_BV(DOTLED_LINE_SCKT); } void InitDotLedPort(void) { DOTLED_LINE_PORT &= ~(_BV(DOTLED_LINE_SCKT) | _BV(DOTLED_LINE_SCKH)); DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SDA); DOTLED_LINE_DDR |= _BV(DOTLED_LINE_SCKT) | _BV(DOTLED_LINE_SCKH) | _BV(DOTLED_LINE_SDA); DOTLED_ROW_PORT |= 0x1f; DOTLED_ROW_PORT &= 0xf0; DOTLED_ROW_DDR |= 0x1f; } void EnableRow(boolean IsEnable) { if(IsEnable) { DOTLED_ROW_PORT &= ~_BV(DOTLED_ROW_E); } else { DOTLED_ROW_PORT |= _BV(DOTLED_ROW_E); } } void PrintDotLed(uint8 * buffer) { uint8 i , tmp; for(i = 0 ; i < 16 ; i ++) { tmp = *buffer ++; TransmitByte(~tmp); tmp = *buffer ++; TransmitByte(~tmp); SelectRow(i); FlipLatchLine(); } } void main(void) { InitDotLedPort(); EnableRow(TRUE); while(1) { PrintDotLed(FONT); __delay_cycles(5000); } } //---------------------------------------------------- config.h文件 #ifndef _CONFIG_H #define _CONFIG_H //#define GCCAVR #define CPU_CYCLES 7372800L #ifndef GCCAVR #define _BV(bit) (1 << (bit)) #endif #define MSB 0x80 #define LSB 0x01 #define FALSE 0 #define TRUE 1 typedef unsigned char uint8; typedef unsigned int uint16; typedef unsigned long uint32; typedef unsigned char boolean; #include <ioavr.h> #include <inavr.h> #include "dotled.h" #endif //-----
上傳時間: 2013-11-18
上傳用戶:mnacyf
應用于ucGUI的16*16點陣字庫文件 只要將該文件加入ucGUI的工程中, 再在GUI.H中如下聲明: extern const GUI_FONT GUI_FONT6x8 ...... extern const GUI_FONT GUI_FONT_HZ16x16 //漢字字體 即可使用. 使用實例: static void DemoHZ(void) { const char str[] = GUI_UC_START"中國人民萬歲"GUI_UC_END /* Set ShiftJIS FONT */ GUI_SetFONT(&GUI_FONT_HZ16x16) GUI_DispString(str) }
標簽: ucGUI GUI_FONT GUI_FONT extern
上傳時間: 2014-12-02
上傳用戶:woshini123456
《Visual Basic.NET GDI+技術教程》源碼 《Visual Basic.NET GDI+技術教程》的圖書簡介 GDI+是在Windows窗體應用程序中以編程方式顯示圖形圖像的一種方法。 本書討論GDI+技術、“圖形編輯器”、“圖像”菜單。由三部分組成,第一部分,概述了GDI+及GDI+的新功能,討論了Graphics對象及該對象的方法,狀態和創建,討論了五種畫筆的使用,討論了FONT對象,構造函數、屬性、方法和顏色,討論了Color對象的成員及它們的應用, RGB函數,Alpha混合線條的填充,討論了GraphicsPath對象,該對象的方法及應用,創建軌跡梯度。第二部分,討論使用GDI+顯示圖形圖像;GDI+支持的圖形文件的格式,加載和顯示圖形圖像文件,在控件中顯示圖形圖像。第三部分,討論了“圖形編輯器”、“圖像”菜單;使用“圖形編輯器”、“圖像”菜單制作和編輯圖形圖像的顏色處理。 本書適合于對Visual Basic編輯有一定了解,希望進一步學習Visual Basic.NET的GDI+技術的讀者。
上傳時間: 2015-08-27
上傳用戶:huangld
這是一個移植到vc上的小型ucGUI,有助于容易理解GUI的實現和移植到嵌入式系統上,其中包括了FONT,Widget,Window,Graphs(circle,line,poly,arc),LCDDriver,MemDev等。
上傳時間: 2013-12-21
上傳用戶:wangyi39
Listed below are the typographical conventions used in this guide. – Example C++ code and commands to be typed by the user are in non-bold characters in typewriter FONT. – Items where the user has to supply a name or number are given in lower-case italic characters in typewriter FONT. – Sections marked with a ‡ describe features that are also available in ANSI C.
標簽: typographical conventions commands Example
上傳時間: 2013-12-20
上傳用戶:xiaoxiang
<%@ LANGUAGE="VBSCRIPT" %> <!--#include file="util.asp" --> <% Head="您放入購物車的物品已經全數退回!" Session("ProductList") = "" %> <html> <head> <meta http-equiv="Content-Type" content="text/html charset=gb2312"> <STYLE type=text/css>.main { FONT-SIZE: 9pt } .main1 { FONT-SIZE: 14px } </STYLE> <title>清空購物車</title> </head> <body topmargin="5" bgcolor="#E6E4C4"> <diiv align="center"><center> <table width="100%" border="0" class="table1" bordercolor="#62ACFF" cellspacing="0" class=main1> <tr> <td width="80%" valign="top"> <p align="center" class=main1><%=Head%></p> <p align="center"> <br><input type="button" value="關閉" name="B2" onclick="window.close() " style="FONT-size: 9pt"></td> </tr> </table> </center></div> </body> </html>
標簽: lt LANGUAGE VBSCRIPT include
上傳時間: 2015-11-05
上傳用戶:zhaoq123
Floating Window.It is descendant of TCustomPanel. You can: - Drag on its title bar. - Set title bar on the left (only for truetype FONT) - Show/Hide buttons on title bar - Expand/shrink window (like tool window in CorelDraw)
標簽: title TCustomPanel descendant Floating
上傳時間: 2013-12-20
上傳用戶:wendy15
ch03目錄下: disasm.tgz :作者改寫的反匯編器,可以輸出比較容易接受的匯編格式。 simpleboot.tgz: 作者編寫的簡單boot代碼 ch04目錄下: gba_ucos.tgz : 作者移植的可運行在GBA(或者模擬器)上的uC/OS-II代碼 ch05目錄下: znet.tgz : 作者在uC/OS-II上實現的tcp/ip協議實現代碼 ch09目錄下: FONT.c 字體顯示和變更例程 image1 位圖文件加載與顯示 2win.c 兩個窗口間消息傳遞例程 button 按鈕制作的例程 slider 游戲文件程序
標簽: simpleboot tgz disasm ch
上傳時間: 2014-01-09
上傳用戶:妄想演繹師
=== === === === === === === === === === ==== IBM PC KEYBOARD INFORMATION FOR SOFTWARE DEVELOPERS ================================================================ Sources: PORTS.A of Ralf Brown s interrupt list collection repairfaq.org keyboard FAQ(doesn t appear to exsist) Linux source code Test hardware: New Samsung KB3T001SAXAA 104-key keyboard Old Maxi 2186035-00-21 101-key keyboard NO WARRANTY. NO GUARANTEE. I have tried to make this information accurate. I don t know if I succeeded. Corrections or additional information would be welcome. This is a plain-text document. If you use a word-processor to view it, use a fixed-pitch FONT (like Courier) so columnar data and ASCII art lines up properly.
標簽: INFORMATION DEVELOPERS KEYBOARD SOFTWARE
上傳時間: 2014-08-18
上傳用戶:ecooo
//構造具有指定的標簽的菜單 files = new Menu("文件(F)") compile = new Menu("編輯(E)") see = new Menu("查看(V)") format = new Menu("格式(O)") FONT = new Menu("字體和顏色(F)...") //在格式菜單下再添加一個字體及顏色的菜單 help = new Menu("幫助(H)") //構造具有指定的標簽的菜單項 news = new MenuItem("新建(N)" + " " + "Ctrl+N") open = new MenuItem("打開(O)..." + " " + "Ctrl+O") save = new MenuItem("保存(S)" + " " + "Ctrl+S") other = new MenuItem("另存為(A)...") page = new MenuItem("頁面設置(U)...") mim = new MenuItem("打印(P)..." + " " + "Ctrl+P") quit = new MenuItem("退出(X)")
上傳時間: 2016-02-27
上傳用戶:小儒尼尼奧