Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

8051 timer and pulse width modulation.

Status
Not open for further replies.

alohaassembly

Programmer
Dec 1, 2005
1
US
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.
 
An H bridge is four transistors arranged in an H.

The thing you're driving is connected in the horizontal bar of the H.

It's used to reverse d.c. motors, amongst other things, while using a single voltage supply.
 
Ah - like a bridge rectifier inside out and with a control line. Thanks.
 
Generally two control lines, one for each side of the H.

One might control direction of rotation, while the other would control speed by using PWM. (Pulse width modulation).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top