//下面是畫圓的程序, //畫線、畫圓、畫各種曲線其實都很簡單,歸根到底就是x、y的二元方程嘛 //對算法感興趣的話建議去找本《計算機圖形學》看看,不是賣關子哦。實在是幾句話說不清除,呵呵 // ---------------------------------------------- //字節 void circleDot(unsigned char x,unsigned char y,char xx,char yy)//內部函數,對稱法畫圓的8個鏡像點 {//對稱法畫圓的8個鏡像點
標簽: 程序
上傳時間: 2014-01-07
上傳用戶:秦莞爾w
it is in image processing field. this code Read TIFF Image then it excute compute histogram and histogram equalization. after that it Write TIFFU unsigned Char.
標簽: processing histogram compute excute
上傳時間: 2016-12-24
上傳用戶:cx111111
幀緩沖#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <asm/page.h> #include <linux/fb.h> #define TRUE 1 #define FALSE 2 //a framebuffer device structure typedef struct fbdev{ int fb unsigned long fb_mem_offset unsigned long fb_mem struct fb_fix_screeninfo fb_fix
上傳時間: 2013-12-11
上傳用戶:bjgaofei
PC與單片機雙向通訊智能溫控程序 #include <AT89X51.H> #include <intrins.h> #define Key_UP P1_0 #define Key_DOWN P1_1 #define Key_SET P1_2 #define RelayOutPort P2_0 #define LEDPort P0 #define DELPort P2_1 #define LEDTwoC P3_6 #define LEDThreeC P3_7 #define TMPort P2_7 #define INBUF_LEN 5 //數據長度 unsigned char inbuf1[INBUF_LEN]={ 0 , 0 , 0 , 0 , 0 } //發送緩沖區 unsigned char inbuf2[50] //接收緩沖區 unsigned char count3 void init_serialcomm( void ) { SCON = 0x50 //SCON: serail mode 1, 8-bit UART, enable ucvr TMOD |= 0x20 //TMOD: timer 1, mode 2, 8-bit reload PCON |= 0x80 //SMOD=1 TH1 = 0xFA //Baud:4800 fosc=11.0592MHz IE |= 0x90 //Enable Serial Interrupt TR1 = 1 // timer 1 run } //向串口發送一個字符 void send_char_com( unsigned char ch) { SBUF=ch while (TI== 0 ) TI= 0
標簽: include intrins define Key_UP
上傳時間: 2014-11-29
上傳用戶:風之驕子
VB遙控播放器紅外遙控解碼 #include <regX52.h> #define c(x) (x*110592/120000) sbit Ir_Pin=P3^2 sbit beep=P2^1 //sbit RELAY=P2^0 #define INBUF_LEN 4 //數據長度 unsigned char inbuf1[INBUF_LEN]={ 0 , 0 , 0 , 0 } //發送緩沖區 unsigned char inbuf2[50] //接收緩沖區 unsigned char count3 void init_serialcomm( void ) { SCON = 0x50 //SCON: serail mode 1, 8-bit UART, enable ucvr T2CON=0x30 TH2=0x00 TL2=0x00 RCAP2H=0xFF RCAP2L=0xDC TR2=1 } //向串口發送一個字符 void send_char_com( unsigned char ch) { SBUF=ch while (TI== 0 ) TI= 0
標簽: include 110592 120000 define
上傳時間: 2013-12-21
上傳用戶:yph853211
液晶 OCM/TG240128 驅動 編程語言: C 原產品硬件ATMega128/1280 ,晶振14.7456M 軟件AVR ICC7.14C 破解版 由產品源碼中提取,詳細的字符和圖行操作.實現LCD內任何位置的定位操作. void LCD_Init(void) void GMoveTo(U8 yline, U8 xcolumn) void TMoveTo(U8 y, U8 x,U8 len) void DispStartLine(U8 gt, U8 line) void LCD_ClrRam (void) void LCD_ON(unsigned char on) void Draw_Pixel(U8 x, U8 y) void LineTo(U8 x0, U8 y0, U8 x1, U8 y1) void Draw_Line(unsigned char x0, unsigned char y0, unsigned char yl) void disp_img(unsigned int x0, unsigned int y0, unsigned int xl, unsigned int yl, const U8 *img) void DispString(unsigned char x, unsigned char y, char* string) void Printf(U8 x, U8 y, char *fmt, ...) ......
標簽: 14.7456 240128 ATMega 1280
上傳時間: 2013-12-27
上傳用戶:youke111
這個是我調通的在2410下運行文件系統的程序. 用2410驅動sd卡來實現fat文件系統. 歡迎大家來測試. 用法很簡單, 如下 FILE *fp // 文件指針 unsigned char temp[24]="3.wav" // 文件明需要放在數組里 while(!initialize_media()) // 初始化sd卡 { Uart_Printf("sd initializing....\n") } Uart_Printf("sd ready\n") fp=fopen(temp, READ) // 打開文件就可以用了, 函數和標準c中的一樣,所以不能加載stdio.h if(!fp) { Uart_Printf("open file wrong\n") while(1) } Uart_Printf("open file successed\n")
上傳時間: 2013-12-30
上傳用戶:xlcky
sbit CS = P1^0 sbit SCK = P1^6 sbit SIN = P1^7 sbit SOUT = P1^5 sbit WP = P1^1 void XReady(void) void XSendByte(unsigned char b) unsigned char XGetByte(void) void XWriteEn(void) void XWriteDis(void) unsigned char XReadStatus(void) void XWipPoll(void) void XWriteStatus(unsigned char b) void XReadData(unsigned char *m,unsigned char x,unsigned char n) void XWriteData(unsigned char *m,unsigned char x,unsigned char n) #define XResetDog() {CS=0 CS=1 } void InitX5045(void)
上傳時間: 2014-01-17
上傳用戶:lijinchuan
Open-source, free, multi-platform BASIC compiler, with syntax similar MS-QuickBASIC (including the GFX statements), that adds new features such as pointers, unsigned data types, inline assembly, a pre-processor and many others.
標簽: multi-platform MS-QuickBASIC Open-source including
上傳時間: 2017-05-06
上傳用戶:cursor
基于單片機的10根線束線纜檢測器的源程序 #pragma sfr #pragma DI #pragma EI #pragma NOP //#pragma interrupt INTTM010 isr_INTTM000 #pragma interrupt INTTM80 isr_INTTM80 //#pragma interrupt INTTMH1 isr_INTTMH1 #pragma section @@CNST OPT AT 80H const char OPTION=0x94 typedef unsigned char uchar typedef unsigned int uint //==PORT DEFINE== #define SEND1_P P4.1 #define SEND2_P P4.2 #define SEND3_P P4.3 #define SEND4_P P4.4 #define SEND5_P P4.5 #define SEND6_P P4.6 #define SEND7_P P4.7 #define SEND8_P P13.0 #define SEND9_P P2.3 #define SEND10_P P2.2
標簽: pragma interrupt INTTM 010
上傳時間: 2017-05-25
上傳用戶:sunjet