本文介紹了一種在單片機應用中實現(xiàn)高效、多功能鍵盤掃描分析的設(shè)計思想、方法和原理。該演算法可以實現(xiàn)組合鍵、自動連續(xù)等功能,並具有軟、硬體開銷小,效率高等特點。該演算法已應用於實際產(chǎn)品中。 關(guān)鍵字:鍵盤掃描;單片機
上傳時間: 2013-12-14
上傳用戶:fredguo
C語言的開發(fā)模式, 是編寫.c的Source Code, 再經(jīng)由Compiler編譯成Object Code。所謂Object Code指的是和硬體相關(guān)的機器指令, 也就是說當我們想要把C程式移植到不同的硬體時, 必須要重新Compile,以產(chǎn)生新的執(zhí)行檔。除了需要重新編譯外,新系統(tǒng)是否具備應用程式所需的程式庫,include的檔案是否相容, 也是程式能否在新機器上順利編譯和執(zhí)行的條件之一。
標簽: Code Object Compiler Source
上傳時間: 2017-04-02
上傳用戶:yph853211
L3_1.m: 純量量化器的設(shè)計(程式) L3_2.m: 量化造成的假輪廓(程式) L3_3.m: 向量量化器之碼簿的產(chǎn)生(程式) L3_4.m: 利用LBG訓練三個不同大小與維度的碼簿並分別進行VQ(程式) gau.m: ML量化器設(shè)計中分母的計算式(函式) gau1.m: ML量化器設(shè)計中分子的計算式(函式) LBG.m: LBG訓練法(函式) quantize.m:高斯機率密度函數(shù)的非均勻量化(函式) VQ.m: 向量量化(函式) L3_2.bmp: 影像檔 lena.mat: Matlab的矩陣變數(shù)檔
上傳時間: 2013-12-26
上傳用戶:jiahao131
設(shè)有由n個不相同的整數(shù)組成的數(shù)列,記為: a(1)、a(2)、……、a(n)且a(i)<>a(j) (i<>j) 例如3,18,7,14,10,12,23,41,16,24。 若存在i1<i2<i3< … < ie 且有a(i1)<a(i2)< … <a(ie)則稱為長度為e的不下降序列。如上例中3,18,23,24就是一個長度為4的不下降序列,同時也有3,7,10,12,16,24長度為6的不下降序列。程序要求,當原數(shù)列給出之后,求出最長的不下降序列。
上傳時間: 2013-12-14
上傳用戶:tonyshao
Fortran - Tóm tắ t nộ i dung mô n họ c Các khái niệ m và yế u tố trong ngô n ngữ lậ p trình FORTRAN. Các câ u lệ nh củ a ngô n ngữ FORTRAN. Cơ bả n về chư ơ ng chư ơ ng dị ch và mô i trư ờ ng lậ p trình DIGITAL Visual Fortran. Viế t và chạ y các chư ơ ng trình cho các bài toán đ ơ n giả n bằ ng ngô n ngữ FORTRAN.
上傳時間: 2013-12-25
上傳用戶:songrui
c++ Ngô n ngữ C cho vi đ iề u khiể n Các tài liệ u tham khả o, ebook. Programming Microcontrollers in C (Ted Van Sickle) C Programming for Microcontrollers (Joe Pardue SmileyMicros.com ) Programming 16-Bit PIC Microcontrollers in C (Jucio di jasio ) C Programming for AVR Programming embedded system I,II (Michael J . Pont ) ( các tài liệ u này đ ã down load về )
上傳時間: 2017-07-29
上傳用戶:壞壞的華仔
迷宮問題以一個m*n的長方陣表示迷宮,0和1分別表示迷宮中的通路和障礙.設(shè)計一個程序,對任意設(shè)定的迷宮,求出一條入口到出口的通路,或的出沒有通路的結(jié)論. {基本要求}: (1)實現(xiàn)一個以鏈表作存儲結(jié)構(gòu)的棧類型,然后編寫一個求解迷宮的非遞歸程序。求得的通路以三元組(i,j,d)的形式輸出,其中:(i,j)指示迷宮中的一個坐標,d表示走到下一個坐標的方向. (2)編寫遞歸形式的算法,求迷宮中所有通路. (3)以方陣形式輸出迷宮及其通路
標簽: 迷宮
上傳時間: 2014-01-03
上傳用戶:zhengzg
#include "string.h" #include "ctype.h" #include "stdio.h" search(char pd[]) {FILE *fp; int time=0,i=0,j=0,add[80],k=0,m; char *ch, str[900]; m=strlen(pd); if((fp=fopen("haha.txt","r"))==NULL) { printf("Cannot open this file\n"); exit(0); } for(;!feof(fp);i++) { str[i]=fgetc(fp); if(tolower(str[i])==tolower(pd[k])) {k++; if(k==m) if(!isalpha(i-m)&&!isalpha((str[i++]=fgetc(fp)))) { time++; add[j]=i-m+1; j++; k=0; } else k=0; } } if(time) { printf("The time is:%d\n",time); printf("The adders is:\n"); for(i=0;i
標簽: 查詢學會少年宮
上傳時間: 2016-12-29
上傳用戶:767483511
#include "string.h" #include "ctype.h" #include "stdio.h" search(char pd[]) {FILE *fp; int time=0,i=0,j=0,add[80],k=0,m; char *ch, str[900]; m=strlen(pd); if((fp=fopen("haha.txt","r"))==NULL) { printf("Cannot open this file\n"); exit(0); } for(;!feof(fp);i++) { str[i]=fgetc(fp); if(tolower(str[i])==tolower(pd[k])) {k++; if(k==m) if(!isalpha(i-m)&&!isalpha((str[i++]=fgetc(fp)))) { time++; add[j]=i-m+1; j++; k=0; } else k=0; } } if(time) { printf("The time is:%d\n",time); printf("The adders is:\n"); for(i=0;i<j;i++) printf("%5d",add[i]); if(i%5==0) printf("\n"); getch(); fclose(fp); } else printf("Sorry!Cannot find the word(^_^)"); } main() { char pd[10],choose='y'; int flag=1; while(flag) {printf("In put the word you want to seqarch:"); scanf("%s",pd); search(strlwr(pd)); printf("\nWould you want to continue?(Y/N):"); getchar(); scanf("%c",&choose); if((tolower(choose))=='n') flag=0; else flag=1; } printf("Thanks for your using!Bye-bye!\n"); getch(); }
標簽: 學生專用
上傳時間: 2016-12-29
上傳用戶:767483511
#include <stdio.h> #include <stdlib.h> #define SMAX 100 typedef struct SPNode { int i,j,v; }SPNode; struct sparmatrix { int rows,cols,terms; SPNode data [SMAX]; }; sparmatrix CreateSparmatrix() { sparmatrix A; printf("\n\t\t請輸入稀疏矩陣的行數(shù),列數(shù)和非零元素個數(shù)(用逗號隔開):"); scanf("%d,%d,%d",&A.cols,&A.terms); for(int n=0;n<=A.terms-1;n++) { printf("\n\t\t輸入非零元素值(格式:行號,列號,值):"); scanf("%d,%d,%d",&A.data[n].i,&A.data[n].j,&A.data[n].v); } return A; } void ShowSparmatrix(sparmatrix A) { int k; printf("\n\t\t"); for(int x=0;x<=A.rows-1;x++) { for(int y=0;y<=A.cols-1;y++) { k=0; for(int n=0;n<=A.terms-1;n++) { if((A.data[n].i-1==x)&&(A.data[n].j-1==y)) { printf("%8d",A.data[n].v); k=1; } } if(k==0) printf("%8d",k); } printf("\n\t\t"); } } void sumsparmatrix(sparmatrix A) { SPNode *p; p=(SPNode*)malloc(sizeof(SPNode)); p->v=0; int k; k=0; printf("\n\t\t"); for(int x=0;x<=A.rows-1;x++) { for(int y=0;y<=A.cols-1;y++) { for(int n=0;n<=A.terms;n++) { if((A.data[n].i==x)&&(A.data[n].j==y)&&(x==y)) { p->v=p->v+A.data[n].v; k=1; } } } printf("\n\t\t"); } if(k==1) printf("\n\t\t對角線元素的和::%d\n",p->v); else printf("\n\t\t對角線元素的和為::0"); } int main() { int ch=1,choice; struct sparmatrix A; A.terms=0; while(ch) { printf("\n"); printf("\n\t\t 稀疏矩陣的三元組系統(tǒng) "); printf("\n\t\t*********************************"); printf("\n\t\t 1------------創(chuàng)建 "); printf("\n\t\t 2------------顯示 "); printf("\n\t\t 3------------求對角線元素和"); printf("\n\t\t 4------------返回 "); printf("\n\t\t*********************************"); printf("\n\t\t請選擇菜單號(0-3):"); scanf("%d",&choice); switch(choice) { case 1: A=CreateSparmatrix(); break; case 2: ShowSparmatrix(A); break; case 3: SumSparmatrix(A); break; default: system("cls"); printf("\n\t\t輸入錯誤!請重新輸入!\n"); break; } if (choice==1||choice==2||choice==3) { printf("\n\t\t"); system("pause"); system("cls"); } else system("cls"); } }
上傳時間: 2020-06-11
上傳用戶:ccccy
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1