State machine state Low

PWMGenInner
Acabando el periodo

State machine transitions

  • Hemos acabado el conteo de Low, hemos de saltar a offset
    • Destination:Offset
    • Condition: PWMGen_endLowCountToOffset
      Code
      PWMGen_countLow<=0 && PWMGen_offset>0
    • Actions:
      • PWMGen
        Resetea los contadores a sus valor iniciales.
        Code
        PWMGen_countOffset=PWMGen_offset;
        PWMGen_countHigh=PWMGen_timHigh;
        PWMGen_countLow=PWMGen_timLow;
  • No hay offset y hemos acabado la cuenta para Low, saltaremos directamente a High.
    • Destination:High
    • Condition: PWMGen_endLowCountToHigh
      Code
      PWMGen_countLow<=0
      && PWMGen_offset<=0
    • Actions:
      • PWMGen
        Resetea los contadores a sus valor iniciales.
        Code
        PWMGen_countOffset=PWMGen_offset;
        PWMGen_countHigh=PWMGen_timHigh;
        PWMGen_countLow=PWMGen_timLow;
      • PWMGen
        Sacamos un valor alto por el puerto de salida
        Code
        PWMGen_output=TRUE;
  • Seguimos decrementando el contador de Low, pues seguimos en el estado bajo del PWM
    • Destination:Low
    • Condition: (Not Available)
    • Actions:
      • PWMGen
        Decrementamos el contador de Low
        Code
        if (PWMGen_countLow>0) {
        PWMGen_countLow--;
        }