3.22EjemploDRM007 Co..
3.22EjemploDRM007 Co..
3.22EjemploDRM007 Co..
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Source <strong>Co</strong>de<br />
Source <strong>Co</strong>de Files<br />
/* Function 2. Spin CW function for the washing machine */<br />
else if(LCDState == BLDC_SPINCW)<br />
{<br />
if(BLDCState == BLDCSTOP)<br />
{<br />
LCDState = BLDC_STOP;<br />
Required_Direction = CW;<br />
InitMotor(BLDCSPIN);<br />
}<br />
}<br />
/* Function 3. Spin CCW function for the washing machine */<br />
else if(LCDState == BLDC_SPINCCW)<br />
{<br />
if(BLDCState == BLDCSTOP)<br />
{<br />
LCDState = BLDC_STOP;<br />
Required_Direction = CCW;<br />
InitMotor(BLDCSPIN);<br />
}<br />
}<br />
/* Function 4. At any time, when this function is selected,<br />
the brushless dc motor is stopped and all the<br />
values are reinitialized for another start */<br />
}<br />
else if(LCDState == BLDC_STOP)<br />
StopMotor();<br />
}Forever();<br />
}<br />
UBYTE ResolveButtons(void)<br />
{<br />
extern<br />
SBYTE RefSpeed,<br />
Speed;<br />
#pragma DATA_SEG DATA_ZEROPAGE<br />
static<br />
do<br />
{<br />
UBYTE buffer = 0; /* used for buffer temporal calculations<br />
of motor actual speed */<br />
if((PORTB & OPTIONS_BUTTON) == 0x00)<br />
{<br />
DebounceDelay();<br />
BLDC Motor <strong>Co</strong>ntrol Board for Industrial and Appliance Applications<br />
DRM007<br />
MOTOROLA Source <strong>Co</strong>de 125