首页 开发技术 VB     /    飞思卡尔智能车舵机调试工具

飞思卡尔智能车舵机调试工具

上传者: qvsx100 | 上传时间:2017/9/26 2:39:53 | 文件大小:273KB | 文件类型:rar
飞思卡尔智能车舵机调试工具
程序名称:飞思卡尔智能车舵机调试工具v1.1程序作者:LinX时间:2009-03-07联系方式:QQ:408111919Email:linhaiwz@163.com"&vbCrLf&vbCrLf&_〖 本程序为方便舵机调试而编写,错误在所难免,如有建议欢迎和我联系!〗角度转换为高电平时间角度-45045(anger/度)高电平时间100015002000(t/us)计算公式为:T=1000+(anger+45)*(1000/90)该程序可以通过串口与单片机进行通讯,实时改变舵机的角度。
通讯协议为:0xfe0xMM0xNN(其中0xfe为包头,0xMM为PWMDTYx高8位,0xN为PWMDTYx低8位)在串口中缀中分三次接收,在第二次接收时保存数据到temp0中,在第三次接收到数据时将PWMDTY01=((unsignedint)temp0<<8)|RxData就可以完成PWM改变输出了。
下位机程序如下:#include/*commondefinesandmacros*/#include/*derivativeinformation*/#pragmaLINK_INFODERIVATIVE"mc9s12xs128"unsignedcharRX=0,temp0;voiduart_putchar(unsignedcharch){if(ch=='\n'){while(!(SCI0SR1&0x80));SCI0DRL=0x0d;return;}while(!(SCI0SR1&0x80));SCI0DRL=ch;}staticvoidPWM_Init(void){//SB,Bforch2367//SA,Aforch0145PWMCTL_CON01=1; //0和1联合成16位PWM;
PWMCAE_CAE1=0; //选择输出模式为左对齐输出模式PWMCNT01=0; //计数器清零;
PWMPOL_PPOL1=1; //先输出高电平,计数到DTY时,反转电平PWMPRCLK=0X40;//clockA不分频,clockA=busclock=16MHz;CLKB16分频:1MhzPWMSCLA=8;//对clockSA进行2*8=16分频;
pwmclock=clockA/16=1MHz;PWMCLK_PCLK1=1;//选择clockSA做时钟源PWMPER01=20000;//周期20ms;
50Hz;(可以使用的范围:50-200hz)PWMDTY01=1500;//高电平时间为1.5ms;PWME_PWME1=1;}voidsetbusclock(void)//PLLsetting{CLKSEL=0X00;//disengagePLLtosystemPLLCTL_PLLON=1;//turnonPLLSYNR=1;REFDV=1;//pllclock=2*osc*(1+SYNR)/(1+REFDV)=32MHz;_asm(nop);//BUSCLOCK=16M_asm(nop);while(!(CRGFLG_LOCK==1));//whenpllissteady,thenuseit;CLKSEL_PLLSEL=1;//engagePLLtosystem;}staticvoidSCI_Init(void)//SCI{SCI0CR1=0x00;SCI0CR2=0x2c;//enableReceiveFullInterrupt,RXenab

文件下载

资源详情

