Start Back Next End
  
ZBasic System Library
69
ZBasic Microcontrollers
ClosePWM8
Type
Subroutine
Invocation
ClosePWM8(channel)
ClosePWM8(channel, status)
Parameter
Method
Type
Description
channel
ByVal
Byte
The 8-bit 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 8-bit channel and all other PWM
channels associated with the same 8-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 closePWM8().
The status parameter, if supplied, receives a value to indicate success or failure of the call.
A side effect of a successful ClosePWM8() call is that the timer busy flag for the associated timer (e.g.
Register.Timer2Busy) will be set to False indicating that the timer may be used for other purposes.
 
Example
Call ClosePWM8(1)   ' terminate PWM on channel 1 (and channel 2)
Compatibility
This subroutine is not available in BasicX compatibility mode nor is it available on ATxmega-based
ZBasic devices.
See Also
Previous page Top Next page