alohaassembly
Programmer
I am using a Mini-Max/51-C2 for control purpose. Its ADC board is used to collect the sensor data, and its expansion port is used to send out control signals to 4 H-bridges to drive 4 DC motors. Now I need two things:
1. The time at any instant. Because the trajectory of each motor will be programmed with regard to time, I need to know the exact time at any instant. What I want to do is, write a subroutine which can read the system time and by subtracting the initial time from this, I can get the execution time.
2. Because I need to use the I/O pins to send out the motor control signals, I need to use the Pulse Width Modulation (PWM). I saw that in 8051, the 16-bit Programmable Counter Array can achieve PWM. So I wonder how to use this feature with the Micro-IDE.
1. The time at any instant. Because the trajectory of each motor will be programmed with regard to time, I need to know the exact time at any instant. What I want to do is, write a subroutine which can read the system time and by subtracting the initial time from this, I can get the execution time.
2. Because I need to use the I/O pins to send out the motor control signals, I need to use the Pulse Width Modulation (PWM). I saw that in 8051, the 16-bit Programmable Counter Array can achieve PWM. So I wonder how to use this feature with the Micro-IDE.