| Electronic Components Datasheet Search |
|
ATtiny44 Datasheet(PDF) 107 Page - ATMEL Corporation |
|
|
|||||||||||||||||||||||||||||
ATtiny44 Datasheet(HTML) 107 Page - ATMEL Corporation |
|
107 / 236 page ![]() 107 8006H–AVR–10/09 ATtiny24/44/84 Note: See “Code Examples” on page 6. The assembly code example returns the TCNT1 value in the r17:r16 register pair. The following code examples show how to do an atomic write of the TCNT1 Register contents. Writing any of the OCR1A/B or ICR1 Registers can be done by using the same principle. C Code Example unsigned int TIM16_ReadTCNT 1( void ) { unsigned char sreg; unsigned int i; /* Save global interrupt flag */ sreg = SREG; /* Disable interrupts */ _CLI(); /* Read TCNT 1 into i */ i = TCNT 1; /* Restore global interrupt flag */ SREG = sreg; return i; } Assembly Code Example TIM16_WriteTCNT 1: ; Save global interrupt flag in r18,SREG ; Disable interrupts cli ; Set TCNT 1 to r17:r16 out TCNT 1H,r17 out TCNT 1L,r16 ; Restore global interrupt flag out SREG,r18 ret |
|
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 |