Quá trình hình thành tư liệu hướng dẫn cách chấm mạch eprom trong KIT vi xử lý p6
Số trang: 11
Loại file: pdf
Dung lượng: 147.16 KB
Lượt xem: 22
Lượt tải: 0
Xem trước 2 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
LUAÂÄN VAÊN TOÁT NGHIEÄP
56
;KeyKRB : Chuong trinh con quet ban phim. Ma cua phim an duoc cat ;trong thanh ; ghi A. ;DELAY : Chuong trinh con tri hoan theo thoi hang 0.1 ms. He so tri ;hoan duoc ; nap vao thanh ghi A. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++ ;##################################################################### ;Khai bao cac nhan duoc su dung. ;##################################################################### RegCNT equ 03h PortA equ 00h PortB equ 01h PortC equ 02h CntI79 equ 0A001h DataI79 equ 0A000h KEYBRD equ 0216h DELAY equ 0310h KeyGO equ 17h ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ End
LUAÂÄN VAÊN TOÁT NGHIEÄP
57
B.Module Demo.cpp
#include #include #include #include #include #include #include #include #include #include #include #include...
Nội dung trích xuất từ tài liệu:
Quá trình hình thành tư liệu hướng dẫn cách chấm mạch eprom trong KIT vi xử lý p6 56 LUAÂÄN VAÊN TOÁT NGHIEÄP ;KeyKRB : Chuong trinh con quet ban phim. Ma cua phim an duoc cat ;trong thanh ; ghi A. ;DELAY : Chuong trinh con tri hoan theo thoi hang 0.1 ms. He so tri ;hoan duoc ; nap vao thanh ghi A. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++ ;##################################################################### ;Khai bao cac nhan duoc su dung. ;##################################################################### RegCNT equ 03h PortA equ 00h PortB equ 01h PortC equ 02h CntI79 equ 0A001h DataI79 equ 0A000h KEYBRD equ 0216h DELAY equ 0310h KeyGO equ 17h ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ End 57 LUAÂÄN VAÊN TOÁT NGHIEÄP B.Module Demo.cpp #include #include #include #include #include #include #include #include #include #include #include #include screen.h #include mouse.h #include button.hpp #include textbox.hpp #include list.hpp #include disklist.hpp #include send.hpp #define NumBox 2 #define NumBut 2 LPEVENT lpEvent; //bien chua cac bien co chuot char szMessage[128]; BUTTON But[NumBut],NutKiem; TEXTBOX Box[NumBox],Port; char DiskName[27],DName; char ftype[15]=*.prn; char inter_Path[100]=; char RequF[100]; unsigned int St_address,End_address=0; char Sta_hex[5],End_hex[5]; //--------------------------------------------------------- int TestPressedButton(int x,LPEVENT lpEvent); int TestPressTexbox(int x,LPEVENT lpEvent,char layra[],unsigned *attribp); void MainProgram(); int TestPressList(LIST L,LPEVENT lpEvent,char s[],unsigned *attrib,char *typ);//nhap bang liet ke int SendFile(); //--------------------------------------------------------- void main(void) { InitGraphics(); InitValues(Download Program.); InitScreen(); if (!InitMouse(&MainWindow.rViewPort)) { OutMessage(Mouse driver not found. Init mouse and return); getch(); closegraph(); exit(1); } ShowMouse(); MainProgram(); closegraph(); } 58 LUAÂÄN VAÊN TOÁT NGHIEÄP //--------------------------------------------------------- void MainProgram() { char Name[20],buffer[MAXPATH]; unsigned attrib,Attribp; SEND Send; LIST L; But[0].InitButton(200,380,250,400,LIGHTGRAY,Send); But[1].InitButton(400,380,450,400,LIGHTGRAY,Exit); Box[0].InitTextBox(50,70,477,90,GREEN,LIGHTGREEN,Open File); Port.InitTextBox(50,270,250,290,GREEN,LIGHTGREEN,Out port); Port.GetS_in(LPT1); L.InitList(480,70,500,90,LIGHTGRAY); But[0].OutButton();//xuat nut lenh But[1].OutButton();//xuat nut lenh Box[0].OutTextBox();//xuat hop nhap text Port.OutTextBox(); L.Show(); setcolor(BLACK); line(50,150,250,150); line(50,150,50,215); setcolor(WHITE); line(50,215,250,215); line(250,150,250,215); outtextxy(50,130,Free memory request); outtextxy(55,158,Start ad :); outtextxy(55,178,End ad :); outtextxy(55,198,Total :); OutMessage(Click mouse to chose action); int kkkk; char RequestFile[15]=; do//kiem tra nhap chuot chon cong viec { ShowMouse(); lpEvent = GetEvent();//lay bien co chuot if(TestPressedButton(2,lpEvent)==0)//kiem tra xem da click vao nut nao //0:nhan OK { char InName[100],OutName[100]; Box[0].GetS(InName); if(InName[strlen(InName)-1]=='\\') InName[strlen(InName)-1]='\0'; _dos_getfileattr(InName,&attrib); if(attrib==16) { OutMessage(); OutError(Please enter a file name); OutMessage(Click mouse to chose action); } else//la file { if(End_address!=0) { if(OutError(Are you sure ?)) { OutMessage(Sending... Press Esc to stop if time is over.); Send.CatFile(Sta_hex,End_hex,inter_Path); 59 LUAÂÄN VAÊN TOÁT NGHIEÄP Send.Out(); HideMouse(); if(Send.Out()!=-1) { HideMouse(); OutMessage(); OutError(Task is complete.); OutMessage(Click mouse to choose action); } else { HideMouse(); OutMessage(Click mouse to choose action); } } } } }//if(TestPressedButton if(TestPressList(L,lpEvent,Name,&attrib,ftype)==1) //chon OK { switch (attrib) { case 16:chdir(Name); getcwd(buffer, MAXPATH);//lay duong dan hien thoi vao buffer strcpy(inter_Path,buffer); Box[0].GetS_in(inter_Path); Box[0].OutTextBox(); break; default: getcwd(buffer, MAXPATH);//lay duong dan hien thoi vao buffer strcpy(inter_Path,buffer); if(inter_Path[strlen(inter_Path)-1]!='\\') strcat(inter_Path,\\); strcat(inter_Path,Name); Box[0].GetS_in(inter_Path); Box[0].DuongDan(inter_Path); Box[0].OutTextBox(); break; }//end switch }//if(TestPressList( //chon Cancel TestPressTexbox(NumBox,lpEvent,inter_Path,&Attribp);//Path lay ra duong dan cho fi ...
Nội dung trích xuất từ tài liệu:
Quá trình hình thành tư liệu hướng dẫn cách chấm mạch eprom trong KIT vi xử lý p6 56 LUAÂÄN VAÊN TOÁT NGHIEÄP ;KeyKRB : Chuong trinh con quet ban phim. Ma cua phim an duoc cat ;trong thanh ; ghi A. ;DELAY : Chuong trinh con tri hoan theo thoi hang 0.1 ms. He so tri ;hoan duoc ; nap vao thanh ghi A. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++ ;##################################################################### ;Khai bao cac nhan duoc su dung. ;##################################################################### RegCNT equ 03h PortA equ 00h PortB equ 01h PortC equ 02h CntI79 equ 0A001h DataI79 equ 0A000h KEYBRD equ 0216h DELAY equ 0310h KeyGO equ 17h ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ End 57 LUAÂÄN VAÊN TOÁT NGHIEÄP B.Module Demo.cpp #include #include #include #include #include #include #include #include #include #include #include #include screen.h #include mouse.h #include button.hpp #include textbox.hpp #include list.hpp #include disklist.hpp #include send.hpp #define NumBox 2 #define NumBut 2 LPEVENT lpEvent; //bien chua cac bien co chuot char szMessage[128]; BUTTON But[NumBut],NutKiem; TEXTBOX Box[NumBox],Port; char DiskName[27],DName; char ftype[15]=*.prn; char inter_Path[100]=; char RequF[100]; unsigned int St_address,End_address=0; char Sta_hex[5],End_hex[5]; //--------------------------------------------------------- int TestPressedButton(int x,LPEVENT lpEvent); int TestPressTexbox(int x,LPEVENT lpEvent,char layra[],unsigned *attribp); void MainProgram(); int TestPressList(LIST L,LPEVENT lpEvent,char s[],unsigned *attrib,char *typ);//nhap bang liet ke int SendFile(); //--------------------------------------------------------- void main(void) { InitGraphics(); InitValues(Download Program.); InitScreen(); if (!InitMouse(&MainWindow.rViewPort)) { OutMessage(Mouse driver not found. Init mouse and return); getch(); closegraph(); exit(1); } ShowMouse(); MainProgram(); closegraph(); } 58 LUAÂÄN VAÊN TOÁT NGHIEÄP //--------------------------------------------------------- void MainProgram() { char Name[20],buffer[MAXPATH]; unsigned attrib,Attribp; SEND Send; LIST L; But[0].InitButton(200,380,250,400,LIGHTGRAY,Send); But[1].InitButton(400,380,450,400,LIGHTGRAY,Exit); Box[0].InitTextBox(50,70,477,90,GREEN,LIGHTGREEN,Open File); Port.InitTextBox(50,270,250,290,GREEN,LIGHTGREEN,Out port); Port.GetS_in(LPT1); L.InitList(480,70,500,90,LIGHTGRAY); But[0].OutButton();//xuat nut lenh But[1].OutButton();//xuat nut lenh Box[0].OutTextBox();//xuat hop nhap text Port.OutTextBox(); L.Show(); setcolor(BLACK); line(50,150,250,150); line(50,150,50,215); setcolor(WHITE); line(50,215,250,215); line(250,150,250,215); outtextxy(50,130,Free memory request); outtextxy(55,158,Start ad :); outtextxy(55,178,End ad :); outtextxy(55,198,Total :); OutMessage(Click mouse to chose action); int kkkk; char RequestFile[15]=; do//kiem tra nhap chuot chon cong viec { ShowMouse(); lpEvent = GetEvent();//lay bien co chuot if(TestPressedButton(2,lpEvent)==0)//kiem tra xem da click vao nut nao //0:nhan OK { char InName[100],OutName[100]; Box[0].GetS(InName); if(InName[strlen(InName)-1]=='\\') InName[strlen(InName)-1]='\0'; _dos_getfileattr(InName,&attrib); if(attrib==16) { OutMessage(); OutError(Please enter a file name); OutMessage(Click mouse to chose action); } else//la file { if(End_address!=0) { if(OutError(Are you sure ?)) { OutMessage(Sending... Press Esc to stop if time is over.); Send.CatFile(Sta_hex,End_hex,inter_Path); 59 LUAÂÄN VAÊN TOÁT NGHIEÄP Send.Out(); HideMouse(); if(Send.Out()!=-1) { HideMouse(); OutMessage(); OutError(Task is complete.); OutMessage(Click mouse to choose action); } else { HideMouse(); OutMessage(Click mouse to choose action); } } } } }//if(TestPressedButton if(TestPressList(L,lpEvent,Name,&attrib,ftype)==1) //chon OK { switch (attrib) { case 16:chdir(Name); getcwd(buffer, MAXPATH);//lay duong dan hien thoi vao buffer strcpy(inter_Path,buffer); Box[0].GetS_in(inter_Path); Box[0].OutTextBox(); break; default: getcwd(buffer, MAXPATH);//lay duong dan hien thoi vao buffer strcpy(inter_Path,buffer); if(inter_Path[strlen(inter_Path)-1]!='\\') strcat(inter_Path,\\); strcat(inter_Path,Name); Box[0].GetS_in(inter_Path); Box[0].DuongDan(inter_Path); Box[0].OutTextBox(); break; }//end switch }//if(TestPressList( //chon Cancel TestPressTexbox(NumBox,lpEvent,inter_Path,&Attribp);//Path lay ra duong dan cho fi ...
Tìm kiếm theo từ khóa liên quan:
giáo trình đồ họa luận văn đồ họa tài liệu đồ họa kỹ thuật đồ họa kỹ năng đồ họaGợi ý tài liệu liên quan:
-
Giáo trình Autocad - Nghề: Quản trị mạng máy tính - Trình độ: Cao đẳng nghề (Phần 2)
52 trang 209 0 0 -
Đề cương chi tiết môn học Kỹ thuật đồ họa và xử lý ảnh
5 trang 175 1 0 -
Luận văn tốt nghiệp: Tìm hiểu về SIMULINK trong MATLAB
50 trang 155 0 0 -
Hướng dẫn mã hóa hình ảnh phần 4
9 trang 139 0 0 -
38 trang 136 0 0
-
Giáo trình Kỹ thuật đồ họa cho ngành Đa phương tiện: Phần 1
106 trang 87 1 0 -
Sử dụng Layout Trong AutoCad [DCL]
26 trang 85 0 0 -
GIÁO TRÌNH ĐỒ HỌA_TÓM TẮT BÀI GIẢNG THIẾT KẾ ỨNG DỤNG II_ĐỒ ÁN MÔN: THIẾT KẾ LỊCH
10 trang 81 0 0 -
Kỹ thuật sắp xếp ảnh minh họa bằng phương pháp contact sheet theo thứ tự dòng và cột p5
18 trang 57 0 0 -
157 trang 46 0 0