54 of 318
ZBasic System Library 44 ZX Microcontroller Family ClosePWM Type Subroutine Invocation ClosePWM(channel) ClosePWM(channel, status) Parameter Method Type Description channel ByVal Byte The PWM channel to close. status ByRef Boolean A variable to receive the status code. Discussion This subroutine terminates the PWM signal generation on the specified channel and all other PWM channels associated with the same 16-bit timer. The resulting state of the output pins for the affected channels is indeterminate. If your application requires a specific output state, it is recommended that you call PutPin() to set the desired state prior to calling ClosePWM(). A side effect of a successful ClosePWM() call is that the timer busy flag for the associated timer (e.g. Register.Timer1Busy) will be set to False indicating that the timer may be used for other purposes. Example Call ClosePWM(1) ' terminate PWM on channel 1 and 2 Compatibility This subroutine is not available in BasicX compatibility mode. See Also OpenPWM, PWM