登录
首页 » Others » 基于STM32的使用12864做的俄罗斯方块

基于STM32的使用12864做的俄罗斯方块

于 2020-12-11 发布
0 340
下载积分: 1 下载次数: 1

代码说明:

基于STM32的嵌入式系统,使用12864作为显示屏的俄罗斯方块源代码。程序通过四个按键控制,实现方块的旋转和位移。,每种方块的出现机率相等,随机产生方块,具有提前显示下一个方块功能。使用STM32官方库函数作为开发蓝本,读起来更加通俗易懂。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 高精度捷联惯性导航系统Matlab工具箱
    高精度捷联惯性导航系统Matlab工具箱
    2020-12-18 16:29:10下载
    积分:1
  • SD卡SPI模式初始化和读取Verilog代码及相应仿真模型
    Verilog SD卡SPI模式初始化和读取Verilog代码及相应仿真模型,其中仿真模型仅支持 CMD0 CMD8 CMD55 CMD41完成SD卡初始化 及CMD17读取数据,供各位参考指正。
    2020-12-05下载
    积分:1
  • CAPL入门(中文)
    CAPL编程入门指导(中文) ,很不错的一份资料,
    2020-12-06下载
    积分:1
  • UltraEdit_17+UltraCompare+注册机
    UltraEdit_17.10.0.1010+UltraCompare v8.10.0.1014UE为免注册版,UC为注册版,有注册机(可用于UE及UC,生成注册码时,需要选择好)UE不用注册,UC注册时断开网络,选择脱机激活,注册用户和密码,随便填(必须包含字母)。原来会有两个用户码生成,打开注册机,在products选择为ultraCompare v8.x 把这两个用户码写在注册机上,然后生成,填入即可完成注册。
    2021-05-07下载
    积分:1
  • 永磁无刷直流电机技术
    对无刷直流电机的深入分析,详细深入介绍BLDC,控制策略方法。
    2020-12-09下载
    积分:1
  • CSerialPort串口类最新修正版2016-08-10
    CSerialPortFirst Version by Remon Spekreijse on 2000-02-08 http://www.codeguru.com/cpp/i-n/network/serialcommunications/article.php/c2483/A-communication-class-for-serial-port.htmSecond Version by mrlong on 2007-12-25 https://code.google.com/p/mycom/增加 ClosePort增加 WriteToPort 两个方法增加 SendData
    2020-12-09下载
    积分:1
  • 剔除测量数据中异常值的若干方法
    剔除测量数据中异常值的若干方法,第1期何平:剔除测量数据中异常值的若干方法21表3n,a相应的Y值3.91-00.010.010.6790.576190.4620.889).765120.6420.5460.5350.4500.7800.642130.6150.52l210.5240.44060.6980.560140.6410.5460.5140.4300.6370.507150.616230.50580.6830.554160.5950.5070.4130).406100.447180.5610.475表4Z,与n值的对应关系3458902131415161820301050zc1.381.541.651.731.801.881.921.962.002.032.072.102.132.152.202.242.392.492.58表51组测量数据(已按顺序从小到大排好)810t20.3020.3920.3920.3920.4020.4020.4]20.4120.4220.4220.4220.4320.4320.4320.43查表3得到临界值Y。(15,0.05)=0.525,根据也都有其局限性。例如:所有的准则都是以数据按正态狄克逊准则,由于Y2>%(15,0.05),故t值是异常分布为前提的,当偏离正态分布时,判断的可靠性将受值,应予舍弃。影响。还有几个准则对n值的要求也各有不同:当大样程序框图如图3所示本测定时,使用莱因达准则最适合,但当小样本测定24肖维勒准则应用软件流程图及实例时,则一般推荐使用格拉布斯准则和狄克逊准则。而肖计算算术平均值t=20.405维勒准则在某种程度上讲仅仅是莱因达准则的补充计算剩余误差v及均方差a=0.01498在实际测量中,一般取测量次数n=5~20次,特从表4中查得相应的Z值(n=15,故Z2=2.13)别精密的测量,也很少超过100~200次。因此,使用根据肖维勒准则检测l1是否为异常值以上各种准则时,必须注意测量次数的限制。对于莱因1-t|=0.105达准则、一般建议测量次数大于或等于50次,而对于而Zσ=2.13×0.01498≈0.03191格拉布斯准则和狄克逊准则,则建议小于或等于20次。但这一区别并不是十分严格的由于|1-t1>z,则t1值异常,应予舍弃。程序框图对小样本来说,由于格拉布斯准则能给出较严格如图4所示。的结果,狄克逊准则无需计算X和o,方法简便,且23几种方法的进一步讨论者的概率意义明确。因此,它们能较好地适用于采样次从以上的应用情况来看,似乎各种准则的应用实数不太多的一般测量列践都很一致,但这只是个特例,并没有普遍性。举这个设X为N(0,1),在1个大小为n的子样中混入例子,只为了更好地说明几种准则都能得到很好的应个Y:N(μ,δ)的子样。有研究结果表明:格拉布用。需要指出的是,以上各准则都是人为主观拟定的,斯方法的检出概率P略高于狄克逊方法的检出概率直到目前为止,还没有统一的规定,因此,它们的应用PD,如表6所示:(N(0,1)叫作标准正态分布)o1994-2012ChinaAcademicJournalElectronicpUblishingHouse.Allrightsreservedhttp://www.cnki.net2航空计测技术第15卷STARTSTARTSTARTSTART输入数据输入数据输入数据输入数据计算算术平均值入计x根据n值,及均方根偏差从表2中计算出相应y计算算术平均值计算剩余误差;,计算T值并选定均方根偏差σ危险率a选定危险率a计算剩余误差v,均方根偏差判别粗大误差查表得相应的(n,a)从表3中查出%(n,a)值从表4中查出相应Z值打印输出结果判别数据是否为异常?判别敦据是否异常判别粗大误差ENDExDENDEND图1莱因达准则应图2格拉布斯准则图3狄克逊准则应图4肖维勒准则应用程序框图应用程序框图用程序框图用程序框图表6P与PD的比较舍。但是,对待粗大误差,除从测量结果中及时发现和利用剔除原则鉴别外,更重要的是提高工作人员的技术a(%)水平和工作责任心,不要在情绪不宁和极度疲劳的情况5.01.0下,进行重要的测量工作。另外,要保证测量条件的稳定,防止因环境条件剧烈变化而产生的突变影响。只有δ11221122这样,才能提高测量的精度,得到满意的测量结果PG(%)10.240.429.854.22.515.712.731.3参考文献PD(%)9.335.726.850.02.212.910.526.31梁晋文等编著.误差理论与数据处理.北京:中国计由于混入的Y不一定是子样中最大的数据,所以,量出版社,1989实际检出效果还要高一些2何国伟编著,误差分析方法.北京:国防工业出版社,4结束语3王文松.测量列中离群值的判断.电测与仪表,1992,从以上论述可以看出,在进行测量数据处理时,可11)以应用各种准则进行粗大误差判别,以决定数据的取o1994-2012ChinaAcademicJournalElectronicpUblishingHouse.Allrightsreservedhttp://www.cnki.net
    2021-05-06下载
    积分:1
  • UDS诊断序,整车网络测试应用序(PCAN-UDS API – User Manual.pdf)
    UDS_PCAN_APIA应用程序,整车网络诊断应用程序,超值!(PEAK CAN UDS Application Programming InterfaceUser Manual.pdf)PCAN-UDS APi- User ManualContents1 PCAN-UDS API Documentation2 Introduction2.1 Understanding PCAN-UDS2.2 Using PCAN-UDS2.3 Features7888992.4 System Requi rements2.5 Scope of supply3 DLL API Reference3.1 Namespaces103.1.1 Peak Can uds3.2 Units3.21 PuDs Unit3.3 Classes3.3.1 UDSApi3.3.2 TUDSApi3. 4 structures1022334553.4.1 TPUDSMsg3.4.2 TPUDSSessionInfo3.43 TPUDSNetAddrinfo3.5 Types213.5.1 TPUDSCANHand]e223.5.2 TPUDSstatus233.5.3 TPUDSBaudrate253.5.4 TPUDSHWType283.5.5 TPUDSResult303.5.6 TPUDSParameter313.5.7 TPUDSService393.5.8 TPUDSAddress423.5.9 TPUDSCanId443.5.10 TPUDSProtoco l463.5.11 TPUDSAddressingType483.5.12 TPUDSMessageType493.5.13 TPUDSSVCParamDSC503.5.14 TPUDSSVCParamER513.5.15 TPUDSSVCParamcc533.5.16 TPUDSSVCParamTP543.5.17 TPUDSSVCParamcdTCS543.5.18 TPUDSSvCParamROE553.5.19 TPUDSSvCParamROERe commendedserviceID573.5.20 TPUDSSVCParamLC583.5.21 TPUDSSvcParamLCBaudrateidentifier593.5.22 TPUDSSVCParamDI603.5.23 TPUDSSVCParamRDBPI643.5.24 TPUDSSVCParamDDDI653,525 TPUDSSyCParamRDTCI66PCAN-UDS APi- User Manual3.5.26 TPUDSSVCParamRDTCI DTCSVM6935.27 TPUDSSYCParamIOCBI703.5.28 TPUDSSvCParamRC3.5.29 TPUDSSVCParaMRC RID723.6 Methods733.6.1 Initialize753.6.2 Initialize(TpudsCanhandle, tpudsbaudrate)3.6.3 Initialize(TPUdsCANhandle, TPUdSBaudrate, TPudSHWType, UInt32,UInt16)83.6.4 Uninitialize813.6.5 Setvalue843.6.6 Setvalue (TPUdsCanhandle, tpudsparameter, UInt32, uint32)843.6Setvalue (TPUdSCaNHandle, TPUDSParameter, stringBufferUint32)873.6.8 Setvalue (TPUDSANHandle, TPUDSParameter, Byte[], Uint32)883.6.9 Setvalue(Tpudscanhand le, tpudsparameter, IntPtr, UInt32)3.6.10 Getvalue933.6.11 Getvalue (TPUDSCANHandle, TPUDSParameter, StringBufferUint32)933.6. 12 Getvalue (TPUDSCANHandle, tpudsparameter, uint32, Uint32)963.6.13 Getvalue (TPUDsCaNHandle, TPUDSParameter, Byte l], UInt32)993.6. 14 Getvalue (TPUdSCAnhandle, tpudSParameter, Intptr, UInt32)1013.6.15 Getstatus1043.6.16Read1073.6.17 Write3.6.18 Reset1143.6.19 WaitForsing lemessage1163. 6.20 WaitFormultiplemessage1203.6.21 Waitforseryice1263.6.22 WaitForservicefunctional1303.6.23 ProcessResponse1333.6. 24 SvCDiagnosticsessioncontro l1383.6.25 SVCECUReset1413.6.26 SvcSecuri tyAccess1453.6.27 SvCCommunicationControl1483.6.28 SvcTesterpresent1523.6.29 SvcsecuredDataTransmission1553.6.30 SvcControlDTCSetting1583.6.31 SvcResponseonEvent1623.6.32 SVCLinkcontrol1663.6.33 SVCReaddatabyidentifier1703.6. 34 SvcReadMemory ByAddress1733.6.35 SvcReadscal ingdatabyidentifier1773.6. 36 SvcReadDataByperiodicIdentifier1803.6.37 SvcDynamicallydefinedataIdentifierDBID1843.6.38 SvcDynamicall ydefineDataIdentifierDBMA1883.6. 39 SvcDynamical lyDefineDataIdentifierCDDDI1933.6.40 SvcWri teDataByidentifier1973.6. 41 Svcwri teMemory byaddress2003.6.42 SvcClearDi agnosticInformation2053. 6. 43 SVCReadDTCInformation2083.6.44 SvCReadDTCInformationRDTCSSBDTC2113. 6. 45 SvCReaddTCInformationRDTCSSBRN215PCAN-UDS APi- User Manual3. 6.46 SVcReadDTCInformationReportExtended2183.6. 47 SvcReadDTCInformationReportseverity2213,648 SvcReaddTCInformationrsIodtc2253. 6.49 SvCReadDTCInformationNoParam2283.6.50 SvcInputout put contro byidentifier2323. 6.51 SyCRoutineControl2363.6.52 SvCReques tOwn load2393.6.53 SvcRequestUp load2433. 6.54 SVCTransferData2483.6.55 SvCRequestTransferExit2513.7 Functions2563.7.1 UDS Initialize2583.7.2 UDs Uninitialize2593.7.3 UDs Setvalue2603.7.4 UDs Getvalue2613.7.5 UDS Getstatus2623.7.6 UDS Read2643.7.7 UDs Write2653.7.8 UDs Reset2663.7.9 UDS_WaitForsinglemessage2673.7.10 UDS_waitForMultipleMessage2693.7.11 UDs Wai ce2723.7.12 UDS WaitForserviceFunctional2733.7.13 UDS_ Processresponse2753.7.14 UDS_SvcDiagnosticSessionControl2773.7.15 UDS SVCECUReset2783.7.16 DS_SVCSecuri tyAccess2803.7.17 UDS SVCCommunicationcontrol2813.7.18 UDs SvCTesterpresent2833719 UDS SvCSecuredDatatransmission2843.7.20 UDS_SvCControlDTCSetting2863.7.21 UDS_SVCResponseonEvent2873,7.22 UDs SVCLinkcontrol2893.7.23 UDS_SvcReaddatabyidentifier2913.7.24 UDS_SvcReadMemory byAddress2923.7.25 uDs_ SvcReadscalingdatabyidentifier2943.7.26 UDS_SvCReadDataBy Periodi iDentifier2953.7. 27 UDS_SVcDynamical l yDefineDataIdentifierDBID2973.7.28 UDS_SvcDynami call ydefinedataIdentifierDBMa2993.7.29 UDS_SvcDynami cal l yDefineDataIdentifierCDDDI3013. 7.30 UDS_SvcWriteDataByIdentifier3023,7.31 UDs SvcWri teMemorybyaddress3033.7. UDS_SvcClearDiagnosticInformation3053.7.33 UDS SVCReadDTCInformation3073.7. UDs SyCReadDTCInformationRdtCSSBDTC3093.7.35 uDs SvCReadDTCInformationRdtcssbrn3103.7.36 UDS_ SvCReadDTCInformationReportExtended3113.7.37 UDS_SvcReadDTCInformationReportseverity3133.7.38 UDS SVCReadDTCInformationRSIODTC3153,739 UDS SVCReadDTCInformationNoParam3163. 7.40 UDS_SvcInputoutput contro l byIdentifier3,7. 41 UDs SyCRoutinecontrol319PCAN-UDS APi- User Manual3.7.42 UDS_SvcRequestDown load3213.7.43 UDS_ SVCRequestupload32337.44 UDS SyCTransferData3253.7.45 UDS_SVCRequestTransferExit3263.8 Definitions3293.8.1 PCAN-UDS Handle Definitions3293.8.2 Parameter value defintions3313.8.3 TPUDSMsg Member value Definitions3323.8.4 PCAN-UDs Service parameter Definitions3334 Additional Information3354.1 PCAn Fundamentals33542 PCAN-Basic3364.3 UDS and ISO-TP Network Addressing Information3384.3.1 ISO-TP network addressing format3384.4 USing Events3405 License Information3426PCAN-UDS APi- User Manual1 PCAn-UDS APi DocumentationWelcome to the documentation of PCan-UD APl, a PEAK CAN API that implements ISo 15765-3, UDS in CANan international standard that allows a diagnostic tester(client) to control diagnostic functions in an on-vehicleElectronic Control Unit(ECU or serveIn the following chapters you will find all the information needed to take advantage of this aPlIntroduction on page 8DLL API Reference on page 10Additional Information on page 335PCAN-UDS APi- User Manual2 IntroductionPCAN-UDS is a simple programming interface intended to support windows automotive applications that usePEAK-Hardware to communicate with Electronic Control Units(ECU) connected to the bus systems of a car, formaintenance purpose2.1 Understanding PCAN-UDSUDS stands for Unified Diagnostic Services and is a communication protocol of the automotive industry. thisprotocol is described in the norm iSo 14229-1The UDS protocol is the result of 3 other standardized diagnostic communication protocolsIS0 14230-3, as known as Keyword 2000 Protocol(KWP2000L IS0 15765-3, as known as diagnostic on CANISo 15765-2, as known as ISo-TPThe idea of this protocol is to contact all electronic data units installed andCAN OBDninterconnected in a car, in order to provide maintenance, as checking for errors,actualizing of firmware, etcUDS is a Client/Server oriented protocol. In a UDS session(diagnostic session ),aprogram application on a computer constitutes the client(within UDS, it is calledPCAN-UDSTester), the server is the ecu being tested and the diagnostic requests from client toserver are called services. The client always starts with a request and this ends with apositive or negative response from the server(ECuSince the transport protocol of UDS is done using ISo-TP, an international standardPCAN ISOTPfor sending data packets over a CAN Bus, the maximum data length that can betransmitted in a single data-block is 4095 bytes.PCAN-UDS API is an implementation of the Uds on CAN standard the physicalcommunication is carried out by PCAN-Hardware (PCAN-USB, PCAN-PCI etc )throughPCAN-Basithe pCAN-ISo-TP and PCAN-Basic API (free CAN APls from PEAK-System). Because ofthis it is necessary to have also the pCAN-1S0-tP and PCAN-Basic APls(PCAN-ISO-TP. dll and PCAN Basic. dll) present on the working computer where UdS is intended tobe used. PCAN-UDS, PCAN-ISO-TP and PCan-Basic apis are free and available for allFigure 1: Relationship of thepeople that acquire a pCAn-hardware2.2 Using PCAN-UDSSince PCAN-UDS API is built on top of the PCAN-1So-TP API and PCAN-Basic APls, it shares similar functions. Itoffers the possibility to use several PCAn-UDS (PUds) channels within the same application in an easy way. Thecommunication process is divided in 3 phases: initialization interaction and finalization of a puds-channelInitialization In order to do UDS on CAN communication using a channel, it is necessary to initialize it first. Thisis done by making a call to the function UDS_ Initialize (class- method: InitializePCAN-UDS APi- User ManualInteraction: After a successful initialization a channel is ready to communicate with the connected can bus.Further configuration is not needed the 24 functions starting with UDS Svc(class-methods: starting with Svccan be used to transmit UdS requests and the utility functions starting with Uds WaitFor(class- methodsstarting with WaitFor) are used to retrieve the results of a previous request. the Uds read and UDS Write(class-methods: Read and Write are lower level functions to read and write UDs messages from scratch. Ifdesired, extra configuration can be made to improve a communication session, like service request timeouts orISo-TP parametersFinalization: When the communication is finished, the function UDS_ Uninitialize(class-method: Uninitializeshould be called in order to release the puds-channel and the resources allocated for it. In this way thechannel is marked as free"and can be used from other applications23 FeaturesI mplementation of the UDS protocol(iSo 14229-1)for the communication with control unitsWindows DLLs for the development of 32-bit and 64-bit applicationsPhysical communication via Can using a Can interface of the pcan seriesUses the pcan-Basic programming interface to access the can hardware in the computerUses the pCAn-ISo-TP programming interface(iso 15765-2)for the transfer of data packages up to 4095bytes via the can bus2.4 System Requi rementsL- Windows 10, 8.1, 7(32/64-bitAt least 512 Mb ram and 1 GHz CPUPC CAN interface from peak-SystemPCAN-Basic APlL PCAN-SO-TP API2.5 Scope of supplyInterface DLL, examples, and header files for all common programming languagesDocumentation in pdf formatDocumentation in HTML Help formatPCAN-UDS APi- User Manual3 DLL API ReferenceThis section contains information about the data types (classes, structures, types, defines enumerations)andAPI functions which are contained in the pcan-uds api3.1 NamespacesPEAK offers the implementation of some specific programming interfaces as namespaces for the. NEtFramework programming environment. The following namespaces are available:NamespacesNameDescription}PeakContains all namespaces that are part of the managed programming environment fromPEAK-SystemPeak CanContains types and classes for using the PCan aPi from PEAK-SystemPeak Can. LightContains types and classes for using the PCAn-Light API from PEAK-SystemPeak Can basicContains types and classes for using the pcan-Basic APl from PEAK-SystemPeak Can CcpContains types and classes for using the CCP API implementation from PEAK-SystemPeak Can XcpContains types and classes for using the XcP aPi implementation from PEAK-SystemPeak Can. Iso TpContains types and classes for using the pCAN-IS0-TP aPl implementation from PEAKSystelPeak Can, UdsContains types and classes for using the PCan-UDS API implementation from PEAK-SystemPeakCan.Obdll Contains types and classes for using the PCAN-OBDIll API implementation from PEAKSystemt}Peak. LinContains types and classes used to handle with lin devices from PEAK-Systemt}Peak. RP1210AContains types and classes used to handle with can devices from PEak-System through theTMC Recommended Practices 1210, version A, as known as RP1210(A3.1.1 Peak Can UdsThe peak Can. Uds namespace contains types and classes to use the pcan-UdS aPi within the. NET Frameworkprogramming environment and handle pcan devices from peak-SystemRemarks: Under the delphi environment, these elements are enclosed in the puds-Unit. the functionality of allelements included here is just the same. the difference between this namespace and the delphi unit consists inthe fact that delphi accesses the Windows api directly it is not managed code)AliasesAliasDescriptionTPUDSCANHandle Represents a pCAn-UDS channel handleClassesClassDescription像曰UDSApiDefines a class which represents the PCAN-UDS API10
    2020-06-27下载
    积分:1
  • JADE差分进化算法matlab源代码
    【实例简介】人工智能 车间调度 函数优化 参数自适应的差分进化算法 JADE matlab源代码
    2021-11-05 00:32:25下载
    积分:1
  • 45套java序员简历模板
    有一年经验的模板,也有多年经验的模板,共计java45套简历模板,应对各个时期的java程序员!!!!
    2020-12-12下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载