FreescaleCMT
 
Component FreescaleCMT
Freescale Carrier Modulator Timer
Component Level: Low
Methods:
(Methods are user-callable functions/subroutines intended for the component functions control. Please see the Embedded Components page for more information.)
  • Enable - Enable the component - it starts the signal generation. Events may be generated ("DisableEvent"/"EnableEvent").

      ANSIC prototype: byte Enable(void)
    • Return value:byte - Error code, possible codes:
      ERR_OK - OK
      ERR_SPEED - This device does not work in the active speed mode

  • Disable - Disable the component - it stops signal generation and events calling. When the component is disabled, it is possible to call methods "ClrValue" and "SetValue".

      ANSIC prototype: byte Disable(void)
    • Return value:byte - Error code, possible codes:
      ERR_OK - OK
      ERR_SPEED - This device does not work in the active speed mode

  • EnableEvent - Enable the events. The method is available only if any event is selected.

      ANSIC prototype: byte EnableEvent(void)
    • Return value:byte - Error code, possible codes:
      ERR_OK - OK
      ERR_SPEED - This device does not work in the active speed mode

  • DisableEvent - Disable the events. The method is available only if any event is selected.

      ANSIC prototype: byte DisableEvent(void)
    • Return value:byte - Error code, possible codes:
      ERR_OK - OK
      ERR_SPEED - This device does not work in the active speed mode

  • SwapCarrierFreq - The method swaps the primary and secondary carrier frequency setting. The method is available only in FSK mode.

      ANSIC prototype: byte SwapCarrierFreq(void)
    • Return value:byte - Error code, possible codes:
      ERR_OK - OK
      ERR_SPEED - This device does not work in the active speed mode

  • SetSpaceWidthMode - Switch the space width of the signal generated by the component to the specified mode (changes the period/frequency using a mode's values). Each mode is identified by a single 8-bit unsigned number which expresses one period/frequency of the generated signal. This method reduce the time needed for setting a new period value. This method is enabled only if there is specified a list of possible period settings at design time (see Timing dialog box - Runtime setting - from a list of values). Each of these settings constitutes a mode and Processor Expert assigns them a mode identifier. The prescaler and compare values corresponding to each mode are calculated at design time. You may switch modes at runtime by referring only to a mode identifier.

      ANSIC prototype: byte SetSpaceWidthMode(byte Mode)
    • Mode:byte - Space width mode to switch to (0 to N). It is recommended to use constants published in the generated header file.
    • Return value:byte - Error code, possible codes:
      ERR_OK - OK
      ERR_SPEED - This device does not work in the active speed mode
      ERR_VALUE - Value out of range, requested timing mode is not defined

  • SetMarkWidthMode - Switch the Mark pulse width of the signal generated by the component to the specified mode (changes the period/frequency using a mode's values). Each mode is identified by a single 8-bit unsigned number which expresses one period/frequency of the generated signal. This method reduce the time needed for setting a new period value. This method is enabled only in FSK mode. if there is specified a list of possible period settings at design time (see Timing dialog box - Runtime setting - from a list of values). Each of these settings constitutes a mode and Processor Expert assigns them a mode identifier. The prescaler and compare values corresponding to each mode are calculated at design time. You may switch modes at runtime by referring only to a mode identifier.

      ANSIC prototype: byte SetMarkWidthMode(byte Mode)
    • Mode:byte - Mark width mode to switch to (0 to N). It is recommended to use public constants from the generated header file.
    • Return value:byte - Error code, possible codes:
      ERR_OK - OK
      ERR_SPEED - This device does not work in the active speed mode
      ERR_VALUE - Value out of range, requested timing mode is not defined

  • SetExtendedSpace - If the parameter is TRUE, the Space starts to be send over entire next periods of the modulator. To re-enable Mark - Space sequence at the beginning of the next period of the modulator, the method should be called with parameter FALSE.

      ANSIC prototype: byte SetExtendedSpace(bool Space)
    • Space:bool - true - Only the Space will be send during entire next period. false - Mark-Space sequence will be send in the next period.
    • Return value:byte - Error code, possible codes:
      ERR_OK - OK
      ERR_SPEED - This device does not work in the active speed mode

  • SetValue - This method sets output signal to active level (see the property Output pin active level). It allows to the user to directly set the output pin value. This method works only when the timer is disabled (see method Disable) otherwise it returns the error code. The method is available only if the component can be disabled.

      ANSIC prototype: byte SetValue(void)
    • Return value:byte - Error code, possible codes:
      ERR_OK - OK
      ERR_SPEED - This device does not work in the active speed mode
      ERR_ENABLED - Component is enabled. Component must be disabled (see "Disable method")

  • ClrValue - This method sets output signal to non-active level (see the property Output pin active level). It allows to the user to directly set the output pin value. This method works only when the component is disabled (see method Disable) otherwise it returns the error code. The method is available only if the component can be disabled.

      ANSIC prototype: byte ClrValue(void)
    • Return value:byte - Error code, possible codes:
      ERR_OK - OK
      ERR_SPEED - This device does not work in the active speed mode
      ERR_ENABLED - Component is enabled. Component must be disabled (see "Disable method")


Note: Some methods can be implemented as macros.