MikroElektronika PIC Microcontrollers PIC16 Ficha de datos Pagina 126

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 194
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 125
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
Vista de pagina 125
1 2 ... 121 122 123 124 125 126 127 128 129 130 131 ... 193 194

Comentarios a estos manuales

Sin comentarios