187 of 318
ZBasic System Library 177 ZX Microcontroller Family The actual PWM frequency used will be the closest of the available frequencies as shown in the table below. The frequencies in the shaded rows are not available on ZX devices based on the mega128, mega1281 and mega1280 chips. Available 8-bit PWM Frequencies FastPWM Phase Correct PWM 57,600.0 28,912.9 7,200.0 3,614.1 1,800.0 903.5 900.0 451.8 450.0 225.9 225.0 112.9 56.3 28.8 The PWM frequencies in the table above apply to ZX devices with a main clock speed of 14.7456 MHz. For ZX devices operating at a different frequency, the available PWM frequencies will be proportionally higher or lower. Example Call OpenPWM8(1, 50.0, zxFastPWM) 'prepare for 50Hz Fast PWM using channel 1 Compatibility This subroutine is not available in BasicX compatibility mode nor is it available on ATxmega-based ZX devices. See Also ClosePWM8, PWM8