[{"title":"(40个子文件273KB)飞思卡尔智能车舵机调试工具","children":[{"title":"舵机调试工具","children":[{"title":"说明.txt <span style='color:#111;'>3.25KB</span>","children":null,"spread":false},{"title":"舵机调试工具","children":[{"title":"MSCOMM32.OCX <span style='color:#111;'>101.31KB</span>","children":null,"spread":false},{"title":"舵机调试工具.exe <span style='color:#111;'>44.00KB</span>","children":null,"spread":false}],"spread":true},{"title":"测试程序","children":[{"title":"TBDML.ini <span style='color:#111;'>2.94KB</span>","children":null,"spread":false},{"title":"Sources","children":[{"title":"datapage.c <span style='color:#111;'>66.84KB</span>","children":null,"spread":false},{"title":"main.c <span style='color:#111;'>4.18KB</span>","children":null,"spread":false},{"title":"Start12.c <span style='color:#111;'>22.07KB</span>","children":null,"spread":false}],"spread":true},{"title":"bin","children":[{"title":"TBDML.abs <span style='color:#111;'>143.81KB</span>","children":null,"spread":false},{"title":"TBDML.abs.glo <span style='color:#111;'>1.10KB</span>","children":null,"spread":false},{"title":"Full_Chip_Simulation.map <span style='color:#111;'>105B</span>","children":null,"spread":false},{"title":"TBDML.abs.s19 <span style='color:#111;'>1.07KB</span>","children":null,"spread":false},{"title":"TBDML.map <span style='color:#111;'>98.35KB</span>","children":null,"spread":false}],"spread":true},{"title":"Default.mem <span style='color:#111;'>161B</span>","children":null,"spread":false},{"title":"test1.mcp <span style='color:#111;'>107.71KB</span>","children":null,"spread":false},{"title":"tips.txt <span style='color:#111;'>10.89KB</span>","children":null,"spread":false},{"title":"prm","children":[{"title":"burner.bbl <span style='color:#111;'>9.90KB</span>","children":null,"spread":false},{"title":"TBDML_linker.prm <span style='color:#111;'>4.86KB</span>","children":null,"spread":false},{"title":"Full_Chip_Simulation_linker.prm <span style='color:#111;'>4.86KB</span>","children":null,"spread":false}],"spread":true},{"title":"C_Layout.hwl <span style='color:#111;'>855B</span>","children":null,"spread":false},{"title":"test1_Data","children":[{"title":"TBDML","children":[{"title":"TargetDataWindows.tdt <span style='color:#111;'>479.71KB</span>","children":null,"spread":false},{"title":"ObjectCode","children":[{"title":"MC9S12XS128.c.o <span style='color:#111;'>133.13KB</span>","children":null,"spread":false},{"title":"Start12.c.o <span style='color:#111;'>5.09KB</span>","children":null,"spread":false},{"title":"datapage.c.o <span style='color:#111;'>13.66KB</span>","children":null,"spread":false},{"title":"main.c.o <span style='color:#111;'>19.02KB</span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"CWSettingsWindows.stg <span style='color:#111;'>4.33KB</span>","children":null,"spread":false},{"title":"Full_Chip_Simulation","children":[{"title":"TargetDataWindows.tdt <span style='color:#111;'>60.92KB</span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"Full_Chip_Simulation.ini <span style='color:#111;'>874B</span>","children":null,"spread":false},{"title":"readme.txt <span style='color:#111;'>3.04KB</span>","children":null,"spread":false},{"title":"cmd","children":[{"title":"TBDML_Erase_unsecure_hcs12xe.cmd <span style='color:#111;'>1.48KB</span>","children":null,"spread":false},{"title":"TBDML_Startup.cmd <span style='color:#111;'>59B</span>","children":null,"spread":false},{"title":"Full_Chip_Simulation_Postload.cmd <span style='color:#111;'>59B</span>","children":null,"spread":false},{"title":"TBDML_Postload.cmd <span style='color:#111;'>59B</span>","children":null,"spread":false},{"title":"TBDML_Vppoff.cmd <span style='color:#111;'>77B</span>","children":null,"spread":false},{"title":"TBDML_Reset.cmd <span style='color:#111;'>60B</span>","children":null,"spread":false},{"title":"TBDML_Preload.cmd <span style='color:#111;'>60B</span>","children":null,"spread":false},{"title":"Full_Chip_Simulation_Reset.cmd <span style='color:#111;'>60B</span>","children":null,"spread":false},{"title":"Full_Chip_Simulation_Startup.cmd <span style='color:#111;'>59B</span>","children":null,"spread":false},{"title":"Full_Chip_Simulation_Preload.cmd <span style='color:#111;'>60B</span>","children":null,"spread":false},{"title":"TBDML_Vppon.cmd <span style='color:#111;'>78B</span>","children":null,"spread":false},{"title":"Full_Chip_Simulation_SetCPU.cmd <span style='color:#111;'>59B</span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":true}]

评论信息

  • lz995218010:
    下载了,很不错的,有帮助2013-08-16
  • DreamtechShen:
    东西还不错,但是要自己修改才能适应自己调试所要的要求2012-12-08
  • zcc0411:
    有一些帮助,改了一些,还好2012-07-17

免责申明

【好快吧下载】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【好快吧下载】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【好快吧下载】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,8686821#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明