版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、EB1 EB2 Tester 12软件设计TLCDDisplay : extends TWindow第一部分 原理图1.1TLCDDisplay.SchDoc 1.2LED7.C/ _ _ _ _/ | | | _| _ |_ |/ | | | |_ | | | | / / | | | _| | | | | / / | |_ | |_ | |_| | / / |_|_|_/ /_/ (c 2004 PurPer/ Started: 24.08.2004 Ch.W./ 7 Segment LED driver for NEB#include hware.h#include led7.h#defi
2、ne MaxDigit 5/ lookup table for 7 segment digit patterns 0.Fconst _rom char Seg_Pattern=0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F,0x77,0x7C,0x39,0x5E,0x79,0x71,0x00; static unsigned char CurrentDigit = 0;/-/ Sets cursor position/-void Seg7_SetCurrentPosition(unsigned char NewPosCurrentDigit
3、= NewPos;if(CurrentDigit MaxDigit CurrentDigit = 0;/-/ Gets cursor position/-unsigned char Seg7_GetCurrentPosition(voidreturn CurrentDigit;/-/ writes current digit to digit pattern and advances cursor to next digit/-void Seg7_WriteDigitP(unsigned char Pattern(*(_bsfr volatile unsigned char * (Seg7_S
4、TART_ADDR + (8*CurrentDigit = Pattern;if(+CurrentDigit MaxDigit CurrentDigit = 0;/-/ writes current digit to decimal digit and advances cursor to next digit/ if the current character is . the decimal point is set on the previous/ digit/-void Seg7_WriteDigitN(unsigned char cunsigned char pattern=0;sw
5、itch(ccase : / clearpattern = 0;break;case.: / TODO: implement decimal pointbreak;default:if(c=0 & (c=A & (c=Fpattern = c-(A-10;elsepattern = 0x10; / catch all: blankpattern = Seg_Patternpattern;Seg7_WriteDigitP(pattern; / this handles cursor advance as well/-/ Sets all segments to values starting a
6、t Pattern/ Segment A = Bit0 . Segment G = Bit6, Decimal Point is Bit 7/-void Seg7_Set(char *Patternunsigned char SfrAddr = Seg7_START_ADDR; / initialise to address of digit A unsigned char i;for(i=0;i6;i+(*(_bsfr volatile unsigned char * SfrAddr = *Pattern+;SfrAddr +=8;/- / Sets All digits to bitpat
7、tern DigitValue/ Segment A = Bit0 . Segment G = Bit6, Decimal Point is Bit 7/- void Seg7_SetAll(unsigned char DigitValueunsigned char i;char Pattern6;for(i=0;i6;i+Patterni=DigitValue;Seg7_Set(Pattern;1.3Undo.PAS . Summary Demonstration of the PCBs Undo system. Three procedures to demonstrate how the
8、 Undo system works - as one large Undo or multiple smaller Undos, and create,modify and delete 1/ Execute UndoEach to undo each object repeatedly with several undos 2/ Execute UndoAll procedure to remove all objects with one Undo 3/ Create, Modify and Undo this new object Copyright (c 2006 by PurPer
9、 Limited .Procedure Create2PCBObjectsWithTwoUndos;VarDepth : Integer;Board : IPCB_Board;Fill1 : IPCB_Fill1;Fill2 : IPCB_Fill2;BeginIf PCBServer = Nil Then Exit;CreateNewDocumentFromDocumentKind(PCB;Board := PCBServer.GetCurrentPCBBoard;If Board = Nil Then Exit;/ Initialize robots in PCB ServerPCBSer
10、ver.PreProcess;Fill1 := PCBServer.PCBObjectFactory(eFillObject, eNoDimension, eCreate_Default;Fill1.X1Location := MilsToCoord(4000;Fill1.Y1Location := MilsToCoord(4000;Fill1.X2Location := MilsToCoord(4400;Fill1.Y2Location := MilsToCoord(4400;Fill1.Rotation := 0;Fill1.Layer := eTopLayer;Board.AddPCBO
11、bject(Fill1;/ Notify the robots that the pcb object has been registered.PCBServer.SendMessageToRobots(Board.I_ObjectAddress, c_Broadcast, PCBM_BoardRegisteration, Fill1.I_ObjectAddress; / Clean up robots in PCB ServerPCBServer.PostProcess;/ Initialize robots in PCB ServerPCBServer.PreProcess;Fill2 :
12、= PCBServer.PCBObjectFactory(eFillObject, eNoDimension, eCreate_Default;Fill2.X1Location := MilsToCoord(5000;Fill2.Y1Location := MilsToCoord(3000;Fill2.X2Location := MilsToCoord(5500;Fill2.Y2Location := MilsToCoord(4000;Fill2.Rotation := 45;Fill2.Layer := eTopLayer;Board.AddPCBObject(Fill2;/ Notify
13、the robots that the pcb object has been registered.PCBServer.SendMessageToRobots(Board.I_ObjectAddress, c_Broadcast, PCBM_BoardRegisteration, Fill2.I_ObjectAddress;/ Clean up robots in PCB ServerPCBServer.PostProcess;Client.SendMessage(PCB:Zoom, Action=Redraw , 255, Client.CurrentView;End; .Procedur
14、e Create2PCBObjectsWithOneUndo;VarBoard : IPCB_Board;Fill1 : IPCB_Fill1;Fill2 : IPCB_Fill2;BeginCreateNewDocumentFromDocumentKind(PCB;Board := PCBServer.GetCurrentPCBBoard;If Board = Nil Then Exit;PCBServer.PreProcess;Fill1 := PCBServer.PCBObjectFactory(eFillObject, eNoDimension, eCreate_Default;Fil
15、l1.X1Location := MilsToCoord(4000;Fill1.Y1Location := MilsToCoord(4000;Fill1.X2Location := MilsToCoord(4400;Fill1.Y2Location := MilsToCoord(4400;Fill1.Rotation := 0;Fill1.Layer := eTopLayer;Board.AddPCBObject(Fill1;/ notify the event manager that the pcb object has been registered.PCBServer.SendMess
16、ageToRobots(Board.I_ObjectAddress, c_Broadcast, PCBM_BoardRegisteration, Fill1.I_ObjectAddress;Fill2 := PCBServer.PCBObjectFactory(eFillObject, eNoDimension, eCreate_Default;Fill2.X1Location := MilsToCoord(5000;Fill2.Y1Location := MilsToCoord(3000;Fill2.X2Location := MilsToCoord(5500;Fill2.Y2Locatio
17、n := MilsToCoord(4000;Fill2.Rotation := 45;Fill2.Layer := eTopLayer;Board.AddPCBObject(Fill2;/ notify the event manager that the pcb object has been registered.PCBServer.SendMessageToRobots(Board.I_ObjectAddress, c_Broadcast, PCBM_BoardRegisteration, Fill2.I_ObjectAddress;PCBServer.PostProcess;Clien
18、t.SendMessage(PCB:Zoom, Action=Redraw , 255, Client.CurrentView;End; .VarFill : IPCB_Fill; .Procedure CreateObject(Dummy : Integer = 0;BeginPCBServer.PreProcess;Fill := PCBServer.PCBObjectFactory(eFillObject, eNoDimension, eCreate_Default;Fill.X1Location := MilsToCoord(4000;Fill.Y1Location := MilsTo
19、Coord(4000;Fill.X2Location := MilsToCoord(4400;Fill.Y2Location := MilsToCoord(4400;Fill.Rotation := 0;Fill.Layer := eTopLayer;/ Adds the Fill object into the PCB database for the current PCB document.Board.AddPCBObject(Fill;PCBServer.PostProcess;End; . Procedure ModifyObject(Dummy : Integer = 0;BeginPCBServer.PreProcess;/Undo the fill object.PCBServer.SendMessageToRobots(Fill.I_ObjectAddress, c_Broadcast, PCBM_BeginModify , c_NoEventData;Fill.Layer := eBottomLayer;PCBServer.SendMessageToRobots(Fill.I_ObjectAddress, c_Broadcast, PCBM_EndModify , c_NoEventData;PCBServer.PostProcess;End; .
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 黔南布依族苗族自治州2024贵州黔南州招募“金牌岗位”青年就业见习人员69人第一批都匀市笔试历年参考题库典型考点附带答案详解(3卷合一)
- 长春市2024吉林长春汽车经济技术开发区面向社会招聘编制外合同制人员44人笔试历年参考题库典型考点附带答案详解(3卷合一)
- 辽源市2024吉林辽源市拉拉河社会福利院招聘人员(一)笔试历年参考题库典型考点附带答案详解(3卷合一)
- 茂南区2024广东茂名市茂南区“百千万工程”指挥部办公室招聘政府雇员3人笔试历年参考题库典型考点附带答案详解(3卷合一)
- 章丘区2024年山东济南市章丘区所属单位引进急需紧缺专业人才(5人)笔试历年参考题库典型考点附带答案详解(3卷合一)
- 深圳市2024年5月广东深圳市大鹏新区南澳办事处招聘编外人员8人笔试历年参考题库典型考点附带答案详解(3卷合一)
- 河南省2024河南省机关事务管理局所属事业单位招聘事业单位人员22人笔试历年参考题库典型考点附带答案详解(3卷合一)
- 柳江区2024广西柳州市柳江区穿山镇事业单位直接考核入编招聘3人笔试历年参考题库典型考点附带答案详解(3卷合一)
- 山西省2024山西省文物局事业单位招聘18人笔试历年参考题库典型考点附带答案详解(3卷合一)
- 国家事业单位招聘2024农业农村部食物与营养发展研究所博士后招收7人笔试历年参考题库典型考点附带答案详解(3卷合一)
- 红色景区展馆游览服务礼仪制作人江西旅游商贸职业刘欢01课件
- 生态教育心理干预-洞察及研究
- 电梯井钢结构施工合同(2025版)
- 抽成合同协议书范本
- 生物利用度和生物等效性试验生物样品的处理和保存要求
- 全生命周期健康管理服务创新实践
- 2025-2030年中国宠物疼痛管理行业市场现状供需分析及投资评估规划分析研究报告
- epc甲方如何管理办法
- 2025年河北省中考化学真题 (解析版)
- 【个案工作介入青少年厌学问题研究12000字(论文)】
- 村级事务监督工作报告
评论
0/150
提交评论