| Electronic Components Datasheet Search |
|
SYNPWM Datasheet(PDF) 25 Page - Feeling Technology Corp. |
|
|
|||||||||||||||||||||||||||||
SYNPWM Datasheet(HTML) 25 Page - Feeling Technology Corp. |
|
25 / 57 page ![]() FM8P73B Web site: http://www.feeling-tech.com.tw Rev1.0 Nov 20, 2013 P.25/FM8P73B FEELING TECHNOLOGY 2.4 Pulse Width Modulation (PWM) FM8P73B provides one PWM output shared with TMR1/2, TMR1 becomes the period of PWM1 and TMR2 will be the duty of PWM1. If the system frequency is 4MHz, the range of PWM period could be from 0.5us to 8,192ms. 2.4.1 Normal PWM mode In this mode, it is a general purpose PWM mode. Please refer to the sample program and timing diagram below. Note : When PWM duty or period needed to be changed, the auto-load control bit of the timer (TxLOAD) must be cleared before new data writes to latch register. If this bit still set, the data written to latch register would be load into counter register immediately and cause PWM output anomaly. Example 2.2: PWM1 Setting (Normal mode) Address Code NA #include <8P73B.ASH> … //Set PWM1 Period n MOVIA 0x61 n+1 MOVAR T1CON ;Set source: 4MHz IRC (250nS) Prescaler 1:2 n+2 MOVIA 0x80 n+3 MOVAR PWM1CON ;Set PWM interrupt rate 1:1, output on IOA0 n+4 MOVIA 0x0F n+5 MOVAR T1LA ;Set period (0x0F down count to 0x00) ;Period time = 250ns x 16 x 2 = 8uS //Set PWM1 Duty n+6 MOVIA 0x61 n+7 MOVAR T2CON ;Set source 4MHz IRC (250nS) Prescaler 1:2 n+8 MOVIA 0x07 n+9 MOVAR T2LA ;Set Duty (0x07 down count to 0x00) ;Duty time = 250ns x 8 x2 = 4uS n+10 BSR T1CON,T1EN_B ;Start PWM1 n+11 MOVIA 0x81 n+12 MOVAR INTEN ;Enable global & PWM1 interrupt n+13 CLRR INTFLAG ;Clear interrupt flag Note: The PWM duty (Timer2) must be smaller than PWM period (Timer1). Figure 2.5: Normal PWM Output Waveform TMR2 counter: 09 0A 00 01 09 0A 00 01 PWM1P Output: PWM Duty PWM P eriod TMR1 counter: 0C 0D 00 01 0C 0D 0C 0D |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |