Chinaunix首页 | 论坛 | 博客
  • 博客访问: 687332
  • 博文数量: 1368
  • 博客积分: 2420
  • 博客等级: 大尉
  • 技术积分: 14580
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-11 14:53
文章分类

全部博文(1368)

文章存档

2011年(96)

2010年(1007)

2009年(237)

2008年(28)

我的朋友

分类:

2010-09-21 16:26:57

The code prompts you to select a certain speed The computer program controls these resistors. When S1 is on however and both S2 and S3 are off, the timer output is set to logic one, thereby driving the motor with its maximum speed. When S1 and S2 are on, the 555 timer generates a pulse signal with a 50% duty cycle.

In this case, the charging resistor, RA1, is equal to the discharging resistor, RB. In the third case, S1 and S3 are on, and the charging resistor is RA2,where RA2=0.1×RB, reducing the on time of the pulse signal and, consequently, the speed of the motor to the lower limit. Table 1 summarizes the on/off-operation conditions of the relays and the corresponding dc-motor speeds.

The code prompts you to select a certain speed, stores your selection as an integer variable choice, generates the proper digital sequence, and stores it at another integer variable. You place the value of the integer variable data at a PC’s parallel port using the outportb function. The program uses the kbhit however function to stop the motor when you hit any key on the keyboard.
阅读(79) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~