嵌入式教材课件 第三次.docVIP

  • 0
  • 0
  • 约4.1千字
  • 约 5页
  • 2022-04-13 发布于未知
  • 举报
实验九 硬件实验(2)——步进电机实验 一、实验目的 1、了解步进电机的原理以及控制方法 二、实验内容 编写程序实现对步进电机的驱动 编写程序实现步进电机的正反转 编写程序实现对步进电机的速度调整 三、实验要求 (1)正转 //ioport unsigned port100e; /* functions */ void delay(int count); // 整步模式正转脉冲 unsigned char pluse_table[] = { 0x05, 0x09, 0x0a, 0x06, }; void Main(void) { int row = 0; While(1) { if(row==4) row=0; (*(volatile unsigned char *)0=pulse_table[row++]; delay(20); } } /***************************************************************************** // Function name : delay // Description : 延时子程序 // Return type : void // Argument : count,延时的数值 *****************

文档评论(0)

1亿VIP精品文档

相关文档