文档详情

红外遥控爬虫机器人asm程序(Infrared remote control crawler robot ASM program).doc

发布:2017-08-17约6.63千字共25页下载文档
文本预览下载声明
红外遥控爬虫机器人asm程序(Infrared remote control crawler robot ASM program) Five. Control procedures Infrared remote control crawler robot ASM program -----------------------------------------------------------------------------------------------------------------------------------------; HOME EQU 14; servo motor returns to midpoint time constant BACK EQU 3; servo motor reversal time constant FOR EQU 25; servo motor forward turn time constant ----------------------------------------------------------------------------------------------------------------------------------------; Remote control button 1~6, compare code CODE_K1 EQU 19H; robot forward comparison code CODE_K2 EQU 18H; robot back comparison code CODE_K3 EQU 0AH; robot left turn comparison code CODE_K4 EQU 09H; robot right turn comparison code CODE_K5 EQU 0BH; the robot returns to the midpoint code CODE_K6 EQU 14H; robot walk into comparison code ----------------------------------------------------------------------------------------------------------------------------------------; IRCOM EQU 30H; infrared signal decoding; data placement; variable start address COM EQU 32H; compares third byte variables ----------------------------------------------------------------------------------------------------------------------------------------; IRIN EQU P3.2; infrared IR signal input bit pin definition WLED EQU P3.7; light emitting diode pin definition SPK, EQU, P3.4; Piezoelectric Horn pin definitions DJZ EQU P1.0; intermediate servo motor pin definition DJL EQU P1.1; left servo motor pin definition DJR EQU P1.2; right servo motor pin definition ----------------------------------------------------------------------------------------------------------------------------------------; ORG 0H; the program code starts with address 0 JMP BEGIN; enter the main program ----------------------------------------------------------------------------------------------------------------------------------------; BEGIN: CLR DJZ; turn off t
显示全部
相似文档