| поискавой системы для электроныых деталей |
|
HT45F23 датащи(PDF) 73 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT45F23 датащи(HTML) 73 Page - Holtek Semiconductor Inc |
|
73 / 152 page ![]() The following diagram illustrates the waveforms associated with the 7+1 mode PWM operation. It is important to note how the single PWM cycle is subdivided into 2 individual modulation cycles, numbered 0 and 1 and how the AC value is related to the PWM value. PWM Output Control The PWM outputs are pin-shared with the I/O pins PC5 and PC6. To operate as a PWM output and not as an I/O pin, the correct bits must be set in the BPCTL register. A high value must be written to the PWM0EN or PWM1EN to select the corresponding PWM. A zero value must also be written to the corresponding bit in the I/O port control register PCC.5 and PCC.6 to ensure that the corresponding PWM output pin is setup as an output. After these two initial steps have been carried out, and of course after the required PWM value has been written into the PWMn register, writing a high value to the corresponding bit in the output data register PC.5 and PC.6 will enable the PWM data to appear on the pin. Writing a zero value will disable the PWM output function and force the output low. In this way, the Port data output registers can be used as an on/off control for the PWM function. Note that if the BPCTL register has selected the PWM function, but a high value has been written to its corresponding bit in the PCC control register to configure the pin as an input, then the pin can still function as a normal input line, with pull-high resistor options. PWM Programming Example The following sample program shows how the PWM0 output is setup and controlled. mov a,64h ;setup PWM value of decimal 100 mov pwm0,a clr bpctl.7 ;select the 7+1 PWM mode set bpctl.5 ;select PWM0 clr pcc.5 ;setup pin PC5 set pc.5 ;enable the PWM output :: clr pc.5 ; disable the PWM output pin,PC5 forced low HT45F23/HT45F43 8-Bit Flash MCU with Op Amps & Comparators Rev. 1.20 73 September 15, 2011 f S Y S / 2 P W M [ P W M ] = 1 0 0 [ P W M ] = 1 0 1 P W M [ P W M ] = 1 0 2 P W M [ P W M ] = 1 0 3 P W M P W M m o d u l a t i o n p e r i o d : 1 2 8 / f S Y S 5 0 / 1 2 8 5 1 / 1 2 8 5 1 / 1 2 8 5 2 / 1 2 8 5 0 / 1 2 8 5 0 / 1 2 8 5 1 / 1 2 8 5 1 / 1 2 8 5 0 / 1 2 8 5 1 / 1 2 8 5 1 / 1 2 8 5 2 / 1 2 8 M o d u l a t i o n c y c l e 0 P W M c y c l e : 2 5 6 / f S Y S M o d u l a t i o n c y c l e 1 M o d u l a t i o n c y c l e 0 7+1 PWM Mode P W M R e g i s t e r ( 7 + 1 ) M o d e b 7 b 0 A C v a l u e D C v a l u e PWM Register for 7+1 Mode |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |