首页下载资源物联网51单片机控制三个步进电机的启动停止加protrus仿真

ZIP51单片机控制三个步进电机的启动停止加protrus仿真

qq_63306197137.27KB需要积分:1

资源文件列表:

motor.zip 大约有26个文件
  1. Motor/
  2. Motor/Listings/
  3. Motor/Listings/main.lst 5.11KB
  4. Motor/Listings/motor.m51 7.36KB
  5. Motor/Listings/STARTUP.lst 13.82KB
  6. Motor/main.c 2.57KB
  7. Motor/motor.uvgui.er_ji 69.63KB
  8. Motor/motor.uvopt 5.26KB
  9. Motor/motor.uvproj 13.7KB
  10. Motor/Objects/
  11. Motor/Objects/main.obj 4.88KB
  12. Motor/Objects/motor 4.95KB
  13. Motor/Objects/motor.build_log.htm 976B
  14. Motor/Objects/motor.hex 1.04KB
  15. Motor/Objects/motor.lnp 101B
  16. Motor/Objects/STARTUP.obj 819B
  17. Motor/STARTUP.A51 6.23KB
  18. protrus/
  19. protrus/Project Backups/
  20. protrus/Project Backups/新工程 [20241029, 23-03-53].pdsprj 10.29KB
  21. protrus/Project Backups/新工程 [20241029, 23-03-54].pdsprj 20.17KB
  22. protrus/Project Backups/新工程 [20241029, 23-10-25].pdsprj 20.18KB
  23. protrus/Project Backups/新工程 [20241029, 23-10-26].pdsprj 20.18KB
  24. protrus/Project Backups/新工程 [Autosaved].pdsprj 20.2KB
  25. protrus/新工程.pdsprj 20.18KB
  26. protrus/新工程.pdsprj.DESKTOP-N42O05I.er_ji.workspace 2.15KB

资源介绍:

51单片机控制三个步进电机的启动停止加protrus仿真
#include #define uchar unsigned char #define uint unsigned int #define OUT1 P1 #define OUT2 P2 #define OUT3 P3 sbit key0 = P0^1; sbit key1 = P0^0; sbit key2 = P0^2; sbit key3 = P0^3; sbit key4 = P0^4; sbit key5 = P0^5; //void delay(uint); uint TIME,TIME1,TIME2; uchar code turn[] = {0x02,0x06,0x04,0x0c,0x08,0x09,0x01,0x03}; void main() { uchar a,b,c; OUT1 = 0x03; OUT2 = 0x03; OUT3 = 0x03; TMOD = 0x01; TH0 = 0x3c; TL0 = 0xb0; EA = 1; ET0 = 1; TR0 = 1; while(1) { if (key0&&key1) TIME=0; if (!key0) { if (TIME==2) { a = a<8?a+1:0; OUT1 = turn[a]; TIME = 0; } } if (!key1) { if (TIME==2) { a = a>0?a-1:7; OUT1 = turn[a]; TIME = 0; } } if (key2&&key3) TIME1=0; if (!key2) { if (TIME1==2) { b = b<8?b+1:0; OUT2 = turn[b]; TIME1 = 0; } } if (!key3) { if (TIME1==2) { b = b>0?b-1:7; OUT2 = turn[b]; TIME1 = 0; } } if (key4&&key5) TIME2=0; if (!key4) { if (TIME2==2) { c = c<8?c+1:0; OUT3 = turn[c]; TIME2 = 0; } } if (!key5) { if (TIME2==2) { c = c>0?c-1:7; OUT3 = turn[c]; TIME2 = 0; } } } } void timer()interrupt 1 { TH0=0x3c; TL0=0xb0; TIME++; TIME1++; TIME2++; }
100+评论
captcha