| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
PIC16F15213T-I/ST bảng dữ liệu(PDF) 206 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16F15213T-I/ST bảng dữ liệu(HTML) 206 Page - Microchip Technology |
|
206 / 439 page ![]() Table 22-2. Example PWM Frequencies and Resolutions (FOSC = 20 MHz) PWM Frequency 1.22 kHz 4.88 kHz 19.53 kHz 78.12 kHz 156.3 kHz 208.3 kHz Timer Prescale 16 4 1 1 1 1 T2PR Value 0xFF 0xFF 0xFF 0x3F 0x1F 0x17 Maximum Resolution (bits) 10 10 10 8 7 6.6 Table 22-3. Example PWM Frequencies and Resolutions (FOSC = 8 MHz) PWM Frequency 1.22 kHz 4.90 kHz 19.61 kHz 76.92 kHz 153.85 kHz 200.0 kHz Timer Prescale 16 4 1 1 1 1 T2PR Value 0x65 0x65 0x65 0x19 0x0C 0x09 Maximum Resolution (bits) 8 8 8 6 5 5 22.4.6 Operation in Sleep Mode In Sleep mode, the T2TMR register will not increment and the state of the module will not change. If the CCPx pin is driving a value, it will continue to drive that value. When the device wakes up, T2TMR will continue from the previous state. 22.4.7 Changes in System Clock Frequency The PWM frequency is derived from the system clock frequency. Any changes in the system clock frequency will result in changes to the PWM frequency. See the “OSC - Oscillator Module” section for additional details. 22.4.8 Effects of Reset Any Reset will force all ports to Input mode and the CCP registers to their Reset states. 22.4.9 Setup for PWM Operation The following steps illustrate how to configure the CCP module for standard PWM operation: 1. Select the desired output pin with the RxyPPS control to select CCPx as the source. Disable the selected pin output driver by setting the associated TRIS bit. The output will be enabled later at the end of the PWM setup. 2. Load the timer period register T2PR with the PWM period value. 3. Configure the CCP module for the PWM mode by loading the CCPxCON register with the appropriate values. 4. Load the CCPRx register with the PWM duty cycle value and configure the FMT bit to set the proper register alignment. 5. Configure and start the Timer: – Clear the TMR2IF Interrupt Flag bit of the PIRx register. See the Note below. – Select the timer clock source to be as FOSC/4. This is required for correct operation of the PWM module. – Configure the CKPS bits of the T2CON register with the desired Timer prescale value. – Enable the Timer by setting the ON bit of the T2CON register. 6. Enable the PWM output: – Wait until the Timer overflows and the TMR2IF bit of the PIRx register is set. See the Note below. – Enable the CCPx pin output driver by clearing the associated TRIS bit. Important: To send a complete duty cycle and period on the first PWM output, the above steps must be included in the setup sequence. If it is not critical to start with a complete PWM signal on the first output, then step 6 may be ignored. PIC16F15213/14/23/24/43/44 CCP - Capture/Compare/PWM Module © 2020-2022 Microchip Technology Inc. and its subsidiaries Data Sheet DS40002195E-page 206 |
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |