3.22EjemploDRM007 Co..
3.22EjemploDRM007 Co..
3.22EjemploDRM007 Co..
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Source <strong>Co</strong>de<br />
#endif<br />
/* Initialize timers for capture operation and interrupt every 1 ms */<br />
InitTimerB();<br />
InitTimerA();<br />
ResumeTimerB();<br />
ResumeTimerA();<br />
newPWM = ZEROPWM;<br />
}<br />
return;<br />
/*****************************************************************************\<br />
* void InitTimerA (void): This subroutine is called from main and from the *<br />
* subroutine for executing any washing machine process. * *<br />
Its function is to initialize timer A. *<br />
* *<br />
* Parameters: None. *<br />
* *<br />
* Return: None. *<br />
\*****************************************************************************/<br />
void InitTimerA (void)<br />
{<br />
/*<br />
Used for:<br />
1 Speed control<br />
2 <strong>Co</strong>mmutation<br />
*/<br />
TASC;<br />
TASC = TOIE | TSTOP | TRST | Prescaler_by_64;<br />
TAMOD = _1milli;<br />
TASC1 = CHIE | IC_any_Edge; // HALL A<br />
}<br />
return;<br />
/*****************************************************************************\<br />
* void InitTimerB (void): This subroutine is called from main and from the *<br />
* subroutine for executing any washing machine process.<br />
*<br />
* Its function is to initialize timer A. *<br />
* *<br />
* Parameters: None. *<br />
* *<br />
* Return: None. *<br />
\*****************************************************************************/<br />
DRM007<br />
BLDC Motor <strong>Co</strong>ntrol Board for Industrial and Appliance Applications<br />
130 Source <strong>Co</strong>de MOTOROLA