How to control stepper motor speed in emu8086?

In summary, the conversation discusses controlling a stepper motor in emu8086 by taking input at runtime to control the speed and stop the motor. The conversation also mentions using I/O ports and pins to drive the motor, with the example of using the printer port pins on an old PC. The conversation then delves into using emu8086 as an emulator and the need for a hardware controller, as well as connecting LEDs as output ports and accepting input for the controller.
  • #1
yukari1310
16
0
how can we control stepper motor in emu8086?
we have to take input AT RUNTIME that if we enter 0 it will stop the stepper motor, 1 for slow speed, 2 for medium and 3 for fast speed.
 
Physics news on Phys.org
  • #2
What I/O port and how many pins are being used to drive the stepper motor? I recall doing this on an old PC in MSDOS, where it wasn't an issue to hook into the ticker interrupt and read the ticker count which ran at 1.19318 mhz (838 nano seconds per count) to get a very precise delay routine. 4 of the printer port pins were cycled through 4 phases to advance the stepper motor at various frequencies.
 
  • #3
This question is actually intended for a treadmill development which include programming (speed change and incline functions) and memory interface. I have hard time understanding a coding let alone writing one. Do we assign the meaning of I/O port ourselves?
 
  • #4
yukari1310 said:
Do we assign the meaning of I/O port ourselves?
Yes, but emu8086 is an emulator, not a piece of hardware. Some type of hardware controller is needed, and the I/O ports will need to be specified. The I/O port pinouts will have to go to yet another controller that converts the pinout signals into the voltage and current required to drive the treadmill motors and also the displays. Other stuff like a power supply and sensors (to prevent excessive movment of the incline) would also be needed.
 
  • #5
I found out that I do not need to control a real motor but write a coding that will give voltage at the output port instead. I am to build an interfacing circuit. How do I connect LEDs (output port) to it? And where/how should I accept the input?
 

Related to How to control stepper motor speed in emu8086?

1. How do I specify the speed of a stepper motor in emu8086?

To specify the speed of a stepper motor in emu8086, you can use the command mov al, speed, where "speed" is a value between 0 and 255. A higher value will result in a faster speed, while a lower value will result in a slower speed. This command can be used in conjunction with other commands to control the speed of the motor.

2. Can I control the speed of a stepper motor in emu8086 without using additional hardware?

Yes, you can control the speed of a stepper motor in emu8086 without using additional hardware. The motor speed can be controlled by manipulating the delay between each step of the motor. This can be achieved by using the delay command in emu8086, which pauses the execution of the program for a specified number of milliseconds. By adjusting the delay, you can control the speed of the motor.

3. What is the maximum speed that can be achieved using emu8086 to control a stepper motor?

The maximum speed that can be achieved using emu8086 to control a stepper motor depends on the capabilities of your computer and the stepper motor itself. Generally, the speed is limited by the processing power of the computer and the maximum frequency of the motor. To achieve higher speeds, you may need to use more advanced microcontrollers or stepper motor drivers.

4. How can I make sure that the stepper motor is moving at the desired speed in emu8086?

To ensure that the stepper motor is moving at the desired speed in emu8086, you can use the delay command to create a consistent delay between each step of the motor. You can also use the mov al, speed command to set the speed to a specific value. It is important to test and adjust your program to achieve the desired speed.

5. Can the speed of a stepper motor be changed dynamically in emu8086?

Yes, the speed of a stepper motor can be changed dynamically in emu8086. This can be achieved by using variables to store the desired speed or by using conditional statements to adjust the speed based on certain criteria. With careful programming, you can create a program that allows the speed of the motor to be changed while it is running.

Similar threads

Replies
5
Views
3K
Replies
2
Views
1K
  • Mechanical Engineering
Replies
2
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
Replies
3
Views
876
  • Engineering and Comp Sci Homework Help
Replies
12
Views
1K
Replies
11
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
2K
Replies
17
Views
803
  • Engineering and Comp Sci Homework Help
Replies
4
Views
5K
Back
Top