Datasheet

Programming PIC Microcontrollers in BASIC - mikroElektronika
Example
for i = 1 to Length(s1)
Man_Send(s1[i]) ' Send char
Delay_ms(90)
next i
5.2.13 PWM Library
CCP (Capture/ Compare/ PWM) module is available with a number of PIC MCU models. Set of library procedures and functions is
listed below to provide comfortable work with PWM (Pulse Width Modulation).
Note that these routines support module on PORTC pin RC2, and won't work with modules on other ports. Also, BASIC doesn't
support enhanced PWM modules.
5.2.13.1 PWM_Init – Initializes PWM module
Prototype
sub procedure PWM_Init(const PWM_Freq)
Description Initializes PWM module with (duty ratio) 0%. <PWM_Freq> is a desired PWM frequency (refer to device data
sheet for correct values in respect with Fosc).
Example
PWM_Init(5000) ' initializes PWM module, freq = 5kHz
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/05.htm (84 sur 112)05/11/2004 02:20:53