| Electronic Components Datasheet Search |
|
STC12LE5616AD Datasheet(PDF) 241 Page - STCmicro Technology Co,.Ltd |
|
|
|||||||||||||||||||||||||||||
STC12LE5616AD Datasheet(HTML) 241 Page - STCmicro Technology Co,.Ltd |
|
241 / 377 page ![]() 3. PCA capture/campare register CCAPM0, CCAPM1, CCAPM2 and CCAPM3 Each module in the PCA has a special function register associated with it. These registers are CCAPMn, n=0 ~3. CCAPM0 for module 0, CCAPM1 for module 1, CCAPM2 for module 2 and CCAPM3 for module 3. The register contains the bits that control the mode in which each module will operate. The ECCFn bit enables the CCFn flag in the CCON SFR to generate an interrupt when a match or compare occurs in the associated module. PWMn enables the pulse width modulation mode. The TOGn bit when set causes the CCPn output associated with the module to toggle when there is a match between the PCA counter and the module’s capture/compare register. The match bit(MATn) when set will cause the CCFn bit in the CCON register to be set when there is a match between the PCA counter and the module’s capture/compare register. The next two bits CAPNn and CAPPn determine the edge that a capture input will be active on. The CAPNn bit enables the negative edge, and the CAPPn bit enables the positive edge. If both bits are set, both edges will be enabled and a capture will occur for either transition. The bit ECOMn when set enables the comparator function. Capture/Compare register of PCA module 0 : CCAPM0 (Non bit-addressable) SFR name Address bit B7B6B5 B4 B3 B2 B1 B0 CCAPM0 DAH name - ECOM0 CAPP0 CAPN0 MAT0 TOG0 PWM0 ECCF0 ECOM0 : Comparator Enable bit. ECOM0=0 disables the comparator function; ECOM0=1 enables the comparator function. CAPP0 : Capture Positive control bit. CAPP0=1 enables positive edge capture. CAPN0 : Capture Negative control bit. CAPN0=1 enables negative edge capture. MAT0 : Match control bit. When MAT0 = 1, a match of the PCA counter with this module’s compare/capture register causes the CCF0 bit in CCON to be set. TOG0 : Toggle control bit. When TOG0=1, a match of the PCA counter with this module’s compare/capture register causes the CCP0 pin to toggle. (PCA0/PWM0/P3.7) PWM0 : Pulse Width Modulation. PWM0=1 enables the CCP0 pin to be used as a pulse width modulated output. (PCA0/PWM0/P3.7) ECCF0 : Enable CCF0 interrupt. Enables compare/capture flag CCF0 in the CCON register to generate an interrupt. 241 |
|
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 |