MikroElektronika PIC Microcontrollers PIC16 Datový list Strana 126

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 194
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 125
1 2 ... 121 122 123 124 125 126 127 128 129 130 131 ... 193 194

Komentáře k této Příručce

Žádné komentáře