Run Processing - Renesas M16C/Tiny User Manual

Hide thumbs Also See for M16C/Tiny:
Table of Contents

Advertisement

4.9 Run Processing

RSBJEUM0001-0101 Rev. 1.01
RunPWM
g_SpeedTgt > set value?
Yes
SpdDlyCnt = 300
IDB0=0x3f
IDB1=0x00
Timer value =M_CARR_CNT –
((g_PWMDuty*(SINT_32)M_CAR
R_CNT) >>15)
Set timer values
Timer A4 register = timer value
Timer A1 register = timer value
Timer A2 register = timer value
s_TargetCnt+1
No
s_TargetCnt>=s_DlyCnt
s_TargetCnt=0
g_SpeedCnd>g_SpeedTgt ?
Yes
g_SpeedTgt +1
Stop Check processing
Stop Requested ?
g_OutputMode = M_TURNOFF
RTS
No
Yes
No
No
Yes
SpdDlyCnt = 600
g_SpeedTgt -1
27

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rsbj

Table of Contents