| Electronic Components Datasheet Search |
|
STC12LE5616AD Datasheet(PDF) 267 Page - STCmicro Technology Co,.Ltd |
|
|
|||||||||||||||||||||||||||||
STC12LE5616AD Datasheet(HTML) 267 Page - STCmicro Technology Co,.Ltd |
|
267 / 377 page ![]() 10.8 Demo Program for PCA clock base on Timer 1 overflow rate ;/*-------------------------------------------------------------------------------*/ ;/* --- STC MCU International Limited ----------------------------------*/ ;/* --- STC 1T Series achieve adjustable frequency PWM output-----*/ ;/* If you want to use the program or the program referenced in the */ ;/* article, please specify in which data and procedures from STC */ ;/*------------------------------------------------------------------------------*/ ;/*Declare SFR associated with the ADC */ IPH EQU 0B7H ;Interrupt priority control register high byte CCON EQU 0D8H ;PCA control register CCF0 BIT CCON.0 ;PCA module-0 interrupt flag CCF1 BIT CCON.1 ;PCA module-1 interrupt flag CR BIT CCON.6 ;PCA timer run control bit CF BIT CCON.7 ;PCA timer overflow flag CMOD EQU 0D9H ;PCA mode register CL EQU 0E9H ;PCA base timer LOW CH EQU 0F9H ;PCA base timer HIGH CCAPM0 EQU 0DAH ;PCA module-0 mode register CCAP0L EQU 0EAH ;PCA module-0 capture register LOW CCAP0H EQU 0FAH ;PCA module-0 capture register HIGH CCAPM1 EQU 0DBH ;PCA module-1 mode register CCAP1L EQU 0EBH ;PCA module-1 capture register LOW CCAP1H EQU 0FBH ;PCA module-1 capture register HIGH ;/*Define working LED */ LED_MCU_START EQU P1.7 LED_5ms_Flashing EQU P1.6 LED_1S_Flashing EQU P1.5 Channel_5mS_H EQU 01H ;PCA module-1 5ms counter high byte @ 18.432MHz Channel_5mS_L EQU 00H ;PCA module-1 5ms counter low byte @ 18.432MHz Timer0_Reload_1 EQU 0F6H ;Timer0 auto reload value (-10) Timer0_Reload_2 EQU 0ECH ;Timer0 auto reload value (-20) PWM_WIDTH EQU 0FFH ;low duty Counter EQU 030H ;counter value 267 |
|
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 |