數(shù)模\轉(zhuǎn)換器和模\數(shù)轉(zhuǎn)換器在單片機(jī)系統(tǒng)中的應(yīng)用:A\D轉(zhuǎn)換器和D\A轉(zhuǎn)換器在MCS-51系列單片機(jī)系統(tǒng)中的應(yīng)用
標(biāo)簽: MCS 單片機(jī)系統(tǒng) 中的應(yīng)用 51
上傳時間: 2013-12-18
上傳用戶:tuilp1a
指定一個數(shù)字轉(zhuǎn)換回十進(jìn)位,八進(jìn)位,十六進(jìn)位#include <stdio.h> #include <stdlib.h> int main(void) { int number =89 printf("數(shù)字 %d\n",number) /* %d 為十進(jìn)位輸出格式*/ printf("八進(jìn)位為 %o\n",number) /* %o 為八進(jìn)位輸出格式*/ printf("十六進(jìn)位為%x\n",number) /* %x 為十六進(jìn)位輸出格式*/ system("pause") return 0 }
標(biāo)簽: include int stdlib stdio
上傳時間: 2013-11-29
上傳用戶:tyler
一個基于GTK+的單詞數(shù)值計算器,1、 按照規(guī)則計算單詞的值,如果 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 26個字母(全部用大寫)的值分別為 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26,如: WINJACK這個單詞的值就為:W+I+N+J+A+C+K=23+9+14+1+3+11=71% HARDWORK=H+A+R+D+W+O+R+D=8+1+18+4+23+15+18+11=98% LOVE=L+O+V+E=12+15+22+5=54% LUCK=L+U+C+K=12+21+3+11=47% ATTITUDE= A+T+T+I+T+U+D+E=1+20+20+9+20+24+4+5=100% 2、對程序的界面布局參考如下圖所示,在第一個單行文本框輸入一個單詞,點(diǎn)擊“計算”按鈕,按照以上算法計算出該單詞的值。 3、如果在最下面的單行文本框輸入一個文件路徑,此文件每行記錄一個單詞,那么經(jīng)過程序計算出各個單詞的值,并把結(jié)果輸出到當(dāng)前目錄下result.txt文件中。如果文件不存在,應(yīng)該提示錯誤。
上傳時間: 2014-01-11
上傳用戶:康郎
隨著微電子技術(shù)的不斷發(fā)展,微處理器芯片的集成程度越來越高,單片機(jī)已可以在一塊芯片上同時集成CPU、存儲器、定時器/計數(shù)器、并行和串行接口、看門狗、前置放大器、A/D轉(zhuǎn)換器、D/A轉(zhuǎn)換器等多種電路,這就很容易將計算機(jī)技術(shù)與測量控制技術(shù)結(jié)合,組成智能化測量控制系統(tǒng)。這種技術(shù)促使機(jī)器人技術(shù)也有了突飛猛進(jìn)的發(fā)展,目前人們已經(jīng)完全可以設(shè)計并制造出具有某些特殊功能的簡易智能機(jī)器人。
上傳時間: 2014-01-27
上傳用戶:1159797854
Lorsque vous créez et enregistrez des documents Macromedia Flash MX 2004 et Macromedia Flash MX Professionnel 2004 dans l’environnement auteur de Flash, ils sont au format FLA. Pour afficher un document dans Macromedia Flash Player, vous devez le publier ou l’exporter au format SWF. Remarque : Pour plus d’informations sur la publication ou l’exportation d’un fichier, consultez le Chapitre 15, Publication, page 299 ou le Chapitre 16, Exportation, page 333. Vous pouvez ajouter du contenu multimédia à un document Flash et gérer ce contenu dans la bibliothèque. L’explorateur d’animations vous permet d’afficher et d’organiser l’ensemble des éléments dans un document Flash. Les options Annuler et Répéter, le panneau Historique et le menu Commandes vous permettent d’automatiser vos tâ ches dans un document.
標(biāo)簽: Macromedia Flash enregistrez documents
上傳時間: 2017-07-12
上傳用戶:epson850
128單片機(jī)自帶A/D接口的A/D轉(zhuǎn)換程序,用C語言編寫
標(biāo)簽: A/D轉(zhuǎn)換 128單片機(jī)
上傳時間: 2015-06-04
上傳用戶:a251341772
keil C51 v6.12 完全解密版的安裝說明 安裝方法是先將V6.12安裝程序用復(fù)制到某個目錄下,如復(fù)制到D:\keilC51 然后執(zhí)行D:\keilC51\setup\setup.exe 安裝程序,選擇安裝Eval Version版進(jìn) 行安裝。 注冊碼:K199U-20071-12A9U 當(dāng)出現(xiàn)Please insert the add-on disk的提示畫面,可按next按鈕(不用 插入軟盤)。 安裝好之后就可以使用,沒有代碼大小的限制,這是完全版,比 Eval版增 加浮點(diǎn)庫等內(nèi)容。
標(biāo)簽: keilC51v612
上傳時間: 2015-07-17
上傳用戶:f29876
主要程序代碼有 單片機(jī)與LED數(shù)碼管接口 LED大屏幕顯示器和接口 字符LCD 液晶顯示和接口 單片機(jī)與鍵盤接口 A/D轉(zhuǎn)換器接口 D/A 轉(zhuǎn)換器接口 串行通信基礎(chǔ) MCS-51的串行接口 MCS-51單片機(jī)雙機(jī)通信 RS-232C串行通信總線標(biāo)準(zhǔn)及其接口 存儲器的擴(kuò)展 串行口的I/O口擴(kuò)展 數(shù)字鐘的設(shè)計與制作 單片機(jī)溫度檢測記錄系統(tǒng)
上傳時間: 2016-04-12
上傳用戶:eruth
#include <malloc.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define NULL 0 #define MaxSize 30 typedef struct athletestruct /*運(yùn)動員*/ { char name[20]; int score; /*分?jǐn)?shù)*/ int range; /**/ int item; /*項(xiàng)目*/ }ATH; typedef struct schoolstruct /*學(xué)校*/ { int count; /*編號*/ int serial; /**/ int menscore; /*男選手分?jǐn)?shù)*/ int womenscore; /*女選手分?jǐn)?shù)*/ int totalscore; /*總分*/ ATH athlete[MaxSize]; /**/ struct schoolstruct *next; }SCH; int nsc,msp,wsp; int ntsp; int i,j; int overgame; int serial,range; int n; SCH *head,*pfirst,*psecond; int *phead=NULL,*pafirst=NULL,*pasecond=NULL; void create(); void input () { char answer; head = (SCH *)malloc(sizeof(SCH)); /**/ head->next = NULL; pfirst = head; answer = 'y'; while ( answer == 'y' ) { Is_Game_DoMain: printf("\nGET Top 5 when odd\nGET Top 3 when even"); printf("\n輸入運(yùn)動項(xiàng)目序號 (x<=%d):",ntsp); scanf("%d",pafirst); overgame = *pafirst; if ( pafirst != phead ) { for ( pasecond = phead ; pasecond < pafirst ; pasecond ++ ) { if ( overgame == *pasecond ) { printf("\n這個項(xiàng)目已經(jīng)存在請選擇其他的數(shù)字\n"); goto Is_Game_DoMain; } } } pafirst = pafirst + 1; if ( overgame > ntsp ) { printf("\n項(xiàng)目不存在"); printf("\n請重新輸入"); goto Is_Game_DoMain; } switch ( overgame%2 ) { case 0: n = 3;break; case 1: n = 5;break; } for ( i = 1 ; i <= n ; i++ ) { Is_Serial_DoMain: printf("\n輸入序號 of the NO.%d (0<x<=%d): ",i,nsc); scanf("%d",&serial); if ( serial > nsc ) { printf("\n超過學(xué)校數(shù)目,請重新輸入"); goto Is_Serial_DoMain; } if ( head->next == NULL ) { create(); } psecond = head->next ; while ( psecond != NULL ) { if ( psecond->serial == serial ) { pfirst = psecond; pfirst->count = pfirst->count + 1; goto Store_Data; } else { psecond = psecond->next; } } create(); Store_Data: pfirst->athlete[pfirst->count].item = overgame; pfirst->athlete[pfirst->count].range = i; pfirst->serial = serial; printf("Input name:) : "); scanf("%s",pfirst->athlete[pfirst->count].name); } printf("\n繼續(xù)輸入運(yùn)動項(xiàng)目(y&n)?"); answer = getchar(); printf("\n"); } } void calculate() /**/ { pfirst = head->next; while ( pfirst->next != NULL ) { for (i=1;i<=pfirst->count;i++) { if ( pfirst->athlete[i].item % 2 == 0 ) { switch (pfirst->athlete[i].range) { case 1:pfirst->athlete[i].score = 5;break; case 2:pfirst->athlete[i].score = 3;break; case 3:pfirst->athlete[i].score = 2;break; } } else { switch (pfirst->athlete[i].range) { case 1:pfirst->athlete[i].score = 7;break; case 2:pfirst->athlete[i].score = 5;break; case 3:pfirst->athlete[i].score = 3;break; case 4:pfirst->athlete[i].score = 2;break; case 5:pfirst->athlete[i].score = 1;break; } } if ( pfirst->athlete[i].item <=msp ) { pfirst->menscore = pfirst->menscore + pfirst->athlete[i].score; } else { pfirst->womenscore = pfirst->womenscore + pfirst->athlete[i].score; } } pfirst->totalscore = pfirst->menscore + pfirst->womenscore; pfirst = pfirst->next; } } void output() { pfirst = head->next; psecond = head->next; while ( pfirst->next != NULL ) { // clrscr(); printf("\n第%d號學(xué)校的結(jié)果成績:",pfirst->serial); printf("\n\n項(xiàng)目的數(shù)目\t學(xué)校的名字\t分?jǐn)?shù)"); for (i=1;i<=ntsp;i++) { for (j=1;j<=pfirst->count;j++) { if ( pfirst->athlete[j].item == i ) { printf("\n %d\t\t\t\t\t\t%s\n %d",i,pfirst->athlete[j].name,pfirst->athlete[j].score);break; } } } printf("\n\n\n\t\t\t\t\t\t按任意建 進(jìn)入下一頁"); getchar(); pfirst = pfirst->next; } // clrscr(); printf("\n運(yùn)動會結(jié)果:\n\n學(xué)校編號\t男運(yùn)動員成績\t女運(yùn)動員成績\t總分"); pfirst = head->next; while ( pfirst->next != NULL ) { printf("\n %d\t\t %d\t\t %d\t\t %d",pfirst->serial,pfirst->menscore,pfirst->womenscore,pfirst->totalscore); pfirst = pfirst->next; } printf("\n\n\n\t\t\t\t\t\t\t按任意建結(jié)束"); getchar(); } void create() { pfirst = (struct schoolstruct *)malloc(sizeof(struct schoolstruct)); pfirst->next = head->next ; head->next = pfirst ; pfirst->count = 1; pfirst->menscore = 0; pfirst->womenscore = 0; pfirst->totalscore = 0; } void Save() {FILE *fp; if((fp = fopen("school.dat","wb"))==NULL) {printf("can't open school.dat\n"); fclose(fp); return; } fwrite(pfirst,sizeof(SCH),10,fp); fclose(fp); printf("文件已經(jīng)成功保存\n"); } void main() { system("cls"); printf("\n\t\t\t 運(yùn)動會分?jǐn)?shù)統(tǒng)計\n"); printf("輸入學(xué)校數(shù)目 (x>= 5):"); scanf("%d",&nsc); printf("輸入男選手的項(xiàng)目(x<=20):"); scanf("%d",&msp); printf("輸入女選手項(xiàng)目(<=20):"); scanf("%d",&wsp); ntsp = msp + wsp; phead = (int *)calloc(ntsp,sizeof(int)); pafirst = phead; pasecond = phead; input(); calculate(); output(); Save(); }
標(biāo)簽: 源代碼
上傳時間: 2016-12-28
上傳用戶:150501
郭天祥版教程用 安裝方法是先將V6.12安裝程序用復(fù)制到某個目錄下,如復(fù)制到D:\keilC51 然后執(zhí)行D:\keilC51\setup\setup.exe 安裝程序,選擇安裝Eval Version版進(jìn) 行安裝。
上傳時間: 2017-06-19
上傳用戶:359981736
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1