Home > other >  Single chip microcomputer dc motor speed regulation?
Single chip microcomputer dc motor speed regulation?

Time:09-22

By dac0832 d/a conversion, output pulse to the dc motor, by adjusting the square wave duty ratios to adjust speed,
Program to see don't understand, middle hight and low don't understand the meaning of


#include
#include
# define daport XBYTE [0 x8000]
Void delay (unsigned char i1);
Void main (void)
{unsigned char hight, low;
Bit updown.
Updown=1;
Hight=0 XFF;
Low=0 x00;
While (1)
{
Daport=0 XFF;
Delay (hight);
Daport=0 x080;
Delay (low);
If (updown)
{hight++;
Low -;
If (hight==0 XFF)
Updown=0; }
The else
{
Hight -;
Low++;
If (hight==0 x00)
Updown=1;
}
}
}
Void delay (unsigned char i1)
{unsigned char ii;
Unsigned int jj;
For (ii=0; IiFor (jj=0; Jj<0 x10. Jj++);

CodePudding user response:

High and low, is used to control the duty ratio of PWM wave, used to implement the control of motor speed,

CodePudding user response:

PWM waveform High LOw, two is duty ratio and percentage of time control current, the current speed is higher, the greater the integral charge High and LOw points, namely H account for the faster than the speed

CodePudding user response:

High low, low level, high level

First base fastened, want to fly, the first to learn to walk well

CodePudding user response:

Can ask specific questions I think is good, is better than "how electrode control",

Praise a, come on!
  • Related