版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
第三屆全國大學(xué)生“飛思卡爾”杯
智能汽車競賽術(shù)報告(下)學(xué)校:XX大學(xué)隊伍名稱:XX大X火參賽隊員:XXX、XXX、XXX帶隊教師:XXX帶隊教師:XXX關(guān)于技術(shù)報告和研究論文使用授權(quán)的說明本人完全了解第二屆全國大學(xué)生“飛思卡爾”杯智能汽車競賽關(guān)保留、使用技術(shù)報告和研究論文的規(guī)定,即:參賽作品著作權(quán)歸參賽者本人,比賽組委會和飛思卡爾半導(dǎo)體公司可以在相關(guān)主頁上收錄并公開參賽作品的設(shè)計方案、技術(shù)報告以及參賽模型車的視頻、圖像資料,并將相關(guān)內(nèi)容編纂收錄在組委會出版論文集中。參賽隊員簽名:帶隊教師簽名:日期:目錄TOC\o"1-5"\h\z第一章引言 11.1概述 11.2技術(shù)報告內(nèi)容安排 1第二章設(shè)計思路以及方案論證 22.1主要設(shè)計思路 22.2硬件設(shè)計方案論證 22.2.1單片機模塊 22.2.2電源模塊方案 32.2.3方向傳感器模塊方案 32.2.4速度傳感器模塊方案 52.2.5電機驅(qū)動模塊方案 62.3控制算法方案概述 72.3.1總體方案 72.3.2方向控制算法選擇 72.3.3速度控制算法選擇 8第三章智能車機械結(jié)構(gòu)介紹與調(diào)整 103.1前輪調(diào)整和舵機安裝 103.1.1前輪調(diào)整 103.1.2舵機安裝 112車體重心調(diào)整 123.3傳感器安裝 123.4主控電路板安裝結(jié)構(gòu) 13第四章系統(tǒng)硬件電路設(shè)計 154.1單片機模塊 152電源管理模塊 16.3傳感器模塊 16.4電機驅(qū)動模塊 175車速及里程計數(shù)模塊 184.6主控板模塊 18第五章系統(tǒng)軟件設(shè)計 201模塊設(shè)計 201.1系統(tǒng)時鐘模塊 201.2普通I/O模塊 211.3中斷模塊 211.4AD模塊 221.5PWM模塊 231.6ECT模塊 242位置傳感器信號采集及黑線位置提取 253起跑線識別與停車 .254方向控制 -264.1方向控制整體結(jié)構(gòu) 264.2賽道信息有效性判斷 274.3彎道直道判斷 274.4轉(zhuǎn)向控制 28.5PID控制在方向控制中的實現(xiàn) 28速度控制 295.1速度控制整體結(jié)構(gòu) 295.2PID控制在速度控制中的實現(xiàn) 29第六章系統(tǒng)開發(fā)與調(diào)試 311調(diào)試 316.2模型車技術(shù)參數(shù)統(tǒng)計 33第七章總結(jié) 34參考文獻 35附錄A:源程序 36\o"CurrentDocument"附錄B:原理圖 160附錄A:程序代碼,*****************************************************************TOC\o"1-5"\h\z;*Thisstationeryservesastheframeworkfora *;*userapplication(singlefile,absoluteassemblyapplication)*;*Foramorecomprehensiveprogramthat *;*demonstratesthemoreadvancedfunctionalityofthis *;*processor,pleaseseethedemonstrationapplications *;*locatedintheexamplessubdirectoryofthe *;*FreescaleCodeWarriorfortheHC12Programdirectory *;exportsymbolsXDEFEntry ;export'Entry*symbolABSENTRYEntry ;forabsoluteassembly:markthisasapplicationentrypoint;includederivativespecificmacrosINCLUDE'mc9s12dg128.inc,Key_numbOEQUOKey_numb1EQU1Key_numb2EQU2Key_numb3EQU3KeyModeEQU2KeyOKEQU3
KeyADD EQU0KeySUB EQU1Non_keyEQU$FFTurnLeft EQU$FFTumRight EQU$00Leftover EQU$F0RightOver EQU$0FCenter EQU$0EQU$50EQU$51EQU$50EQU$51EQU$52EQU$53Resistance2_AddressResistance3_AddressResistance4_AddressROMStartEQU$4000;absoluteaddresstoplacemycode/constantdataROMStartSENSOR1_MAXJNITEQU$400SENSOR1_MINJNITEQU$401SENSOR2_MAX」NITEQU$402SENSOR2_MINJNITEQU$403SENSOR3_MAXJNITEQU$404SENSOR3_MINJNITEQU$405SENSOR4_MIN_INITEQU$407SENSOR5.MAXJNITEQU$408SENSOR5_MINJNITEQU$409SENSOR6.MAXJNITEQU$40ASENSOR6_MIN_INITEQU$40BSENSOR7_MAXJNITEQU$40CSENSOR7_MINJNITEQU$40DSENSOR8_MAX」NITEQU$40ESENSOR8_MIN_INITEQU$40FSENSOR9_MAX」NITEQU$410SENSOR9_MINJNITEQU$411SENSOR10_MAX_INITEQU$412SENSOR10_MIN」NITEQU$413SENSOR11_MAXJNITEQU$414SENSOR11_MINJNITEQU$415SENSOR12_MAX_INITEQU$416SENSOR12_MIN」NITEQU$417SENSOR13.MAXJNITEQU$418SENSOR13_MINJNITEQU$419SENSOR14_MAX_INITEQU$41ASENSOR14_MIN」NITEQU$41BSENSOR2EQU$2002SENSOR3EQU$2004SENSOR4EQU$2006SENSOR5EQU$2008SENSOR6EQU$200ASENSOR7EQU$200CSENSOR8EQU$200ESENSOR9EQU$2010SENSOR10EQU$2012SENSOR11EQU$2014SENSOR12EQU$2016SENSOR13EQU$2018SENSOR14EQU$201ASENSOR1_MAXEQU$20ICSENSOR1_MINEQU$20IDSENSOR2_MAXEQU$20IESENSOR2_MINEQU$20IFSENSOR3.MAXEQU$2020SENSOR3_MINEQU$2021SENSOR4_MAXEQU$2022SENSOR4_MINEQU$2023SENSOR5_MAXEQU$2024SENSOR5_MINEQU$2025SENSOR6_MAXEQU$2026SENSOR6_MINEQU$2027SENSOR7_MAXEQU$2028SENSOR7_M1NEQU$2029SENSOR8_MAXEQU$202ASENSOR8_MINEQU$202BSENSOR9_MAXEQU$202CSENSOR9_MINEQU$202DSENSOR10_MAXEQU$202ESENSOR10_MINEQU$202FSENSOR11_MAXEQU$2030SENSOR11_MINEQU$2031SENSOR12_MAXEQU$2032SENSOR12.MINEQU$2033SENSOR13_MAXEQU$2034SENSOR13_MINEQU$2035SENSOR14_MAXEQU$2036SENSOR14_MINEQU$2037SPEED_NOW EQU$2038ADDR_NUMB_BUF1 EQU$2039ADDR_NUMB_BUF2 EQU$203ATOC\o"1-5"\h\zADDR_NUMB1 EQU $203BADDR_NUMB2 EQU $203CABSOLUTE_ADDR1 EQU $203DABSOLUTE_ADDR1_L EQU $203EABSOLUTE_ADDR2EQU$203F
LOCATION」 EQU$203ELOCATION_2 EQU$2040VALUE.BUFEQU$2041DIVISOREQU$2042Key_numbEQU$2043KEYCODEEQU$2043FLAG_NEWEQU$2044;新采樣值標志位FLAG_AD_LOOPEQU$2045FLAG_AD_NUMBEQU$2046*********WYDDEFINE****************TimerCounterEQU$2100TimerCGQ.ONEQU$2101TimerADEQU$2102DispBufEQU$2103 ;0-7TimerOverEQU$2104LeftLimitl_lEQU$2105RightLimitl_lEQU$2106LeftLimit2_lEQU$2107RightLimit2_lEQU$2108LeftLimitl_2EQU$2109RightLimitl_2EQU$210ALeftLimit2_2EQU$210BRightLimit2_2EQU$210CLeftLimitMaxEQU$210DRightLimitMaxEQU$210ESpeed.P EQU$21OFAngleLimit.LeftEQU$2110AngleLimit_RightEQU$2111FLAG_FIND_STARTEQU$2112FLAG_START_DELAYEQU$2113START_DELAY EQU$2114LOOP_NUMBEQU$2115.********WYDDEFINE****************ORG$2200PID_P DS.W1PIDJDS.W1PID_D DS.W1BACKUP_Detect_D_HDS.W1SUM_GDS.W1CONTROL_NEWDS.W1TOC\o"1-5"\h\zDetect_D_H DS.B 1Detect_D DS.B 1Difference_DDS.B1D_OUTDS.B1T_ignore DS.B 1MaxLimitDS.B1CONTROL^ DS.B 1Maxjeft DS.B 1Min.right DS.B 1DJimitDS.B1TURN.FLAGDS.B1LOCATION_DIFDS.B1LOCATION_LIMITDS.B1BACKUP_Difference_DDS.B1*********zfDEFINE****************BACK_KEYSTATEDS.B1TOC\o"1-5"\h\zKEYSTATE DS.B 1KeylntFlag DS.B 1JncState DS.B1 ;角度增量狀態(tài)LOCATION.SEGlDS.B1LOCATION_SEG2DS.B 1CONTROL.ANGLEDS.W1CHANGE_ANG_MAXDS.W1BUF_1 DS.B 1BUF_2 DS.B 1LOCATION_ANGLEDS.B 1FLAG_LOCATION_RIGHTDS.B 1LOCATION_ANGLE_MAXDS.B1ANGLE_DELAY DS.B 1StartFlag DS.B1LOCATION_CENTER DS.B 1StopCounter DS.B1;LED1.POINT DS.B 1;LED2_POINT DS.B 1SPEED.FLAG DS.B1Speed_P2 DS.B1TOC\o"1-5"\h\zSTOP_1 DS.B 1STOP_2 DS.B 1FLAG_START DS.B1BLACK_TOTAL_BUF DS.B 1FLAG_HND_MAX DS.B 1DEVICE.ADDRESS DS.B 1COMMAND DS.B 1RD_DATA DS.B1WR_DATA DS.B 1IIC_NUMB_BUF DS.B 1FLAGJNCDEC DS.B 1NUMB.BUF DS.W 1ADDRESS_BUFDS.B 1PLOT_NUMBDS.B1FLAG_ADJUST_PLUSDS.B1RIGHT_2 EQU0RIGHT_1 EQU1CENTER EQU2LEFT.l EQU 3LEFT_2 EQU 4StartENEQU$FF********zfDEFINE****************ORGROMStartEntry:MOVB#$20,INITRMNOPLDS#RAMEnd;initializethestackpointerCALLInitCPUCALLInitParaCALLROM_TO_WCR;CALLCESHI_PARA;JMPCOMPUTE_ABSOLUTE_ADDR_PROCESS;JMPHAND2;鍵控管理:開機時允許進行各種參數(shù)修改CALLTumON.REDKeyControlMain:LDAAStartFlagCMPA#StartENBEQMainCALLTest_key_numbLDAAKey_numbCMPA#Non_keyBEQKeyControlMainCALLKEYDEALBRAKeyControlMain
Main:CALLInit_pwmoutMain_Wait: CALLTest_key_numbLDAAKey_numbCMPA#Non_keyBEQMain.WaitCALLSPEED_CHANGECALLStart_speed;CLIMain_LPl:;LDAATimerOver;CMPA#$FF;BNEMain_LPl; MOVB#0,TimerOverCALLREAD_AD; CALLTurnOFF.CGQCALLUnify_sensor_value;CALLFind_StartCALLTranslate_locationLDAAFLAG_FIND_STARTCMPA#$FFBEQMain_LP2CALLFind_blackBRAMain_LP3MainLP2:CALLFindblack1Main_LP3:CALLCOMPUTE_ABSOLUTE_ADDRCALLCOMPUTE_ABSOLUTE_ADDR_PROCESSLDABLOCATION.1CALLResult_displayCALLDELAY_lsCALLDELAY.lsCALLDELAY_ls;CALLHANDCALLHAND2CALLFOOTBRAMain_LPl;CALLTest_key_numb;LDAAKey_numb;CMPA#Non_key;BEQMain.LPl;MOVB#O,StartFlag;JMPKeyControlMainHAND2:;CALLTESTJNITPARACALLLOCATION_D;Detect_D=角度(-66?0?66)CALLLOCATION_GENERATE_ANGLEMOVB#-12,MaxJeftMOVB#+12,Min_rightLDABLOCATION_ANGLECALLLIMIT_NOTLDAAFlag_OCMPA#CenterBEQHAND2_LP2;LDAATimerCounter;CMPAANGLE_DELAY;BNEHAND2_LP3; MOVB#0,TimerCounterLDABDifference_DSUBBBACKUP_Difference_DMOVB#-16,Max_leftMOVB#+16,Min_rightCALLLIMIT.NOTLDAAFlag_OCMPA#CenterBNEHAND2_LP3; CALLTURN_ANGLEMOVBDifference_D,BACKUP_Difference_DCALLInitRoundLimitParaCALLTURN_SUBF2CALLCONTROL_PIDBRAHAND2_LP3HAND2_LP2:; CALLTURN.SUBF ;OUTPUT:D_OUTCALLInitLineLimitParaCALLTURN_SUBFHAND2_LP3:CALLCHANGE_ang; MOVBDifference_D,BACKUP_Difference_D;CALLTURN_SUBFLDABCONTROL_NEWADDBLOCATION.ANGLEADDBD_OUTBVCHAND2_LP4LDABD_OUTCMPB#OBGEHAND2_LP5LDAB#-66BRAHAND2_LP8HAND2_LP5: LDAB#66BRAHAND2.LP8HAND2_LP4:ADDBCONTROL_PBVCHAND2_LP8LDABD_OUTCMPB#0BGEHAND2,LP7LDAB#-66BRAHAND2_LP8HAND2_LP7: LDAB#66;BRAHAND2_LP8HAND2_LP8:CALLGet_ang;INPUT:B輸出轉(zhuǎn)彎角度;JMPHAND2.LP2RTC;執(zhí)行轉(zhuǎn)向控制;INPUT:LOCATION」,LOCATION_2,CONTROL_P=(正值右轉(zhuǎn))HAND:;CALLTEST_INITPARACALLLOCATION.D;Detect_D=角度(?66?0?66)CALLLOCATION_GENERATE_ANGLEMOVB#?12,Max」eftMOVB#+12,Min_rightLDABLOCATION.ANGLECALLLIMIT_NOTLDAAFlag_OCMPA#CenterBNEHAND_LP2;直線處理:依據(jù)黑線位置進行調(diào)整,將黑線調(diào)整到中心;MOVB#0,D_OUTCALLInitLineLimitPara;CALLInitRoundLimitPara;CALLCHANGE_angBRAHAND_LP2_LP2HAND_LP2: ;彎道處理CALLInitRoundLimitParaBRAHANDLP3HAND_LP2_LP2: MOVB#-30,Max_leftMOVB#+3O,Min_rightLDABDetect_DCALLLIMIT_NOTLDAAFlag_OCMPA#CenterBNEHAND_LP2_LP3;直線處理:依據(jù)黑線位置進行調(diào)整,將黑線調(diào)整到中心;MOVB#0,D_OUT; CALLInitLineLimitPara;CALLInitRoundLimitPara;CALLCHANGE_angBRAHAND.LP3HAND_LP2_LP3:CALLInitRoundLimitParaHAND_LP3:CALLCHANGE_angCALLTURN_SUBF ;OUTPUT:D_OUT;CALLTURN_ANGLELDABD_OUTADDBLOCATION.ANGLEADDBCONTROL^CALLGet_ang;INPUT:B輸出轉(zhuǎn)彎角度RTCTEST.INITPARA:MOVB#105+20,LOCATION.1MOVB#105+0,LOCATION_2MOVB#0,D_OUTMOVB#0,CONTROL_PMOVB#O,Speed_PMOVB#O,Detect_DRTC;執(zhí)行速度控制FOOT:LDAASPEED_FLAGCMPA#0BEQFOOT.LPlCALLControlSpeedlBRAFOOT_LP2FOOT_LP1:CALLControlSpeedFOOT_LP2:CALLSPEED_CHANGECALLStopCarControlRTC;停車控制:如果第一、二排數(shù)據(jù)均無效,停車。StopCarControl:LDX#SENSOR1INXMOVB#14,FLAG_AD_NUMBStopCarControl_loop:LDAB,XCMPB#$FFBNEStopCarControl_LP1INXINXDECFLAG_AD_NUMBBNEStopCarControl_loopINCStopCounterLDAAStopCounterCMPA#200BLSStopCarControl_RETMOVB#0,PWMDTY7StopCarControl_WAIT:CALLTest_key_numb ;按任意鍵退出LDAAKey_numbCMPA#Non_keyBEQStopCarControl.WAITCALLSPEED_CHANGEStopCarControl_LP1: MOVB#0,StopCounterStopCarControl_RET:RTC,**************************************************************;* 位置轉(zhuǎn)換成控制角度 *;*入口參數(shù):LOCATION」,LOCATION_2產(chǎn)出口參數(shù):CONTROL_ANGLE產(chǎn)生的控制角度16位輸出LOCATION_TO_CONTROL:LDAALOCATION.1CMPARightLimitl_2BHSLOCATION_TO_CONTROL_LP1MOVB#RIGHT_2,LOCATION_SEG1BRALOCATION_TO_CONTROL_SECOND_ROWLOCATION_TO_CONTROL_LP1:CMPARightLimitl.lBHSLOCATION_TO_CONTROL_LP2MOVB#RIGHT_1,LOCATION_SEG1BRALOCATION_TO_CONTROL_SECOND_ROWLOCATION_TO_CONTROL_LP2:CMPALeftLimitl_lBHSLOCATION_TO_CONTROL_LP3MOVB#CENTER,LOCATION_SEG1BRALOCATION_TO_CONTROL_SECOND_ROWLOCATION_TO_CONTROL_LP3:CMPALeftLimitl_2BHSLOCATION_TO_CONTROL_LP4MOVB#LEFT_1,LOCATION_SEG1BRALOCATION_TO_CONTROL_SECOND_ROWLOCATION_TO_CONTROL_LP4:MOVB#LEFT_2,LOCATION_SEG1LOCATION_TO_CONTROL_SECOND_ROW:LDAALOCATION_2BHSLOCATION_TO_CONTROL_LP1_2MOVB#RIGHT_2,LOCATION_SEG2BRALOCATION_TO_CONTROL_NEXTLOCATION_TO_CONTROL_LP1_2CMPARightLimit2_lBHSLOCATION_TO_CONTROL_LP2_2MOVB#RIGHT_1,LOCATION_SEG2BRALOCATION_TO_CONTROL_NEXTLOCATION_TO_CONTROL_LP2_2: CMPALeftLimit2_lBHSLOCATION_TO_CONTROL_LP3_2MOVB#CENTER,LOCATION_SEG2BRALOCATION_TO_CONTROL_NEXTLOCATION_TO_CONTROL_LP3_2: CMPALeftLimit2_2BHSLOCATION_TO_CONTROL_LP4_2MOVB#LEFT_1,LOCATION_SEG2BRALOCATION_TO_CONTROL_NEXTLOCATION_TO_CONTROL_LP4_2: MOVB#LEFT_2,LOCATION_SEG2LOCATION_TO_CONTROL_NEXT:LDX#TAB_CONTROL_ANGLELDABLOCATION_SEG1LDAA#10MULXGDXADDBLOCATION_SEG1BCCLOCATION_TO_CONTROL_NEXT_LP1INCALOCATION_TO_CONTROL_NEXT_LP1:XGDXLDABLOCATION_SEG2LSLBLDDB,XSTDCONTROL_ANGLERTC,**********************************************;角度調(diào)整控制參數(shù)表TAB_CONTROL_ANGLEEQU*; FDB80,85,90,95,100,30,40,50,60,70,-10,-10,0,10,10,-70,-60,-50,-40,-30,-100,-95,-90,-85,-80FDB80,85,90,95,100,60,70,75,75,75,-10,-10,0,10,10,-75,-75,-75,-70,-60,-100,-95,-90,-85,-80; 7.3 FDB80,85,90,95,100,60,70,80,90,100,-10,-10,0,10,10,-100,-90,-80,-70,-60,-100,-95,-90,-85,-80;角度調(diào)整:通過黑線位置確定調(diào)整角度;OUTPUT:CONTROL_PCHANGE.ang:LDDCONTROL_ANGLELDYCHANGE_ANG_MAXEMULSLDX#100EDIVSXGDYSTABCONTROL_PRTC;初始化直線限制參數(shù)InitLineLimitPara:MOVB#105+40,LeftLimitl_lMOVB#105-40,RightLimitl.lMOVB#105+60,LeftLimitl_2MOVB#105-60,RightLimitl_2MOVB#105+10,LeftLimit2_lMOVB#105-10,RightLimit2_lMOVB#105+30,LeftLimit2_2MOVB#105-30,RightLimit2_2MOVW#10,CHANGE_ANG_MAXRTC;初始化彎道限制參數(shù)InitRoundLimitPara:MOVB#105+30,LeftLimitl_lMOVB#105-30,RightLimitl.l
MOVB#105-55,RightLimitl_2MOVB#105+15,LeftLimit2_lMOVB#105-15,RightLimit2_lMOVB#105+35,LeftLimit2_2MOVB#105-35,RightLimit2_2MOVW#40,CHANGE_ANG_MAXRTC;當調(diào)整的轉(zhuǎn)彎角度過大,減速;input:CONTROL_P,AngleLimit_Left,AngleLimit_RightControlSpeed1:MOVB#-l6,MaxJeft ;16IlliMOVB#+16,Min_rightLDABDetect_DCALLLIMIT_NOTLDAAFlag_OCMPA#CenterBEQControlSpeed1_LP1;MOVB#-10,Speed_PMOVBSTOP_l,Speed_P;20;CONTROL_PMOVB#-60,Max」eft;20;CONTROL_PMOVB#+60,Min_rightLDABD_OUTCALLLIMIT.NOTLDAAFlag_OCMPA#CenterBEQControlSpeed1_RET;LDABSpeed_P;SUBB#10;STABSpeed_P;CMPB#-40;BGEControlSpeed_RET;MOVB#-30,Speed_P ;20MOVBSTOP_2,Speed_PBRAControlSpeed1_RETControlSpeed1_LP1:LDAASpeed_PADDA#5STAASpeed_PCMPA#0BLEControlSpeed1_RET;<=MOVB#0,Speed_PControlSpeed1_RET:RTCControlSpeed2:; LDAAFLAG_LINEROUND; CMPA#0; BNEControlSpeed2_ROUNDMOVB#-14,Max」eftMOVB#+14,Min_rightLDABDetect_DCALLLIMIT_NOTLDAAFlag_OCMPA#CenterBEQControlSpeed2_LP1LDABSPEED_NOWSUBB#55COMBINCBLSRBSTABSpeed_PBRAControlSpeed2_RETControlSpeed2_LP1:MOVB#O,Speed_PBRAControlSpeed2_RETControlSpeed2_ROUND:LDABSPEED_NOWSUBB#55COMBINCBSTABSpeed_PControlSpeed2_RET:RTC;當調(diào)整的轉(zhuǎn)彎角度過大,減速;input:CONTROL_P,AngleLimit_Left,AngleLimit_RightControlSpeed:MOVB#-l6,Max」eft ;16////MOVB#+16,Min.rightLDABDetect_DCALLLIMIT.NOTLDAAFlag_OCMPA#CenterBEQControlSpeed_LP1;MOVB#-10,Speed_PMOVBSTOP」,Speed_PBRAControlSpeed.RETControlSpeed__LPl:MOVB#0,Speed_PControlSpeed_RET:RTC;ControlSpeed:; MOVB#-20,MaxJeft ;16////; MOVB#+2O,Min_right; LDABDetect_D; CALLLIMIT.NOT; LDAAHag_O; CMPA#Center; BEQControlSpeed_LP1; MOVB#-20,Speed_P; MOVB#-31,MaxJeft ; 20; MOVB#+31,Min_right; LDABCONTROL.P; CALLLIMIT_NOT; LDAAFlag_O; CMPA#Center; BEQControlSpeed_RET; LDAASpeed_P2; SUBA#10; STAASpeed_P2; CMPA#50; BGEControlSpeed_RET; MOVB#50,Speed_P2;LDABSPEED_NOW;SUBB#55;COMB;INCB;STABSpeed_P ;BEQControlSpeed_LP1; BRAControlSpeed_RET;ControlSpeed_LPl:MOVB#O,Speed_P; MOVB#O,Speed_P2;ControlSpeed_RET:RTC;初始化CPUInitCPU:CALLInit_sys_timeCALLInit_portCALLInit.AD;CALLInit_pwmoutCALLInit_timerCALLInit_portjRTC;初始化參數(shù)InitPara:MOVW#48,PID_P ;0.25*256MOVW#3,PIDJ ;0.01*256MOVW#80,PID_D ;0.05*256MOVW#O,SUM_GMOVW#0,CONTROL_NEWMOVW#O,Detect_D_HMOVB#O,FLAG_AD_NUMBMOVB#0,FLAG_AD_LOOPMOVB#0,FLAG_NEWMOVB#O,DispBufMOVB#4,T_ignoreMOVB#30,MaxLimitMOVB#00,CONTROL_PMOVB#66,DJimitMOVB#130,LOCATION.LIMIT;MOVB#114+40,LeftLimitl_l;MOVB#114-40,RightLimitl_l;MOVB#114+60,LeftLimitC2;MOVB#114-60,RightLimitl_2;MOVB#114+20,LeftLimit2_l;MOVB#114-20,RightLimit2_l;MOVB#114+40,LeftLimit2_2;MOVB#114-40,RightLimit2_2MOVB#(-60),LeftLimitMaxMOVB#60,RightLimitMax;MOVB#50,CHANGE_ANG_MAXMOVB#(-24),AngleLimit_Left;轉(zhuǎn)彎調(diào)整角度最大限制值(20度),超界就減速MOVB#24,AngleLimit_RightMOVB#63,SPEED_NOWMOVB#O,Speed_PMOVB#0,Speed_P2MOVB#5,STOP_1MOVB#2,STOP_2MOVB#0,D_OUTMOVB#30,TimerOverMOVB#O,FLAG_FIND_STARTMOVB#O,FLAG_START_DELAYMOVB#0,LOOP_NUMBMOVB#0,START_DELAY;MOVB#O,IncStateMOVB#20,LOCATION_ANGLE_MAXMOVB#8,ANGLE_DELAY;8*5=40msMOVB#105,LOCATION_CENTERMOVB#0,KEYSTATEMOVB#O,StartFlagMOVB#O,BACKUP_Difference_DMOVB#0,StopCounterMOVB#O,SPEED_FLAGMOVB#0,FLAG_STARTMOVB#4,BLACK_TOTAL_BUFMOVB#$FF,FLAG_FIND_MAXMOVW#0,NUMB_BUFMOVB#O,ADDRESS_BUFMOVB#0,PLOT_NUMBMOVB#O,FLAG_ADJUST_PLUS;MOVB#$FF,LED1_POINTMOVB#28,FLAG_AD_NUMBLDX#SENSOR1_MAXLDY#SENSOR1_MAX_INITREAD_EEPROM_WAIT: MOVB1,Y+,1,X+DECFLAG_AD_NUMBBNEREAD_EEPROM_WAITRTC;調(diào)試AD最大值、最小值DEBUG_AD:;MOVB#$OO,TSCR1CALLADJUST_PLUS_SUBCALLWCR_TO_ROMCALLTumON-RED; CALLTumON_CGQ; CALLDELAY_5msCALLREAD_AD; CALLTumOFF_CGQCALLInit_ad_value;將第一次采樣數(shù)據(jù)直接賦給MAX/MINDEBUG_AD_LP1:;LDAATimerOver;CMPA#$FF;BNEDEBUG_AD_LP1MOVB#0,TimerOverCALLTurnON_CGQCALLREAD_ADCALLTurnOFF_CGQLDAAFLAG_FIND_MAXCMPA#$FFBNEDEBUG_AD_LP2CALLFind_max_valueBRADEBUG_AD_LP3;CALLFind_max_min_value;找最大值、最小值DEBUG_AD_LP2:CALLFind_min_valueDEBUG_AD_LP3:CALLTest_key_numb ;按KEYO退出LDAAKey_numbCMPA#Key_numblBNEDEBUG_AD_LP4MOVB#$O,FLAG_HND_MAXDEBUG_AD_LP4: CMPA#Key_numbOBNEDEBUG.AD_LP1CALLModidy_AD-max_min_value;將MAX整理成5CM寬(70%)CALLTumOFF_REDDEBUG_AD_LP4_LP1:CALLTest_key_numb ;按KEYO退出
CMPA#Key_numbOBNEDEBUG_AD_LP4_LP2LDX#SENSOR1_MAXLDY#SENSOR1_MAXJNITMOVB#7,FLAG_AD_NUMBWHITE_EEPROM_WAIT:CALLCLEAR.EEPROMDECFLAG_AD_NUMBBNEWHITE_EEPROM_WAITBRADEBUG_AD_RETDEBUG_AD_LP4_LP2:CMPA#Key_numblBNEDEBUG_AD_LP4_LP1DEBUG_AD_RET:RTC;打開紅外發(fā)射管TurnON_CGQ:PSHALDAAPORTK;開傳感器4MSANDA#%11110011STAAPORTKPULA;關(guān)閉紅外發(fā)射管TumOFF_CGQ:PSHA;關(guān)閉傳感器;關(guān)閉傳感器ORAA#%00001100STAAPORTKPULARTC;查找起始點;{±|□:FLAG_FIND_START$FF:找到$00:沒有找到;Find_Start:; MOVB#O,FLAG_HND_START; MOVB#0,FLAG_AD_NUMB ;臨時借用; MOVB#0,FLAG_AD_LOOP ;臨時借用; LDAB#6; LDX#SENSOR9; INX;Find_Start_loop:LDAA,X; CMPA#30; BHSFind_Start_LPl; INCFLAG_AD_NUMB; BRAFind_Start_next;Find_Start_LPl:CMPA#$FF; BEQFind_Start_next; INCFLAG_AD_LOOP;Find_Start_next:INX; INX; DECB; BNEFind_Start_loop; CMPA#3; BLSFind_Start_RET; LDAAFLAG_AD_LOOP; CMPA#O; BEQFind_Start_RET; MOVB#$FF,FLAG_HND_START;Find_Start_RET:RTCFind_black:MOVB#6,FLAG_AD_NUMBLDX#SENSOR9INXFind_black_LP2:LDAA,XCMPA#16BHSFind_black_RETINXINXDECFLAG_AD_NUMBBNEFind_black_LP2MOVB#$FF,FLAG_FIND_STARTFind_black_RET:RTCFind.blackl:MOVB#O,FLAG_FIND_STARTCALLFind_blackLDAAFLAG_FIND_STARTCMPA#OBNEFind_blackl_RETFind_blackl_LPl:INCFLAG.STARTCALLBLACK.TOTALFind_blackl_RET:RTC;計數(shù)全黑次數(shù):BLACK_TOTAL:LDAAFLAG_STARTBLACK_TOTAL_LP1:CMPABLACK_TOTAL_BUFBNEBLACK_TOTAL_RETINCSPEED.NOWINCSPEED_NOW;INCSTOP.lBLACK_TOTAL_RET:RTC;查找起始點:如果第二排最左和最右均為黑線值,且中間還有兩個以上不為黑,則認為是起始線;出口:FLAG_FIND_START=$FF:找至lj$00:沒有找到Find_Start:MOVB#O,FLAG_FIND_STARTMOVB#0,BUF_l ;臨時借用LDAB#4LDX#SENSOR9INXLDAA,XCMPA#30BHSFind_Start_RETLDX#(SENSOR9+5)INXLDAA,XCMPA#30BHSFind_Start_RETLDX#(SENSOR9+1)INXFind_Start_LOOP: LDAA,XCMPA#50BLSFind_Start_LPlINCBUF_1Find_Start_LPl:INXINXDECBBNEFind_Start_LOOPLDAABUF_1CMPA#1BLSFind_Start_RETMOVB#$FF,FLAG_FIND_STARTFind_Start_RET:RTC*****************WYDEND***********************; HALSTART ,**;擦寫EEPROM$400~$FFF;每次擦4BYTE;INPUT:X,指向要寫入的值的地址;Y,指向?qū)懼羖jEEPROM的地址,**************************************************************************CLEAR.EEPROM:;LDY#$400MOVB#$4A,ECLKDIV;LDAB#4WAIT1: LDAAECLKDIVANDA#$80BEQWAIT1WAIT2: LDAAESTATANDA#$80BEQWAIT2WAIT3: LDAAEPROTANDA#$80BEQWAIT3LDAB#$FFSTAB,YMOVB#$40,ECMD ;擦4BLDAAESTATORAA#$80STAAESTATWAIT4: LDAAESTATANDA#$40BEQWAIT4LDAB#2;LDX#$4001;LDY#$400WAIT_W1: LDAAECLKDIVANDA#$80BEQWAIT_W1WAIT_W2: LDAAESTATANDA#$80BEQWAIT_W2WAIT_W3: LDAAEPROTANDA#$80BEQWAIT_W3MOVW2,X+,2,Y+MOVB#$20,ECMDLDAAESTATORAA#$80STAAESTATWAIT_W4: LDAAESTATANDA#$40BEQWAIT_W4DBNEB,WAIT_W1RTC;將測試值輸出到舵機,控制舵機轉(zhuǎn)向;IN:BGet_ang:MOVB#66,Min_rightMOVB#-66,Max_leftCALLLIMIT_NOTLDAAFlag_OCMPA#CenterBEQGet_ang_LPlLDAB#(-66)CMPA#LeftOverBEQGet_ang_LPlLDAB#66Get_ang_LPI:LDAA#OADDB#66LSLD;*2LDX#PWM_TABLDDD,X;ASRA;RORBSTDPWMDTY01RTC; 判斷是否超界子程序;入口參數(shù):B,Max_left,Min_right;左邊界Max」eft右邊界Min_right;需要比較的值用B寄存器傳參數(shù);出口參數(shù):超界旗標Flag_O$F0:左超界;00:不超界$0F:右超界; Leftover:左超界;Center:不超界RightOver:右超界LIMIT_NOT:CMPBMin_rightBLELIMIT_NOT_LP1MOVB#RightOver,Flag_OBRALIMIT_NOT_RETLIMIT_NOT_LP1:CMPBMax」eftBLELIMIT_NOT_LP2MOVB#Center,Flag_OBRALIMIT_NOT_RETLIMIT_NOT_LP2:MOVB#LeftOver,Flag_OLIMIT_NOT_RET:RTCUNSIGNED_LIMIT_NOT:CMPBMin_rightBHSUNSIGNED_LIMIT_NOT_LP1MOVB#RightOver,Flag_OBRAUNSIGNED_LIMIT_NOT_RETUNSIGNED_LIMIT_NOT_LP1:CMPBMax」eftBHSUNSIGNED_LIMIT_NOT_LP2MOVB#Center,Flag_OBRAUNSIGNED_LIM1T_NOT_RETUNSIGNED_LIMIT_NOT_LP2:MOVB#LeftOver,Flag_OUNSIGNED_LIMIT_NOT_RET:RTC,***********************************************;計算舵機轉(zhuǎn)彎角度子程序;入口參數(shù):Detect_D傳感器探測到的角度Detect_D; (每一次輸出角度,不大于MaxLimit=10);出口參數(shù):D_OUT舵機應(yīng)該轉(zhuǎn)的角度D_OUT; D_OUT角度限制在-66?66,***********************************************TURN.ANGLE: ;入口參數(shù):傳感器探測到的角度Detect_D,Difference_D;出口參數(shù):舵機應(yīng)該轉(zhuǎn)的角度D_OUTMOVW#0,CONTROL_NEWLDDDetect_D_HLDYPID_PEMULS;Y:D;ADDDCONTROL_NEW;LDDDetect_D_H;ADDDSUM_G;STDSUM_G;LDYPIDJ;EMULS;ADDDCONTROL_NEW;STDCONTROL_NEW;LDDDetect_D_H;SUBDBACKUP_Detect_D_H;LDYPID_D;EMULS;ADDDCONTROL_NEWADDAD_OUT;/256+Y(K)STAAD_OUTCMPA#66BLETURN_ANGLE_LP1MOVB#66,D_OUTBRATURN_ANGLE_LP3TURN_ANGLE_LP1:CMPA#-66BGETURN_ANGLE_LP2MOVB#-66,D_OUTTURN_ANGLE_LP3:LDDSUM_GSUBDDetect_D_HTURN_ANGLE_LP2:LDDDetect_D_HSTDBACKUP_Detect_D_HRTCCONTROL.PID: LDDDetect_D_HSUBDBACKUP_Detect_D_HLDYPID_DEMULSSTAACONTROL_NEWLDDDetect_D_HSTDBACKUP_Detect_D_HRTC,***************************************************TURN_SUBF2: ;入口參數(shù):傳感器探測到的角度Detect_D,Difference_D;出口參數(shù):舵機應(yīng)該轉(zhuǎn)的角度D_OUTLDAADetect_DLDABD_OUTASRB;ASRBSBAASRA;ADDAD_OUTSTAADifference_D; STAAD_OUTBRATURNLOOPLDAADetect_DSUBAD_OUTSTAADifference_DMOVBT_ignore,Min_rightLDABT_ignoreCOMBADDB#1STABMaxjeftLDABDifference_DCALLLIMIT_NOTLDAAFlag_OCMPA#CenterBNETURN_LOOPLDAB#0;Difference_DBRATURN_NEXT1;TURN_LOOP:ASRDifference_DMOVBMaxLimit,Min_rightLDABMaxLimitCOMBADDB#1STABMaxleftLDABDifferenceDCALLLIMITNOTLDAAFlag_OCMPA#CenterBEQTURN_SUBF2_NEXT ;沒有超過一次輸出的最大角度轉(zhuǎn),超過了則限制LDABMaxLimitCMPA#LeftOver ;LEFTBNETURN_SUBF2_NEXTCOMBADDB#1TURN_SUBF2_NEXT:; MOVBD」imit,Min_right; LDAADJimit; COMA; ADDA#1; STAAMax」eft; CALLLIMIT_NOT; LDAAFlag_O; CMPA#Center; BEQTURN_NEXT1; LDABDJimit; CMPA#LeftOver; BNETURN_NEXT1; COMB; ADDB#I;TURN_NEXT1:ADDBD_OUTSTABD_OUT;入口參數(shù):傳感器探測到的角;入口參數(shù):傳感器探測到的角;出口參數(shù):舵機應(yīng)該度Detect_D,Difference_D轉(zhuǎn)的角度D.OUTLDAADetect_DSUBAD_OUTSTAADifference_DMOVBT_ignore,Min_rightLDABT_ignoreCOMBADDB#1STABMaxjeftLDABDifference_DCALLLIMIT_NOTLDAAFlag_OCMPA#CenterBNETURN.LOOPLDABDifference_DBRATURN_NEXT1TURN_LOOP:ASRDifference_DMOVBMaxLimit,Min_rightLDABMaxLimitCOMBADDB#1STABMaxjeftLDABDifference_DCALLLIMIT_NOTLDAAFlag_OCMPA#CenterBEQTURN_NEXT ;沒有超過一次輸出的最大角度轉(zhuǎn),超過了則限制LDABMaxLimitCMPA#LeftOver ;LEFTBNETURN_NEXTCOMBADDB#1TURN_NEXT:MOVBDJimit,Min_rightLDAADJimitCOMAADDA#1STAAMaxjeftCALLLIMIT_NOTLDAAFlag_OCMPA#CenterBEQTURN_NEXT1LDABDJimitCMPA#LeftOverBNETURN_NEXT1COMBADDB#1TURN_NEXT1:ADDBD_OUTSTABD_OUTRTC,; 前后排黑線差值; 前后排探測到的黑線位置之差,查表轉(zhuǎn)換成角度;INPUT:LOCATION.1,LOCATION_2;OUT:Detect_D=角度(-66-0-66) (TURN_FLAG=FF(LEFT)FF(RIGHT)); (LOCATION_DIF=前后排黑線差的絕對值)LOCATION_D:LDAALOCATION.lLDABLOCATION_2CMPALOCATION_2BHSLOCATION_D_LP1MOVB#TumRight,TURN_FLAG;:右轉(zhuǎn)EXGA,BSBABRALOCATION_D_LP2LOCATION-D_LP1:MOVB#TumLeft,TURN_FLAGSBALOCATION_D_LP2:CMPALOCATION_LIMITBLSLOCATION_D_NEXTLDAALOCATION_LIMITLOCATION_D_NEXT:STAALOCATION_DIFLDX#D_ANG_TABLDABA,XLDAATURN_FLAGCMPA#TurnLeftBNET_LEFT_DCOMBADDB#1MOVB#$FF,Detect_D_HSTABDetect_DBRALOCATION_D_RETT_LEFT_D: STABDetect_DMOVB#O,Detect_D_HLOCATION_D_RET:RTC,***************************************************; 黑線位置帶來的角度調(diào)整子程序;INPUT:LOCATION_1,LOCATION_2,Detect_D,LOCATION_ANGLE_MAX;OUT:LOCATION_ANGLE=,LOCATION_GENERATE_ANGLE:;CLCLDAALOCATION.1ADDALOCATION_2RORALDABLOCATION_ANGLE_MAXSUBALOCATION_CENTERBHSLOCATION_GENERATE_ANGLE_LP1MOVB#$FF,FLAG_LOCATION_RIGHTCOMA1NCAMULLDX#(105-(30+0)/2)1DIVBRALOCATION_GENERATE_ANGLE_LP2LOCATION_GENERATE_ANGLE_LP1:MOVB#00,FLAG_LOCATION_RIGHTMULLDX#((210+180)/2-105)IDIVLOCATION_GENERATE_ANGLE_LP2:XGDXSTABLOCATION_ANGLELDAADetect_DCMPA#$0BGELOCATION_GENERATE_ANGLE_LP3;RIGHTZHUANLDAAFLAG_LOCATION_RIGHT ;左轉(zhuǎn)CMPA#$FFBEQLOCATION_GENERATE_ANGLE_RETCOMBINCBSTABLOCATION_ANGLEBRALOCATION_GENERATE_ANGLE_RETLOCATION_GENERATE_ANGLE_LP3: LDAAFLAG_LOCATION_RIGHT;右轉(zhuǎn)CMPA#$FFBEQLOCATION_GENERATE_ANGLE_RETCOMBINCBSTABLOCATION_ANGLELOCATION_GENERATE_ANGLE_RET:RTC; HALEND 張芳;* KEYDEAL;看鍵號 *;INPUT:KEYCODE,**************************************************************KEYDEAL:MOVBKEYSTATE,BACK_KEYSTATELDAAKEYSTATELSLALDX#TBB1LDDA,XXGDXMOVB#$FEKeyIntFlagCALLKeyDealSubLDAAKeylntFlagCMPA#0BEQKeyDeal_RETLDX#CommonKeyTabCALLKeyDealSub
,**;* KEYDEALSUB;看按鍵幾下KEYCODE *,KeyDealSub:KeyDealSub_LPl:LDAA,XCMPAKEYCODELBNEKeyDealSub_LP2MOVB#O,KeyIntFlag ;找至lj,KeyIntFlag=OJMPKeyDealSub_FINDKeyDealSub_LP2:CMPA#$FFLBNEKeyDealSub_LP3RTC ;無效鍵值,退出KeyDealSub_LP3:INXINXINXJMPKeyDealSub_LPlKeyDealSub_FIND:INXLDAA,XCMPA#$FFBEQKeyDealSub_FIND_LP2;次態(tài)為OFFH,表示保持原態(tài)STAAKEYSTATE;存次態(tài)KeyDealSub_FIND_LP2:INXLDAA,X ;取支程序號LSLALDX#SUBJLDYA,XJMPY**分支表 *;KeyModeEQUO;KeyOKEQU1;KeyADDEQU2;KeySUBEQU3; 判定碼,次態(tài),子程序KeyStOEQU* ;開機時進入的等待狀態(tài)FCBKeyMode,l,lFCBKeyOK,0,2FCBKeyADD,0,23;FCBKeySUB,0,0FCB$FFKeySt1EQU* ;重新初時化傳感器參數(shù)FCBKeyMode,7,16;2,22FCBKeyOK,1,3;FCBKeySUB,0,3FCB$FFKeySt2EQU* ;設(shè)置角度計算時的延時值FCBKeyMode,0,l;3,19FCBKeyOK,0,6FCBKeyADD,$FF,4FCBKeySUB,$FF,5FCB$FFKeySt3EQU* ;修改STOP」參數(shù)FCBKeyMode,4,20FCBKeyOK,0,2FCBKeyADD,$FF,7FCBKeySUB,$FF,8FCB$FFKeySt4EQU* ;修改STOP_2參數(shù)FCBKeyMode,2,22;0,l ;5,21FCBKeyOK,0,23FCBKeyADD,$FF,9FCBKeySUB,$FF,10FCB$FFKeySt5EQU* ;修改PID_D參數(shù)FCBKeyOK,0,2FCBKeyADD,$FF,11FCBKeySUB,$FF,12FCB$FFKeySt6EQU* ;顯示MAX/MIN參數(shù)FCBKeyMode,3,19;0,l ;7,16FCBKeyOK,0,2FCBKeyADD,$FF,14FCBKeySUB,$FF,15FCB$FFKeySt7EQU* ; 速度參數(shù)修改FCBKeyMode,6,l3;5,21 ;2,22 ;0,lFCBKeyOK,0,2FCBKeyADD,$FF,17FCBKeySUB,$FF,18FCB$FF,**************************************************************;* 公共表 *,**************************************************************CommonKeyTabEQU*;FCBKeyMode,0,00;FCBKeyOK,1,01;FCBKeyADD,0,2FCB$FFTBB1EQU*FDBKeyStO,KeyStl,KeySt2,KeySt3,KeySt4,KeySt5,KeySt6,KeySt7;FDBKeySt6,KeySt7,KeySt8,KeySt9,KeySt10,KeySt11,KeySt12;FDB KeyStl3,KeyStl4,KeyStl5,KeyStl6,KeySt17;++++++++++++++++++++++++++++++++++++++++++++++++SUBJ:FDBSUBOFDBSUB1FDBSUB2FDBSUB3FDBSUB4FDBSUB5FDBSUB6FDBSUB7FDBSUB8FDBSUB9FDBSUB1OFDBSUB11FDBSUB12FDBSUB13FDBSUB14FDBSUB15FDBSUB16FDBSUB17FDBSUB18FDBSUB19FDBSUB20FDBSUB21FDBSUB22FDBSUB23FDBSUB24FDBSUB25FDBSUB26FDBSUB27FDBSUB28FDBSUB29FDBSUB30FDBSUB31SUBO:RTC;未用到的鍵直接返回;工作狀態(tài)+1,并顯示當前狀態(tài)號在發(fā)光二極管上SUB1:MOVBBACK_KEYSTATE,DispBuf;暫用DispBufINCDispBufCALLLight_controlRTC;設(shè)置完成,開始出發(fā)SUB2:MOVB#StartEN,StartFlag;CLIMOVB#l,DispBufCALLLight_controlMOVB#$FF,PTHMOVB#$FF,PORTARTC;重新初時化傳感器參數(shù),設(shè)置完成后,開始出發(fā)SUB3:CLICALLDEBUG_ADCALLSUB2RTC;調(diào)整角度計算時的延時值+SUB4:;INCANGLE_DELAYINCBLACK_TOTAL_BUFCALLSUB4_SUBRTCSUB4_SUB:;LDABANGLE_DELAYLDABBLACK_TOTAL_BUFCALLResult_displayRTC;調(diào)整角度計算時的延時值?SUB5::DECANGLE_DELAYDECBLACK_TOTAL_BUFCALLSUB4_SUBRTC;調(diào)整角度延時值之后,進入開車狀態(tài)SUB6:LDAB#$FFCALLResult_display;關(guān)掉LED顯示CALLSUB2RTC;增加PID_P參數(shù)值+SUB7:LDABSTOP.1INCBSTABSTOP.lCALLResult_displayRTC;增加PID_P參數(shù)值?SUB8:LDABSTOP_1DECBSTABSTOP」CALLResult_displayRTC;增加PID」參數(shù)值+SUB9:LDABSTOP.2INCBSTABSTOP_2CALLResult_displayRTC;增加PID」參數(shù)值?SUB10:LDABSTOP_2DECBSTABSTOP_2CALLResult_displayRTC;增加PID_D參數(shù)值+SUB11:LDDPID_DINCBSTDPID_DCALLResult_displayRTC;增加PID_D參數(shù)值?SUB12:LDDPID_DDECBSTDPID_DCALLResult_displayRTC;初始化參數(shù)值檢查,顯示MAX,MIN值SUB13:LDABSENSOR1_MAXCALLResult_displayCALLSUB1MOVB#O,BUF_1RTC;+顯示號SUB14:INCBUF_1LDABBUF_1CMPB#14*2BNESUB14_LP1MOVB#O,BUF_1LDABBUF_1SUB14JLP1:LDX#SENSOR1_MAXSTABDispBufLDABB,XCALLResult_displayCALLLight_controlRTC;-顯小號SUB15:DECBUF_1LDABBUF_1CMPB#0BGESUB15_LP1MOVB#(14*2-1),BUF_1LDABBUF.lSUB15.LP1:LDX#SENSOR1_MAXSTABDispBufLDABB,XCALLResult_displayCALLLight_controlRTC;進入速度參數(shù)修改,顯示當前參數(shù)SUB16:LDABSPEED_NOWCALLResult_displayCALLSUB1RTC;增加SPEED_NOW參數(shù)值+SUB17:LDABSPEED_NOWADDB#1STABSPEED_NOWCALLResult_displayRTC;減SPEED_NOW參數(shù)值?SUB18:LDABSPEED_NOWSUBB#1STABSPEED_NOWCALLResult_displayRTC;顯示PID_P入口SUB19:LDABSTOP_1CALLResult_displayCALLSUB1RTC;顯示PID」入口SUB20:LDABSTOP_2CALLResult_displayCALLS
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 干部下社區(qū)工作總結(jié) 總結(jié)
- 孤獨癥兒童的社交困難
- 外賣食品合同范例
- 企業(yè)銷售訂單合同范例
- 公會簽署合同模板
- 建筑工作合同范例
- 農(nóng)資配件出售合同范例
- ddp外貿(mào)合同范例
- 信陽合理用工合同范例
- 廢舊設(shè)備工廠出售合同范例
- 人教版一年級上冊數(shù)學(xué)期末試題及答案
- 浙江省9+1高中聯(lián)盟2023-2024學(xué)年高一上學(xué)期11月期中英語試題 含解析
- 2025屆高三化學(xué)一輪復(fù)習(xí) 第13講 鐵鹽、亞鐵鹽及其轉(zhuǎn)化 課件
- 【電商企業(yè)跨國并購的績效探析案例:以阿里巴巴并購Lazada為例(論文)14000字】
- 2023年11月軟考中級系統(tǒng)集成項目管理工程師下午真題(第二批)
- 2024年中國遙控風扇控制器市場調(diào)查研究報告
- 2024年江蘇省鹽城射陽縣部分村(居)宣傳文化管理員招聘57人歷年高頻難、易錯點500題模擬試題附帶答案詳解
- 2024智慧園區(qū)系統(tǒng)建設(shè)規(guī)范
- 2024-2030年中國紡織服裝行業(yè)市場發(fā)展分析及發(fā)展趨勢與投資研究報告
- 肌肉筋膜疼痛綜合征
- 我與班集體共成長主題班會
評論
0/150
提交評論