21.01.2014 Views

3.22EjemploDRM007 Co..

3.22EjemploDRM007 Co..

3.22EjemploDRM007 Co..

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Software Design <strong>Co</strong>nsiderations<br />

Description of Routines<br />

5.9.5 InitTimerB(void)<br />

Timer B channel 0 and channel 1 are configured as input capture<br />

channels with interrupts enabled on any edge. Channel 0 is connected<br />

to Hall sensor B and channel 1 to Hall sensor C. These two channels are<br />

used also for commutation control. Channel 1 is used for period<br />

calculation between two Hall sensor edges.<br />

5.9.6 Byte ResolveButtons(void)<br />

The state of the input pins, where the push buttons are continuously<br />

checked for any change, are tested here. A debounce delay is included<br />

in the routine. If there is no change on the push buttons, and the Speed<br />

message is being displayed, the respective value of the actual speed<br />

and reference speed are displayed in this routine.<br />

5.9.7 InitMotor(Byte <strong>Co</strong>mmanded_Operation)<br />

This subroutine is called from main to perform one of the two of the<br />

washing machine processes. The process is selected by the parameter<br />

value, <strong>Co</strong>mmanded_Operation.<br />

Parameters:<br />

BLDCWASH — Wash process of the washing machine.<br />

BLDCSPIN — Spin process<br />

Depending on the process selected from the user’s menu, the Speed<br />

reference is loaded from the respective look up table. The speed<br />

controller integral portion is set to 0, the bootstrap capacitors are<br />

charged and the timers are resumed.<br />

5.9.8 TimerAOverflow_ISR(void)<br />

Refer to 5.4 Speed <strong>Co</strong>ntrol Algorithm.<br />

BLDC Motor <strong>Co</strong>ntrol Board for Industrial and Appliance Applications<br />

DRM007<br />

MOTOROLA Software Design <strong>Co</strong>nsiderations 91

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!