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ý p8
Số trang: 11
Loại file: pdf
Dung lượng: 145.51 KB
Lượt xem: 7
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:
Tham khảo 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ý p8, công nghệ thông tin, đồ họa - thiết kế - flash phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
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ý p8 78LUAÂÄN VAÊN TOÁT NGHIEÄPextern int GetMtx();extern int GetMty();//extern EVENT OldEvent();extern int Double(LPEVENT);#endif// End of MOUSE.HIX.MODULE MOUSE.CPP#include #include //#include #include #include mouse.hvoid SetMouseRange(LPRECT lpRect)// Dat vung di chuyen cho chuot{ _AX = 0x07;//ham 07 cua ngat 33 de dinh gioi han di chuyen ngang _CX = lpRect->left; _DX = lpRect->right; geninterrupt(INT_MOUSE);//INT_MOUSE=0x33:ngat 33 _AX = 0x08;//ham 08 cua ngat 33 dinh gioi han di chuyen doc cho contro _CX = lpRect->top; _DX = lpRect->bottom; geninterrupt(INT_MOUSE);}//---------------------------------------------------------int InitMouse(LPRECT lpRect)// Khoi dong chuot{ int ax; _AX = 0; geninterrupt(INT_MOUSE); ax = _AX; if (ax == 0) return FALSE; SetMouseRange(lpRect); return TRUE;}//---------------------------------------------------------void ShowMouse(void)// Hien thi chuot{ _AX = 1; geninterrupt(INT_MOUSE);}//---------------------------------------------------------void HideMouse(void)// Dau chuot{ _AX = 2; geninterrupt(INT_MOUSE);}//---------------------------------------------------------#include #include void MouseRead(LPEVENT lpEvent)// Tra ve bien co nhan duoc tu chuot : Nut trai hay phai duoc an{ 79LUAÂÄN VAÊN TOÁT NGHIEÄP int bx; _AX = 3; geninterrupt(INT_MOUSE); bx = _BX; //cx = _CX; //dx = _DX; lpEvent->Msg = bx; lpEvent->Posx = _CX; lpEvent->Posy = _DX; gettime(lpEvent->t);}//---------------------------------------------------------void ResetEvent(LPEVENT lpEvent){ lpEvent->Msg = 0; lpEvent->Posx = lpEvent->Posy = 0;}//---------------------------------------------------------EVENT PrevEvent, CurEvent;//---------------------------------------------------------LPEVENT GetEvent(void){ ResetEvent(&CurEvent); MouseRead(&CurEvent); // chuyen sang toa do ViewPort CurEvent.Posx = CurEvent.Posx-MainWindow.rViewPort.left; CurEvent.Posy = CurEvent.Posy-MainWindow.rViewPort.top; // xet trang thai chuot co thay doi hay khongif((CurEvent.Posx!=PrevEvent.Posx)&&(CurEvent.Posy!=PrevEvent.Posy)) CurEvent.Msg |= M_CHANGE; PrevEvent = CurEvent;// delay(50); return (&CurEvent);}//---------------------------------------------------------void DeviceRelease(int Msg){ while(GetEvent()->Msg&Msg);}//---------------------------------------------------------int Double(LPEVENT lpEvent){ if(lpEvent->Msg==1) { delay(100); ResetEvent(lpEvent); lpEvent=GetEvent(); if(lpEvent->Msg==1) //if((abs(CurEvent.Posx-oldEvent.Posx)) 80LUAÂÄN VAÊN TOÁT NGHIEÄPvoid MouseText(int x,int y,int color1,int color2)//,char s[])//gia daunhay con tro{ HideMouse();// int h=textheight(s); int w=5; int color=getcolor(); do { for(int i=0;i 81LUAÂÄN VAÊN TOÁT NGHIEÄP RECT rSys; /*System area of window*/ RECT rTitleBar; /*Caption area of window*/ RECT rMenuBar; /*Rectangle in which windows menu islocated*/ RECT rMessage; /* Rectangle in which messages is display}WINDOWS;// Dinh nghia cac ham va bien dung toan cucextern int Xc, Yc; // Goc toa doextern int LineColor;extern int VP_WIDTH;extern int VP_HEIGHT;extern WINDOWS MainWindow;extern void InitGraphics(void);extern void OutMessage(char *Msg);extern void InitScreen(void);extern void InitValues(char *lpCaption);extern int OutError(char *s);#endif// End of SCREEN.HXI.MODULE SCREEN.CPP#include #include #include #include #include #include screen.h#include mouse.hint T_SIZE, W_SIZE, H_SIZE, W_CHAR, H_CHAR, MSG_SIZE;int COLOR_WINDOW;int COLOR_BUTTON;int COLOR_BORDER;int COLOR_CAPTION;int COLOR_TEXT;int VP_WIDTH;int VP_HEIGHT;int Maxx, Maxy; // Maxx - Maxy of screenWINDOWS MainWindow;//int Xc, Yc; // Goc toa do//int LineColor = MAGENTA; // Mau cua duong thang can ve - Dung trongthu tuc SetPixel//---------------------------------------------------------void InitGraphics(void)// Khoi tao che do do hoa{ int grDrv=DETECT, grMode; int ErrCode; initgraph(&grDrv, &grMode, ); ErrCode = graphresult(); if(ErrCode!= grOk) { printf(Graphics error: %s , grapherrormsg(ErrCode)); printf(Press any key to halt...); getch(); exit(1); /* return with error code */ } Maxx = getmaxx(); ...
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ý p8 78LUAÂÄN VAÊN TOÁT NGHIEÄPextern int GetMtx();extern int GetMty();//extern EVENT OldEvent();extern int Double(LPEVENT);#endif// End of MOUSE.HIX.MODULE MOUSE.CPP#include #include //#include #include #include mouse.hvoid SetMouseRange(LPRECT lpRect)// Dat vung di chuyen cho chuot{ _AX = 0x07;//ham 07 cua ngat 33 de dinh gioi han di chuyen ngang _CX = lpRect->left; _DX = lpRect->right; geninterrupt(INT_MOUSE);//INT_MOUSE=0x33:ngat 33 _AX = 0x08;//ham 08 cua ngat 33 dinh gioi han di chuyen doc cho contro _CX = lpRect->top; _DX = lpRect->bottom; geninterrupt(INT_MOUSE);}//---------------------------------------------------------int InitMouse(LPRECT lpRect)// Khoi dong chuot{ int ax; _AX = 0; geninterrupt(INT_MOUSE); ax = _AX; if (ax == 0) return FALSE; SetMouseRange(lpRect); return TRUE;}//---------------------------------------------------------void ShowMouse(void)// Hien thi chuot{ _AX = 1; geninterrupt(INT_MOUSE);}//---------------------------------------------------------void HideMouse(void)// Dau chuot{ _AX = 2; geninterrupt(INT_MOUSE);}//---------------------------------------------------------#include #include void MouseRead(LPEVENT lpEvent)// Tra ve bien co nhan duoc tu chuot : Nut trai hay phai duoc an{ 79LUAÂÄN VAÊN TOÁT NGHIEÄP int bx; _AX = 3; geninterrupt(INT_MOUSE); bx = _BX; //cx = _CX; //dx = _DX; lpEvent->Msg = bx; lpEvent->Posx = _CX; lpEvent->Posy = _DX; gettime(lpEvent->t);}//---------------------------------------------------------void ResetEvent(LPEVENT lpEvent){ lpEvent->Msg = 0; lpEvent->Posx = lpEvent->Posy = 0;}//---------------------------------------------------------EVENT PrevEvent, CurEvent;//---------------------------------------------------------LPEVENT GetEvent(void){ ResetEvent(&CurEvent); MouseRead(&CurEvent); // chuyen sang toa do ViewPort CurEvent.Posx = CurEvent.Posx-MainWindow.rViewPort.left; CurEvent.Posy = CurEvent.Posy-MainWindow.rViewPort.top; // xet trang thai chuot co thay doi hay khongif((CurEvent.Posx!=PrevEvent.Posx)&&(CurEvent.Posy!=PrevEvent.Posy)) CurEvent.Msg |= M_CHANGE; PrevEvent = CurEvent;// delay(50); return (&CurEvent);}//---------------------------------------------------------void DeviceRelease(int Msg){ while(GetEvent()->Msg&Msg);}//---------------------------------------------------------int Double(LPEVENT lpEvent){ if(lpEvent->Msg==1) { delay(100); ResetEvent(lpEvent); lpEvent=GetEvent(); if(lpEvent->Msg==1) //if((abs(CurEvent.Posx-oldEvent.Posx)) 80LUAÂÄN VAÊN TOÁT NGHIEÄPvoid MouseText(int x,int y,int color1,int color2)//,char s[])//gia daunhay con tro{ HideMouse();// int h=textheight(s); int w=5; int color=getcolor(); do { for(int i=0;i 81LUAÂÄN VAÊN TOÁT NGHIEÄP RECT rSys; /*System area of window*/ RECT rTitleBar; /*Caption area of window*/ RECT rMenuBar; /*Rectangle in which windows menu islocated*/ RECT rMessage; /* Rectangle in which messages is display}WINDOWS;// Dinh nghia cac ham va bien dung toan cucextern int Xc, Yc; // Goc toa doextern int LineColor;extern int VP_WIDTH;extern int VP_HEIGHT;extern WINDOWS MainWindow;extern void InitGraphics(void);extern void OutMessage(char *Msg);extern void InitScreen(void);extern void InitValues(char *lpCaption);extern int OutError(char *s);#endif// End of SCREEN.HXI.MODULE SCREEN.CPP#include #include #include #include #include #include screen.h#include mouse.hint T_SIZE, W_SIZE, H_SIZE, W_CHAR, H_CHAR, MSG_SIZE;int COLOR_WINDOW;int COLOR_BUTTON;int COLOR_BORDER;int COLOR_CAPTION;int COLOR_TEXT;int VP_WIDTH;int VP_HEIGHT;int Maxx, Maxy; // Maxx - Maxy of screenWINDOWS MainWindow;//int Xc, Yc; // Goc toa do//int LineColor = MAGENTA; // Mau cua duong thang can ve - Dung trongthu tuc SetPixel//---------------------------------------------------------void InitGraphics(void)// Khoi tao che do do hoa{ int grDrv=DETECT, grMode; int ErrCode; initgraph(&grDrv, &grMode, ); ErrCode = graphresult(); if(ErrCode!= grOk) { printf(Graphics error: %s , grapherrormsg(ErrCode)); printf(Press any key to halt...); getch(); exit(1); /* return with error code */ } Maxx = getmaxx(); ...
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ọaTà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 210 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 137 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 83 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 47 0 0